Пример #1
0
 /// <summary>
 /// ProgramArgs constructor.
 /// </summary>
 /// <param name="dnvopt">Type of de novo result.</param>
 /// <param name="dnvPath">The path to the directory where the de novo files are placed.</param>
 /// <param name="dbOpt">The file format of the sequence database.</param>
 /// <param name="dbpPath">The path to the database directory </param>
 /// <param name="matrixPath">The substitution matrix. Default is pam30ms.</param>
 /// <param name="Thits">The desirable alignment top hits that will be analysed.</param>
 /// <param name="minAA">The minimmun size of the peptides to be used in the analysis.</param>
 /// <param name="decoy">The tag name inserted in the decoy sequences header.</param>
 /// <param name="oCost">The alignment penalty for open gaps.</param>
 /// <param name="eCost">The alignment penalty for extending gaps.</param>
 public ProgramArgs(DeNovoOption dnvopt,
                    string dnvPath,
                    string mPexPath,
                    DataBaseOption dbOpt,
                    string dbpPath,
                    MatrixOption matrix,
                    int Thits,
                    int minAA,
                    string decoy,
                    double minDenovoScore,
                    double minIdent
                    )
 {
     DeNovoOption          = dnvopt;
     DeNovoResultDirectory = dnvPath;
     MPexResultPath        = mPexPath;
     DataBaseFormat        = dbOpt;
     DataBaseFile          = dbpPath;
     SubstitutionMatrix    = matrix;
     TopHits         = Thits;
     PeptideMinNumAA = minAA;
     DecoyLabel      = decoy;
     MinDeNovoScore  = minDenovoScore;
     MinIdentity     = minIdent;
 }
Пример #2
0
        private ProgramArgs GetParamsFromScreen()
        {
            //Verify if arguments are valid.
            if (!File.Exists(textBoxDataBaseFile.Text))
            {
                throw new Exception("Database file " + textBoxDataBaseFile.Text + " not found");
            }

            if (!Directory.Exists(textBoxDeNovoOutput.Text) && richTextBoxPeptideList.Text.Length == 0 && textBoxmpexFile.Text.Length == 0)
            {
                throw new Exception("Please enter a valid directory containing de novo output files or enter a list of peptides to be considered.");
            }
            else if (richTextBoxPeptideList.Text.Length == 0 && buttonBrowseMPEXSearch.Text.Length == 0)
            {
                if (Directory.GetFiles(textBoxDeNovoOutput.Text).Count() == 0)
                {
                    throw new Exception("No files were found in the De novo output directory");
                }
            }

            if (comboBoxDeNovoSoftware.SelectedText.Equals("Select de novo software"))
            {
                throw new Exception("Please select the de novo sequencing tool / format");
            }

            string       dbPath         = textBoxDataBaseFile.Text;
            string       dnvPath        = textBoxDeNovoOutput.Text;
            string       decoy          = textBoxDecoyTag.Text;
            int          hits           = 1;
            int          pepSize        = Convert.ToInt16(numericUpDownPeptideSize.Value);
            MatrixOption matrix         = MatrixOption.PAM30ms;
            double       minDeNovoScore = (double)numericUpDownMinDenovoScore.Value;

            matrix = MatrixOption.PAM30ms;

            DataBaseOption dbOpt = DataBaseOption.Generic;

            if (radioButtonGeneric.Checked == true)
            {
                dbOpt = DataBaseOption.Generic;
            }
            else if (radioButtonNcbi.Checked == true)
            {
                dbOpt = DataBaseOption.NCBI;
            }
            else if (radioButtonNextProt.Checked == true)
            {
                dbOpt = DataBaseOption.NextProt;
            }
            else if (radioButtonSwissProt.Checked == true)
            {
                dbOpt = DataBaseOption.SwissProt;
            }

            DeNovoOption dnvOpt = DeNovoOption.Peaks75;

            if (comboBoxDeNovoSoftware.SelectedItem != null)
            {
                if (comboBoxDeNovoSoftware.SelectedItem.Equals("PEAKS 7.0"))
                {
                    dnvOpt = DeNovoOption.Peaks70;
                }
                else if (comboBoxDeNovoSoftware.SelectedItem.Equals("PEAKS 7.5"))
                {
                    dnvOpt = DeNovoOption.Peaks75;
                }
                else if (comboBoxDeNovoSoftware.SelectedItem.Equals("PEAKS 8.0"))
                {
                    dnvOpt = DeNovoOption.Peaks80;
                }
                else if (comboBoxDeNovoSoftware.SelectedItem.Equals("PepNovo+ (output_dnv)"))
                {
                    dnvOpt = DeNovoOption.PepNovo;
                }
                else if (comboBoxDeNovoSoftware.SelectedItem.Equals("PNovo+"))
                {
                    dnvOpt = DeNovoOption.PNovo;
                }
                else if (comboBoxDeNovoSoftware.SelectedItem.Equals("PepNovo+ (output_full)"))
                {
                    dnvOpt = DeNovoOption.PepNovoFull;
                }
                else if (comboBoxDeNovoSoftware.SelectedItem.Equals("MSGFDB"))
                {
                    dnvOpt = DeNovoOption.MSGFDB;
                }
                else if (comboBoxDeNovoSoftware.SelectedItem.Equals("NOVOR v1.05.0573"))
                {
                    dnvOpt = DeNovoOption.NOVOR;
                }
            }
            else
            {
                dnvOpt = DeNovoOption.ListOfPeptides;
            }

            double minIdentity = (double)numericUpDownMinIdentity.Value;

            ProgramArgs myArgs = new ProgramArgs(
                dnvOpt,
                dnvPath,
                textBoxmpexFile.Text,
                dbOpt,
                dbPath,
                matrix,
                hits,
                pepSize,
                decoy,
                minDeNovoScore,
                minIdentity
                );

            return(myArgs);
        }