Exemplo n.º 1
0
 public Parameters GetParameters(IMatrixData mdata, ref string errorString)
 {
     return
         (new Parameters(new SingleChoiceParam("Total number of peptides")
     {
         Values = mdata.NumericColumnNames,
         Value = ProteomicRulerUtils.Match(mdata.NumericColumnNames.ToArray(), new[] { "peptides" }, false, true, true)[0],
     }, new SingleChoiceParam("Unique + razor peptides")
     {
         Values = mdata.NumericColumnNames,
         Value = ProteomicRulerUtils.Match(mdata.NumericColumnNames.ToArray(), new[] { "razor" }, false, true, true)[0],
     }, new SingleChoiceParam("Sequence length")
     {
         Values = mdata.NumericColumnNames,
         Value = ProteomicRulerUtils.Match(mdata.NumericColumnNames.ToArray(), new[] { "length" }, false, true, true)[0],
     }, new SingleChoiceParam("Number of theoretical peptides")
     {
         Values = mdata.NumericColumnNames,
         Value = ProteomicRulerUtils.Match(mdata.NumericColumnNames.ToArray(), new[] { "theoretical" }, false, true, true)[0],
     }, new DoubleParam("High: min. peptides", 8)
     {
         Help = "High confidence class: Specify the minimum number of total peptides."
     }, new DoubleParam("High: min. razor fraction", 0.75)
     {
         Help = "High confidence class: Specify the minimum ratio of unique+razor to total peptides."
     }, new DoubleParam("High: min. theor.pep./100AA", 3)
     {
         Help = "High confidence class: Specify the minimum number of theoretical peptides per 100 amino acids."
     }, new DoubleParam("Medium: min. peptides", 3)
     {
         Help = "Medium confidence class: Specify the minimum number of total peptides."
     }, new DoubleParam("Medium: min. razor fraction", 0.5)
     {
         Help = "Medium confidence class: Specify the minimum ratio of unique+razor to total peptides."
     }, new DoubleParam("Medium: min. theor.pep./100AA", 2)
     {
         Help = "Medium confidence class: Specify the minimum number of theoretical peptides per 100 amino acids."
     }));
 }
Exemplo n.º 2
0
 public Parameters GetParameters(IMatrixData mdata, ref string errorString)
 {
     return
         (new Parameters(new SingleChoiceParam("Protein IDs")
     {
         Help = "Specify the column containing the UniProt protein IDs",
         Values = mdata.StringColumnNames,
         Value = ProteomicRulerUtils.Match(mdata.StringColumnNames.ToArray(), new[] { "majority" }, false, true, true)[0]
     }, new MultiChoiceParam("Intensities")
     {
         Help =
             "Specify the columns that contain the intensities to be used for copy number estimation. " +
             "If several columns are selected, they will be treated as specified by the 'averaging mode'.",
         Values = ArrayUtils.Concat(mdata.ColumnNames, mdata.NumericColumnNames),
         Value =
             ProteomicRulerUtils.Match(ArrayUtils.Concat(mdata.ColumnNames, mdata.NumericColumnNames), new[] { "intensit" },
                                       false, true, false)
     }, new BoolWithSubParams("Logarithmized", false)
     {
         Help = "Specify whether the intensities are logarithmized in the selected columns.",
         SubParamsFalse = new Parameters(new Parameter[] {}),
         SubParamsTrue =
             new Parameters(new Parameter[]
                            { new SingleChoiceParam("log base")
                              {
                                  Values = new[] { "2", "natural", "10" }, Value = 0
                              } })
     }, new SingleChoiceWithSubParams("Averaging mode", 0)
     {
         Values =
             new[] {
             "All columns separately", "Same normalization for all columns", "Same normalization within groups",
             "Average all columns"
         },
         Help = "Select how multiple columns will be treated",
         SubParams =
             new List <Parameters>()
         {
             new Parameters(new Parameter[] {}),
             new Parameters(new Parameter[] {}),
             new Parameters(new Parameter[] {
                 new SingleChoiceParam("Grouping")
                 {
                     Values = mdata.CategoryRowNames,
                     Value = ProteomicRulerUtils.Match(mdata.CategoryRowNames.ToArray(), new[] { "group" }, false, true, true)[0]
                 }
             }),
             new Parameters(new Parameter[] {})
         }
     }, new SingleChoiceParam("Molecular masses")
     {
         Values = mdata.NumericColumnNames,
         Help = "Select the column containing the molecular masses of the proteins.",
         Value = ProteomicRulerUtils.Match(mdata.NumericColumnNames.ToArray(), new[] { "mol" }, false, true, true)[0]
     }, new BoolWithSubParams("Detectability correction", false)
     {
         Help =
             "Without a correction factor, the algorithm assumes linearity between the signal and the cumulative mass of each protein.\n" +
             "Optionally select a column containing protein-specific correction factors such as the number of theoretical peptides.",
         SubParamsFalse = new Parameters(new Parameter[] {}),
         SubParamsTrue =
             new Parameters(new Parameter[] {
             new SingleChoiceParam("Correction factor")
             {
                 Values = mdata.NumericColumnNames,
                 Value =
                     ProteomicRulerUtils.Match(mdata.NumericColumnNames.ToArray(), new[] { "theoretical" }, false, true, true)[0]
             }
         })
     }, new SingleChoiceWithSubParams("Scaling mode", 1)
     {
         Help = "Select how the values should be scaled to absolute copy numbers.",
         Values = new[] { "Total protein amount", "Histone proteomic ruler" },
         SubParams =
             new List <Parameters>()
         {
             new Parameters(new Parameter[] {
                 new DoubleParam("Protein amount per cell [pg]", 200)
                 {
                     Help = "Specify the amount of protein per cell in picograms."
                 }
             }),
             new Parameters(new Parameter[] {
                 new DoubleParam("Ploidy", 2)
                 {
                     Help =
                         "Specify the ploidy of the cell type. This factor is multiplied with the genome size of the (auto-detected) organism to determine the expected amount of DNA and histones per cell."
                 }
             })
         }
     }, new DoubleParam("Total cellular protein concentration [g/l]", 200)
     {
         Help = "Specify the total protein concentration (typically 200-300 g/l)."
     }, new MultiChoiceParam("Output")
     {
         Help = "Select the desired output",
         Values =
             new[] {
             "Copy number per cell", "Concentration [nM]", "Relative abundance (mass/total mass)",
             "Relative abundance (molecules/total molecules)", "Copy number rank", "Relative copy number rank",
             "Sample summary row annotations (total protein, total molecules, cell volume, ...)",
             "Separate sample summary tab (total protein, total molecules, cell volume, ...)"
         },
         Value = new[] { 0, 1, 7 }
     }));
 }
Exemplo n.º 3
0
 public Parameters GetParameters(IMatrixData mdata, ref string errorString)
 {
     return
         (new Parameters(new SingleChoiceParam("Protein IDs")
     {
         Help = "Specify the column containing the protein IDs",
         Values = mdata.StringColumnNames,
         Value = ProteomicRulerUtils.Match(mdata.StringColumnNames.ToArray(), new[] { "majority" }, false, true, true)[0],
     }, new FileParam("Fasta file")
     {
         Filter = FileUtils.fastaFilter,
         Help =
             "Select the fasta file used for the database search of this dataset. The software will assume " +
             "uniprot-formatted headers for extracting accession IDs and metadata. As fallback position, everything " +
             "after the > will be taken as ID, but no header metadata can be extracted from non-uniprot headers."
     }, new SingleChoiceWithSubParams("Fasta header annotations")
     {
         ParamNameWidth = 120,
         TotalWidth = 500,
         Help = "Specify the annotations to be extracted from uniprot fasta headers",
         Values = new[] { "for all IDs", "for the leading ID" },
         Value = 0,
         SubParams =
             new List <Parameters>()
         {
             new Parameters(new Parameter[] {
                 new MultiChoiceParam("Annotations")
                 {
                     Values = new[] { "Entry name", "Gene name", "Protein name (verbose)", "Protein name (consensus)", "Species" },
                     Value = new[] { 1, 3 },
                 }
             }),
             new Parameters(new Parameter[] {
                 new MultiChoiceParam("Annotations")
                 {
                     Values = new[] { "Entry name", "Gene name", "Protein name (verbose)", "Protein name (consensus)", "Species" },
                     Value = new[] { 1, 3 },
                 }
             })
         }
     }, new SingleChoiceWithSubParams("Numeric annotations")
     {
         ParamNameWidth = 120,
         TotalWidth = 500,
         Help = "Specify the annotations to be mapped as numeric annotations",
         Values = new[] { "median of all IDs", "for the leading ID" },
         Value = 0,
         SubParams =
             new List <Parameters>()
         {
             new Parameters(new Parameter[] {
                 new MultiChoiceParam("Annotations")
                 {
                     Values = new[] { "Sequence length", "Monoisotopic molecular mass", "Average molecular mass" },
                     Value = new[] { 0, 2 }
                 }
             }),
             new Parameters(new Parameter[] {
                 new MultiChoiceParam("Annotations")
                 {
                     Values = new[] { "Sequence length", "Monoisotopic molecular mass", "Average molecular mass" },
                     Value = new[] { 0, 2 }
                 }
             })
         }
     }, new SingleChoiceWithSubParams("Calculate theoretical peptides")
     {
         ParamNameWidth = 120,
         TotalWidth = 500,
         Help = "Calculate the numbers of theoretical peptides (without miscleavages) by in silico digestion.",
         Values = new[] { "median of all IDs", "for the leading ID" },
         Value = 0,
         SubParams =
             new List <Parameters>()
         {
             new Parameters(new MultiChoiceParam("Proteases")
             {
                 Values = Constants.DefaultProteasesNames(), Value = new[] { 0 }
             }, new DoubleParam("Min. peptide length", 7), new DoubleParam("Max. peptide length", 30)),
             new Parameters(new MultiChoiceParam("Proteases")
             {
                 Values = Constants.DefaultProteasesNames(), Value = new[] { 0 }
             }, new DoubleParam("Min. peptide length", 7), new DoubleParam("Max. peptide length", 30), new BoolParam("Show sequences", false))
         }
     }, new SingleChoiceWithSubParams("Count sequence features")
     {
         ParamNameWidth = 180,
         TotalWidth = 500,
         Help =
             "Count the number of matches to a given regular expression in the amino acid sequence (optionally normalized " +
             "by sequence length).\n\nExamples:\n[KR] tryptic cleavage sites\nN[^P][ST][^P] N-glysosylation motifs",
         Values = new[] { "median of all IDs", "for the leading ID" },
         Value = 0,
         SubParams =
             new List <Parameters> {
             new Parameters(new StringParam("Regex"), new BoolParam("Normalize by sequence length", true)),
             new Parameters(new StringParam("Regex"), new BoolParam("Normalize by sequence length", false))
         }
     }));
 }