From b1f17fefec48b6c7a881f22982204d50d31935bf Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 6 Mar 2024 15:14:49 -0600 Subject: [PATCH 01/19] 5313 AllPeptides support --- CMD/CMD.csproj | 2 +- CMD/FlashLFQExecutable.cs | 2 +- GUI/GUI.csproj | 2 +- GUI/MainWindow.xaml.cs | 13 ++++++++++--- Test/Test.csproj | 2 +- Util/FlashLfqSettings.cs | 12 +++++++++--- Util/OutputWriter.cs | 3 ++- Util/PsmReader.cs | 38 ++++++++++++++++++++++++++++++-------- Util/Util.csproj | 2 +- 9 files changed, 56 insertions(+), 20 deletions(-) diff --git a/CMD/CMD.csproj b/CMD/CMD.csproj index caab3dd..d0785d8 100644 --- a/CMD/CMD.csproj +++ b/CMD/CMD.csproj @@ -17,7 +17,7 @@ - + diff --git a/CMD/FlashLFQExecutable.cs b/CMD/FlashLFQExecutable.cs index 1da5fea..34d70ca 100644 --- a/CMD/FlashLFQExecutable.cs +++ b/CMD/FlashLFQExecutable.cs @@ -191,7 +191,7 @@ private static void Run(FlashLfqSettings settings) List ids; try { - ids = PsmReader.ReadPsms(settings.PsmIdentificationPath, settings.Silent, spectraFileInfos); + ids = PsmReader.ReadPsms(settings.PsmIdentificationPath, settings.Silent, spectraFileInfos, settings.DonorQValueThreshold); } catch (Exception e) { diff --git a/GUI/GUI.csproj b/GUI/GUI.csproj index 2348495..ef10b71 100644 --- a/GUI/GUI.csproj +++ b/GUI/GUI.csproj @@ -17,7 +17,7 @@ - + diff --git a/GUI/MainWindow.xaml.cs b/GUI/MainWindow.xaml.cs index bd303b6..f7337c8 100644 --- a/GUI/MainWindow.xaml.cs +++ b/GUI/MainWindow.xaml.cs @@ -498,12 +498,19 @@ private void RunFlashLfq() { // read IDs var ids = new List(); + List peptidesForMbr = null; try { - foreach (var identFile in idFiles) + var allPepFile = idFiles.FirstOrDefault(idFile => idFile.FilePath.Contains("AllPeptides.psmtsv")); + if(allPepFile!=null) { - ids = ids.Concat(PsmReader.ReadPsms(identFile.FilePath, false, spectraFiles.Select(p => p.SpectraFileInfo).ToList())).ToList(); + List idsForMbr = PsmReader.ReadPsms(allPepFile.FilePath, false, spectraFiles.Select(p => p.SpectraFileInfo).ToList(), settings.DonorQValueThreshold); + peptidesForMbr = idsForMbr.Select(id => id.ModifiedSequence).ToList(); + } + foreach (var identFile in idFiles.Where(idFile => idFile != allPepFile)) + { + ids = ids.Concat(PsmReader.ReadPsms(identFile.FilePath, false, spectraFiles.Select(p => p.SpectraFileInfo).ToList(), settings.DonorQValueThreshold)).ToList(); } } catch (Exception e) @@ -557,7 +564,7 @@ private void RunFlashLfq() // run FlashLFQ engine try { - flashLfqEngine = FlashLfqSettings.CreateEngineWithSettings(settings, ids); + flashLfqEngine = FlashLfqSettings.CreateEngineWithSettings(settings, ids, peptidesForMbr); results = flashLfqEngine.Run(); } diff --git a/Test/Test.csproj b/Test/Test.csproj index b99330f..c7c5d43 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -15,7 +15,7 @@ - + diff --git a/Util/FlashLfqSettings.cs b/Util/FlashLfqSettings.cs index 7214a7b..168c58b 100644 --- a/Util/FlashLfqSettings.cs +++ b/Util/FlashLfqSettings.cs @@ -54,7 +54,7 @@ public class FlashLfqSettings public int MaxThreads { get; set; } // MBR settings - [Option("mbr", Default = false, HelpText = "bool; match between runs")] + [Option("mbr", Default = true, HelpText = "bool; match between runs")] public bool MatchBetweenRuns { get; set; } [Option("mrt", Default = 2.5, HelpText = "double; maximum MBR window in minutes")] @@ -86,6 +86,8 @@ public class FlashLfqSettings public int? RandomSeed { get; set; } //TODO: paired samples + public double DonorQValueThreshold = 0.01; + public FlashLfqSettings() { FlashLfqEngine f = new FlashLfqEngine(new List()); @@ -113,7 +115,7 @@ public FlashLfqSettings() RandomSeed = bayesianSettings.RandomSeed; } - public static FlashLfqEngine CreateEngineWithSettings(FlashLfqSettings settings, List ids) + public static FlashLfqEngine CreateEngineWithSettings(FlashLfqSettings settings, List ids, List peptidesForMbr = null) { return new FlashLfqEngine( allIdentifications: ids, @@ -128,8 +130,12 @@ public static FlashLfqEngine CreateEngineWithSettings(FlashLfqSettings settings, maxThreads: settings.MaxThreads, matchBetweenRuns: settings.MatchBetweenRuns, - matchBetweenRunsPpmTolerance: settings.PpmTolerance, + //matchBetweenRunsPpmTolerance: settings.PpmTolerance, + matchBetweenRunsPpmTolerance: 15, maxMbrWindow: settings.MbrRtWindow, + donorCriterion: 'S', + donorQValueThreshold: settings.DonorQValueThreshold, + peptidesForMbr: peptidesForMbr, requireMsmsIdInCondition: settings.RequireMsmsIdInCondition, bayesianProteinQuant: settings.BayesianProteinQuant, diff --git a/Util/OutputWriter.cs b/Util/OutputWriter.cs index 02fad71..914f97b 100644 --- a/Util/OutputWriter.cs +++ b/Util/OutputWriter.cs @@ -29,7 +29,8 @@ public static void WriteOutput(string inputPath, FlashLfqResults results, bool s Path.Combine(outputPath, "QuantifiedPeptides.tsv"), Path.Combine(outputPath, "QuantifiedProteins.tsv"), bayesianResults ? Path.Combine(outputPath, "BayesianFoldChangeAnalysis.tsv") : null, - silent + silent, + Path.Combine(outputPath, "DecoyPeaks.tsv") ); } diff --git a/Util/PsmReader.cs b/Util/PsmReader.cs index 21e8bfb..74104cf 100644 --- a/Util/PsmReader.cs +++ b/Util/PsmReader.cs @@ -23,6 +23,7 @@ public class PsmReader private static int _chargeStCol; private static int _protNameCol; private static int _decoyCol; + private static int _scoreCol; private static int _qValueCol; private static int _qValueNotchCol; @@ -46,7 +47,7 @@ public class PsmReader { PsmFileType.PeptideShaker, new string[] { ", " } }, }; - public static List ReadPsms(string filepath, bool silent, List rawfiles) + public static List ReadPsms(string filepath, bool silent, List rawfiles, double qValueThreshold = 0.01) { if (_modSequenceToMonoMass == null) { @@ -131,7 +132,7 @@ public static List ReadPsms(string filepath, bool silent, List ReadPsms(string filepath, bool silent, List rawFileDictionary, PsmFileType fileType) + private static Identification GetIdentification(string line, bool silent, Dictionary rawFileDictionary, PsmFileType fileType, double qValueThreshold = 0.01) { var param = line.Split('\t'); + double qValue= 0; + qValueThreshold = Math.Max(qValueThreshold, 0.01); // only quantify PSMs below 1% FDR with MetaMorpheus/Morpheus results - if (fileType == PsmFileType.MetaMorpheus && double.Parse(param[_qValueCol], CultureInfo.InvariantCulture) > 0.01) + if (fileType == PsmFileType.MetaMorpheus) { - return null; + qValue = double.Parse(param[_qValueCol], CultureInfo.InvariantCulture); + if(qValue > qValueThreshold) + { + return null; + } } else if (fileType == PsmFileType.Morpheus && double.Parse(param[_qValueCol], CultureInfo.InvariantCulture) > 1.00) { return null; } + // only quantify PSMs below 1% notch FDR with MetaMorpheus/Morpheus results - if (fileType == PsmFileType.MetaMorpheus && double.Parse(param[_qValueNotchCol], CultureInfo.InvariantCulture) > 0.01) + if (fileType == PsmFileType.MetaMorpheus && double.Parse(param[_qValueNotchCol], CultureInfo.InvariantCulture) > qValueThreshold) { return null; } // skip decoys with MetaMorpheus/Morpheus results //TODO: what about decoys from other input types? + bool decoy = false; if ((fileType == PsmFileType.MetaMorpheus || fileType == PsmFileType.Morpheus) && param[_decoyCol].Contains("D")) { - return null; + decoy = true; } // spectrum file name @@ -387,8 +396,20 @@ private static Identification GetIdentification(string line, bool silent, Dictio return null; } + double score; + if(_scoreCol > 0) + { + double.TryParse(param[_scoreCol], out score); + } + else + { + score = 0; + } + // construct id - return new Identification(spectraFileInfoToUse, baseSequence, modSequence, monoisotopicMass, ms2RetentionTime, chargeState, proteinGroups); + return new Identification(spectraFileInfoToUse, baseSequence, modSequence, + monoisotopicMass, ms2RetentionTime, chargeState, proteinGroups, + decoy: decoy, qValue: qValue, psmScore: score); } private static Identification GetPercolatorIdentification(string line, List scanHeaderInfo, bool silent, Dictionary rawFileDictionary) @@ -568,6 +589,7 @@ private static PsmFileType GetFileTypeFromHeader(string header) _chargeStCol = Array.IndexOf(split, "Precursor Charge".ToLowerInvariant()); _protNameCol = Array.IndexOf(split, "Protein Accession".ToLowerInvariant()); _decoyCol = Array.IndexOf(split, "Decoy/Contaminant/Target".ToLowerInvariant()); + _scoreCol = Array.IndexOf(split, "Score".ToLowerInvariant()); _qValueCol = Array.IndexOf(split, "QValue".ToLowerInvariant()); _qValueNotchCol = Array.IndexOf(split, "QValue Notch".ToLowerInvariant()); _geneNameCol = Array.IndexOf(split, "Gene Name".ToLowerInvariant()); diff --git a/Util/Util.csproj b/Util/Util.csproj index 20c48b6..680b784 100644 --- a/Util/Util.csproj +++ b/Util/Util.csproj @@ -15,7 +15,7 @@ - + From 2b4c28ac3beae716dc783da244b9a97781afc1c5 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 6 Mar 2024 19:00:27 -0600 Subject: [PATCH 02/19] removed reference to all peptides --- CMD/CMD.csproj | 2 +- GUI/GUI.csproj | 2 +- Test/Test.csproj | 2 +- Util/FlashLfqSettings.cs | 1 - Util/Util.csproj | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMD/CMD.csproj b/CMD/CMD.csproj index d0785d8..86c97e2 100644 --- a/CMD/CMD.csproj +++ b/CMD/CMD.csproj @@ -17,7 +17,7 @@ - + diff --git a/GUI/GUI.csproj b/GUI/GUI.csproj index ef10b71..430c7a5 100644 --- a/GUI/GUI.csproj +++ b/GUI/GUI.csproj @@ -17,7 +17,7 @@ - + diff --git a/Test/Test.csproj b/Test/Test.csproj index c7c5d43..75d20f8 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -15,7 +15,7 @@ - + diff --git a/Util/FlashLfqSettings.cs b/Util/FlashLfqSettings.cs index 168c58b..ef29b5e 100644 --- a/Util/FlashLfqSettings.cs +++ b/Util/FlashLfqSettings.cs @@ -135,7 +135,6 @@ public static FlashLfqEngine CreateEngineWithSettings(FlashLfqSettings settings, maxMbrWindow: settings.MbrRtWindow, donorCriterion: 'S', donorQValueThreshold: settings.DonorQValueThreshold, - peptidesForMbr: peptidesForMbr, requireMsmsIdInCondition: settings.RequireMsmsIdInCondition, bayesianProteinQuant: settings.BayesianProteinQuant, diff --git a/Util/Util.csproj b/Util/Util.csproj index 680b784..69a16cc 100644 --- a/Util/Util.csproj +++ b/Util/Util.csproj @@ -15,7 +15,7 @@ - + From 6d6f7c3a75c56c4db23e9b49797e8592e6393208 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 2 May 2024 12:29:31 -0500 Subject: [PATCH 03/19] Added test for local file analysis --- CMD/CMD.csproj | 2 +- CMD/FlashLFQExecutable.cs | 24 ++++++++++++++-- GUI/GUI.csproj | 2 +- Test/LocalFileRunner.cs | 60 +++++++++++++++++++++++++++++++++++++++ Test/Test.csproj | 2 +- Util/FlashLfqSettings.cs | 18 +++++++++--- Util/Util.csproj | 2 +- 7 files changed, 100 insertions(+), 10 deletions(-) create mode 100644 Test/LocalFileRunner.cs diff --git a/CMD/CMD.csproj b/CMD/CMD.csproj index 86c97e2..8dc64e3 100644 --- a/CMD/CMD.csproj +++ b/CMD/CMD.csproj @@ -17,7 +17,7 @@ - + diff --git a/CMD/FlashLFQExecutable.cs b/CMD/FlashLFQExecutable.cs index 34d70ca..6459a8a 100644 --- a/CMD/FlashLFQExecutable.cs +++ b/CMD/FlashLFQExecutable.cs @@ -1,5 +1,6 @@ using CommandLine; using CommandLine.Text; +using Easy.Common.Extensions; using FlashLFQ; using IO.ThermoRawFileReader; using MzLibUtil; @@ -191,7 +192,9 @@ private static void Run(FlashLfqSettings settings) List ids; try { - ids = PsmReader.ReadPsms(settings.PsmIdentificationPath, settings.Silent, spectraFileInfos, settings.DonorQValueThreshold); + ids = PsmReader.ReadPsms(settings.PsmIdentificationPath, settings.Silent, spectraFileInfos, settings.DonorQValueThreshold) + .Where(id => id.QValue <= 0.01).ToList(); + var test = ids.MaxBy(id => id.QValue); } catch (Exception e) { @@ -199,6 +202,20 @@ private static void Run(FlashLfqSettings settings) return; } + // set up IDs + List peptidesForPip; + try + { + var peptideIds = PsmReader.ReadPsms(settings.PeptideIdentificationPath, settings.Silent, spectraFileInfos, settings.DonorQValueThreshold) + .Where(id => id.QValue <= settings.DonorQValueThreshold).ToList(); + peptidesForPip = peptideIds.Select(id => id.ModifiedSequence).ToList(); + } + catch (Exception e) + { + Console.WriteLine("Problem reading Peptidess: " + e.Message); + return; + } + if (ids.Any()) { if (!settings.Silent) @@ -218,7 +235,10 @@ private static void Run(FlashLfqSettings settings) FlashLfqResults results = null; try { - engine = FlashLfqSettings.CreateEngineWithSettings(settings, ids); + if (peptidesForPip != null && peptidesForPip.IsNotNullOrEmpty()) + engine = FlashLfqSettings.CreateEngineWithSettings(settings, ids, peptidesForPip); + else + engine = FlashLfqSettings.CreateEngineWithSettings(settings, ids); // run results = engine.Run(); diff --git a/GUI/GUI.csproj b/GUI/GUI.csproj index 430c7a5..95abeb7 100644 --- a/GUI/GUI.csproj +++ b/GUI/GUI.csproj @@ -17,7 +17,7 @@ - + diff --git a/Test/LocalFileRunner.cs b/Test/LocalFileRunner.cs new file mode 100644 index 0000000..9b6ceb4 --- /dev/null +++ b/Test/LocalFileRunner.cs @@ -0,0 +1,60 @@ +using CMD; +using FlashLFQ; +using IO.MzML; +using MzLibUtil; +using NUnit.Framework; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Util; + +namespace Test +{ + [TestFixture] + internal class LocalFileRunner + { + [Test] + public static void TestMetaMorpheusOutput() + { + string psmFile = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\Task1-SearchTask\AllPeptides.psmtsv"; + + var mzmlDirectoy = @"D:\SpikeIn_PXD001819\MetaMorpheus105_Cal_Search_Quant\Task1-CalibrateTask\FlashLFQ_Files"; + + string outputPath = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\FlashLFQ_209_donor_02_pip_2"; + + string[] myargs = new string[] + { + "--rep", + mzmlDirectoy, + "--idt", + psmFile, + "--pep", + peptideFile, + "--out", + outputPath, + "--donorq", + "0.01", + "--pipfdr", + "0.02", + "--ppm", + "10" + }; + + CMD.FlashLfqExecutable.Main(myargs); + + string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); + Assert.That(File.Exists(peaksPath)); + //File.Delete(peaksPath); + + string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); + Assert.That(File.Exists(peptidesPath)); + //File.Delete(peptidesPath); + + string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); + Assert.That(File.Exists(proteinsPath)); + //File.Delete(proteinsPath); + } + } +} diff --git a/Test/Test.csproj b/Test/Test.csproj index 75d20f8..60aa78e 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -15,7 +15,7 @@ - + diff --git a/Util/FlashLfqSettings.cs b/Util/FlashLfqSettings.cs index ef29b5e..7659061 100644 --- a/Util/FlashLfqSettings.cs +++ b/Util/FlashLfqSettings.cs @@ -13,6 +13,9 @@ public class FlashLfqSettings [Option("idt", Required = true, HelpText = "string; identification file path")] public string PsmIdentificationPath { get; set; } + [Option("pep", Required = false, HelpText = "string; all peptide file path")] + public string PeptideIdentificationPath { get; set; } + [Option("rep", Required = true, HelpText = "string; directory containing spectral data files")] public string SpectraFileRepository { get; set; } @@ -86,7 +89,11 @@ public class FlashLfqSettings public int? RandomSeed { get; set; } //TODO: paired samples - public double DonorQValueThreshold = 0.01; + [Option("donorq", HelpText = "double; donor q value threshold")] + public double DonorQValueThreshold { get; set; } + + [Option("pipfdr", HelpText = "double; fdr cutoff for pip")] + public double MbrFdrThreshold { get; set; } public FlashLfqSettings() { @@ -104,6 +111,8 @@ public FlashLfqSettings() MatchBetweenRuns = f.MatchBetweenRuns; MbrRtWindow = f.MbrRtWindow; RequireMsmsIdInCondition = f.RequireMsmsIdInCondition; + DonorQValueThreshold = f.DonorQValueThreshold; + MbrFdrThreshold = f.MbrDetectionQValueThreshold; BayesianProteinQuant = f.BayesianProteinQuant; ProteinQuantBaseCondition = f.ProteinQuantBaseCondition; @@ -130,11 +139,11 @@ public static FlashLfqEngine CreateEngineWithSettings(FlashLfqSettings settings, maxThreads: settings.MaxThreads, matchBetweenRuns: settings.MatchBetweenRuns, - //matchBetweenRunsPpmTolerance: settings.PpmTolerance, - matchBetweenRunsPpmTolerance: 15, + matchBetweenRunsPpmTolerance: 10, maxMbrWindow: settings.MbrRtWindow, donorCriterion: 'S', donorQValueThreshold: settings.DonorQValueThreshold, + matchBetweenRunsFdrThreshold: settings.MbrFdrThreshold, requireMsmsIdInCondition: settings.RequireMsmsIdInCondition, bayesianProteinQuant: settings.BayesianProteinQuant, @@ -143,7 +152,8 @@ public static FlashLfqEngine CreateEngineWithSettings(FlashLfqSettings settings, mcmcSteps: settings.McmcSteps, mcmcBurninSteps: settings.McmcBurninSteps, useSharedPeptidesForProteinQuant: settings.UseSharedPeptidesForProteinQuant, - randomSeed: settings.RandomSeed + randomSeed: settings.RandomSeed, + peptidesForMbr: peptidesForMbr ); } diff --git a/Util/Util.csproj b/Util/Util.csproj index 69a16cc..b181567 100644 --- a/Util/Util.csproj +++ b/Util/Util.csproj @@ -15,7 +15,7 @@ - + From babd51d3166812b8d883e57c3ed5e0bd63f3365b Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 2 May 2024 15:03:07 -0500 Subject: [PATCH 04/19] Minor --- Test/LocalFileRunner.cs | 50 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/Test/LocalFileRunner.cs b/Test/LocalFileRunner.cs index 9b6ceb4..b60a4d1 100644 --- a/Test/LocalFileRunner.cs +++ b/Test/LocalFileRunner.cs @@ -16,13 +16,56 @@ internal class LocalFileRunner { [Test] public static void TestMetaMorpheusOutput() + { + string psmFile = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task2-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task2-SearchTask\AllPeptides.psmtsv"; + + var mzmlDirectoy = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task1-CalibrateTask\mzMLs"; + + string outputPath = @"D:\pepDesc_spikeIn\MM105_CalSearch\FlashLFQ_209_Donor1_Pip2"; + + string[] myargs = new string[] + { + "--rep", + mzmlDirectoy, + "--idt", + psmFile, + "--pep", + peptideFile, + "--out", + outputPath, + "--donorq", + "0.01", + "--pipfdr", + "0.02", + "--ppm", + "10" + }; + + CMD.FlashLfqExecutable.Main(myargs); + + string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); + Assert.That(File.Exists(peaksPath)); + //File.Delete(peaksPath); + + string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); + Assert.That(File.Exists(peptidesPath)); + //File.Delete(peptidesPath); + + string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); + Assert.That(File.Exists(proteinsPath)); + //File.Delete(proteinsPath); + } + + [Test] + public static void SingleCellFcTest() { string psmFile = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\Task1-SearchTask\AllPSMs.psmtsv"; string peptideFile = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\Task1-SearchTask\AllPeptides.psmtsv"; var mzmlDirectoy = @"D:\SpikeIn_PXD001819\MetaMorpheus105_Cal_Search_Quant\Task1-CalibrateTask\FlashLFQ_Files"; - string outputPath = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\FlashLFQ_209_donor_02_pip_2"; + string outputPath = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\FlashLFQ_209_donor_1_pip_5"; string[] myargs = new string[] { @@ -37,7 +80,7 @@ public static void TestMetaMorpheusOutput() "--donorq", "0.01", "--pipfdr", - "0.02", + "0.05", "--ppm", "10" }; @@ -57,4 +100,7 @@ public static void TestMetaMorpheusOutput() //File.Delete(proteinsPath); } } + + + } From a9555cca56ad7bc813226ce638c41aba434d28c5 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 28 May 2024 17:06:54 -0500 Subject: [PATCH 05/19] testing --- CMD/CMD.csproj | 2 +- CMD/FlashLFQExecutable.cs | 7 +- GUI/GUI.csproj | 2 +- Test/LocalFileRunner.cs | 499 +++++++++++++++++++++++++++++++++++++- Test/Test.csproj | 2 +- Util/OutputWriter.cs | 1 + Util/PsmReader.cs | 16 +- Util/Util.csproj | 2 +- 8 files changed, 507 insertions(+), 24 deletions(-) diff --git a/CMD/CMD.csproj b/CMD/CMD.csproj index 8dc64e3..94a4b77 100644 --- a/CMD/CMD.csproj +++ b/CMD/CMD.csproj @@ -17,7 +17,7 @@ - + diff --git a/CMD/FlashLFQExecutable.cs b/CMD/FlashLFQExecutable.cs index 6459a8a..8d9e8be 100644 --- a/CMD/FlashLFQExecutable.cs +++ b/CMD/FlashLFQExecutable.cs @@ -25,6 +25,8 @@ public static void Main(string[] args) .WithNotParsed(errs => DisplayHelp(parserResult, errs)); } + public static FlashLfqResults Results; + static void DisplayHelp(ParserResult result, IEnumerable errs) { var helpText = HelpText.AutoBuild(result, h => @@ -192,9 +194,9 @@ private static void Run(FlashLfqSettings settings) List ids; try { - ids = PsmReader.ReadPsms(settings.PsmIdentificationPath, settings.Silent, spectraFileInfos, settings.DonorQValueThreshold) - .Where(id => id.QValue <= 0.01).ToList(); + ids = PsmReader.ReadPsms(settings.PsmIdentificationPath, settings.Silent, spectraFileInfos, settings.DonorQValueThreshold).ToList(); var test = ids.MaxBy(id => id.QValue); + int placeholder = 0; } catch (Exception e) { @@ -263,6 +265,7 @@ private static void Run(FlashLfqSettings settings) // output if (results != null) { + Results = results; try { OutputWriter.WriteOutput(settings.PsmIdentificationPath, results, settings.Silent, settings.OutputPath); diff --git a/GUI/GUI.csproj b/GUI/GUI.csproj index 95abeb7..80b82e1 100644 --- a/GUI/GUI.csproj +++ b/GUI/GUI.csproj @@ -17,7 +17,7 @@ - + diff --git a/Test/LocalFileRunner.cs b/Test/LocalFileRunner.cs index b60a4d1..6019a63 100644 --- a/Test/LocalFileRunner.cs +++ b/Test/LocalFileRunner.cs @@ -15,14 +15,14 @@ namespace Test internal class LocalFileRunner { [Test] - public static void TestMetaMorpheusOutput() + public static void GygiTwoProteome() { - string psmFile = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task2-SearchTask\AllPSMs.psmtsv"; - string peptideFile = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task2-SearchTask\AllPeptides.psmtsv"; + string psmFile = @"D:\GygiTwoProteome_PXD014415\Yeast_Human_Arabad_Contam_search\AllPSMs.psmtsv"; + string peptideFile = @"D:\GygiTwoProteome_PXD014415\Yeast_Human_Arabad_Contam_search\AllPeptides.psmtsv"; - var mzmlDirectoy = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task1-CalibrateTask\mzMLs"; + var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\MM105_Calibration_Search_MBR\Task1-CalibrateTask"; - string outputPath = @"D:\pepDesc_spikeIn\MM105_CalSearch\FlashLFQ_209_Donor1_Pip2"; + string outputPath = @"D:\GygiTwoProteome_PXD014415\FlashLFQ_218_DonorPepQ_0pt2"; string[] myargs = new string[] { @@ -35,9 +35,95 @@ public static void TestMetaMorpheusOutput() "--out", outputPath, "--donorq", + "0.002", + "--pipfdr", "0.01", + "--ppm", + "10" + }; + + CMD.FlashLfqExecutable.Main(myargs); + + string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); + Assert.That(File.Exists(peaksPath)); + //File.Delete(peaksPath); + + string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); + Assert.That(File.Exists(peptidesPath)); + //File.Delete(peptidesPath); + + string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); + Assert.That(File.Exists(proteinsPath)); + //File.Delete(proteinsPath); + } + + [Test] + public static void GygiTwoProteomeCensored() + { + string psmFile = @"D:\GygiTwoProteome_PXD014415\CensoredDataFiles\MM105_Search\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\GygiTwoProteome_PXD014415\CensoredDataFiles\MM105_Search\Task1-SearchTask\AllPeptides.psmtsv"; + + var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\CensoredDataFiles"; + + string outputPath = @"D:\GygiTwoProteome_PXD014415\CensoredData_FlashLFQ_218_DonorPepQ_0pt2"; + + string[] myargs = new string[] + { + "--rep", + mzmlDirectoy, + "--idt", + psmFile, + "--pep", + peptideFile, + "--out", + outputPath, + "--donorq", + "0.002", "--pipfdr", - "0.02", + "0.01", + "--ppm", + "10" + }; + + CMD.FlashLfqExecutable.Main(myargs); + + string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); + Assert.That(File.Exists(peaksPath)); + //File.Delete(peaksPath); + + string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); + Assert.That(File.Exists(peptidesPath)); + //File.Delete(peptidesPath); + + string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); + Assert.That(File.Exists(proteinsPath)); + //File.Delete(proteinsPath); + } + + [Test] + public static void InHouseTwoProteomeEcoli() + { + string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\mm105_Ecoli_Mixed\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\mm105_Ecoli_Mixed\Task1-SearchTask\AllPeptides.psmtsv"; + + var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\CalibrateSearch_4_19_24\EColi_Calibrated_Files"; + + string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Ecoli_FlashLFQ_218_DonorPepQ_0pt2"; + + string[] myargs = new string[] + { + "--rep", + mzmlDirectoy, + "--idt", + psmFile, + "--pep", + peptideFile, + "--out", + outputPath, + "--donorq", + "0.002", + "--pipfdr", + "0.01", "--ppm", "10" }; @@ -58,14 +144,14 @@ public static void TestMetaMorpheusOutput() } [Test] - public static void SingleCellFcTest() + public static void InHouseTwoProteomeHumanCensored() { - string psmFile = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\Task1-SearchTask\AllPSMs.psmtsv"; - string peptideFile = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\Task1-SearchTask\AllPeptides.psmtsv"; + string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHumanData\MM105_Search\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHumanData\MM105_Search\Task1-SearchTask\AllPeptides.psmtsv"; - var mzmlDirectoy = @"D:\SpikeIn_PXD001819\MetaMorpheus105_Cal_Search_Quant\Task1-CalibrateTask\FlashLFQ_Files"; + var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHumanData"; - string outputPath = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\FlashLFQ_209_donor_1_pip_5"; + string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHuman_FlashLFQ_218_DonorPepQ_0pt2"; string[] myargs = new string[] { @@ -78,9 +164,52 @@ public static void SingleCellFcTest() "--out", outputPath, "--donorq", + "0.002", + "--pipfdr", "0.01", + "--ppm", + "10" + }; + + CMD.FlashLfqExecutable.Main(myargs); + + string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); + Assert.That(File.Exists(peaksPath)); + //File.Delete(peaksPath); + + string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); + Assert.That(File.Exists(peptidesPath)); + //File.Delete(peptidesPath); + + string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); + Assert.That(File.Exists(proteinsPath)); + //File.Delete(proteinsPath); + } + + [Test] + public static void InHouseTwoProteomeHuman() + { + string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\MM105_Human_Mixed\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\MM105_Human_Mixed\Task1-SearchTask\AllPeptides.psmtsv"; + + var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\CalibrateSearch_4_19_24\Human_Calibrated_Files"; + + string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Human_FlashLFQ_218_DonorPepQ_0pt2"; + + string[] myargs = new string[] + { + "--rep", + mzmlDirectoy, + "--idt", + psmFile, + "--pep", + peptideFile, + "--out", + outputPath, + "--donorq", + "0.002", "--pipfdr", - "0.05", + "0.01", "--ppm", "10" }; @@ -99,6 +228,352 @@ public static void SingleCellFcTest() Assert.That(File.Exists(proteinsPath)); //File.Delete(proteinsPath); } + + [Test] + public static void KellyTwoProteome() + { + string psmFile = @"D:\Kelly_TwoProteomeData\NineFileSearch_MM105\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\Kelly_TwoProteomeData\NineFileSearch_MM105\Task1-SearchTask\AllPeptides.psmtsv"; + + var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\TenFile_NewDataMM105\Task1-CalibrateTask"; + + string outputPath = @"D:\Kelly_TwoProteomeData\FlashLFQ_218_DonorPepQ_0pt2"; + + string[] myargs = new string[] + { + "--rep", + mzmlDirectoy, + "--idt", + psmFile, + "--pep", + peptideFile, + "--out", + outputPath, + "--donorq", + "0.002", + "--pipfdr", + "0.01", + "--ppm", + "10" + }; + + CMD.FlashLfqExecutable.Main(myargs); + + string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); + Assert.That(File.Exists(peaksPath)); + //File.Delete(peaksPath); + + string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); + Assert.That(File.Exists(peptidesPath)); + //File.Delete(peptidesPath); + + string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); + Assert.That(File.Exists(proteinsPath)); + //File.Delete(proteinsPath); + } + + [Test] + public static void KellyTwoProteomeCensored() + { + string psmFile = @"D:\Kelly_TwoProteomeData\CensoredDataFiles\MM105_Search\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\Kelly_TwoProteomeData\CensoredDataFiles\MM105_Search\Task1-SearchTask\AllPeptides.psmtsv"; + + var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\CensoredDataFiles"; + + string outputPath = @"D:\Kelly_TwoProteomeData\CensoredData_FlashLFQ_218_DonorPepQ_0pt2"; + + string[] myargs = new string[] + { + "--rep", + mzmlDirectoy, + "--idt", + psmFile, + "--pep", + peptideFile, + "--out", + outputPath, + "--donorq", + "0.002", + "--pipfdr", + "0.01", + "--ppm", + "10" + }; + + CMD.FlashLfqExecutable.Main(myargs); + + string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); + Assert.That(File.Exists(peaksPath)); + //File.Delete(peaksPath); + + string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); + Assert.That(File.Exists(peptidesPath)); + //File.Delete(peptidesPath); + + string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); + Assert.That(File.Exists(proteinsPath)); + //File.Delete(proteinsPath); + } + + + [Test] + [TestCase("02")] + [TestCase("1")] + [TestCase("5")] + public static void TestMetaMorpheusOutputIonStar(string donorQ) + { + string psmFile = @"D:\PXD003881_IonStar_SpikeIn\MM105_Cal_Search_Quant\Task2-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\PXD003881_IonStar_SpikeIn\MM105_Cal_Search_Quant\Task2-SearchTask\AllPeptides.psmtsv"; + + var mzmlDirectoy = @"D:\PXD003881_IonStar_SpikeIn\MM105_Cal_Search_Quant\Task1-CalibrateTask"; + + string outputBase = @"D:\PXD003881_IonStar_SpikeIn\FlashLFQ_218_Donor" + donorQ; + + string outputPath = outputBase + "_Pip2"; + + string[] myargs = new string[] + { + "--rep", + mzmlDirectoy, + "--idt", + psmFile, + "--pep", + peptideFile, + "--out", + outputPath, + "--donorq", + "0.0" + donorQ, + "--pipfdr", + "0.02", + "--ppm", + "10" + }; + + CMD.FlashLfqExecutable.Main(myargs); + + + string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); + Assert.That(File.Exists(peaksPath)); + //File.Delete(peaksPath); + + string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); + Assert.That(File.Exists(peptidesPath)); + //File.Delete(peptidesPath); + + string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); + Assert.That(File.Exists(proteinsPath)); + //File.Delete(proteinsPath); + + var results = FlashLfqExecutable.Results; + + //PIP PEP Threshold 0.01 + outputPath = outputBase + "_Pip1"; + Directory.CreateDirectory(outputPath); + results.MbrQValueThreshold = 0.01; + results.CalculatePeptideResults(false); + results.CalculateProteinResultsMedianPolish(false); + results.WriteResults( + peaksOutputPath: null, + modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), + proteinOutputPath: null, + bayesianProteinQuantOutput: null, + silent: false); + results.WriteResults( + peaksOutputPath: null, + modPeptideOutputPath: null, + proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), + bayesianProteinQuantOutput: null, + silent: false); + + //PIP PEP Threshold 0.10 + outputPath = outputBase + "_Pip10"; + Directory.CreateDirectory(outputPath); + results.MbrQValueThreshold = 0.1; + results.CalculatePeptideResults(false); + results.CalculateProteinResultsMedianPolish(false); + results.WriteResults( + peaksOutputPath: null, + modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), + proteinOutputPath: null, + bayesianProteinQuantOutput: null, + silent: false); + results.WriteResults( + peaksOutputPath: null, + modPeptideOutputPath: null, + proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), + bayesianProteinQuantOutput: null, + silent: false); + + // PIP PEP Threshold 1.00 + outputPath = outputBase + "_Pip100"; + Directory.CreateDirectory(outputPath); + results.MbrQValueThreshold = 1.0; + results.CalculatePeptideResults(false); + results.CalculateProteinResultsMedianPolish(false); + results.WriteResults( + peaksOutputPath: null, + modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), + proteinOutputPath: null, + bayesianProteinQuantOutput: null, + silent: false); + results.WriteResults( + peaksOutputPath: null, + modPeptideOutputPath: null, + proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), + bayesianProteinQuantOutput: null, + silent: false); + } + + + [Test] + //[TestCase("02")] + //[TestCase("1")] + [TestCase("5")] + public static void TestMetaMorpheusOutputSc(string donorQ) + { + string psmFile = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task2-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task2-SearchTask\AllPeptides.psmtsv"; + + var mzmlDirectoy = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task1-CalibrateTask\mzMLs"; + + string outputBase = @"D:\pepDesc_spikeIn\FlashLFQ_218_Donor" + donorQ; + + string outputPath = outputBase + "_Pip2"; + + string[] myargs = new string[] + { + "--rep", + mzmlDirectoy, + "--idt", + psmFile, + "--pep", + peptideFile, + "--out", + outputPath, + "--donorq", + "0.0" + donorQ, + "--pipfdr", + "0.02", + "--ppm", + "10" + }; + + CMD.FlashLfqExecutable.Main(myargs); + + string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); + Assert.That(File.Exists(peaksPath)); + //File.Delete(peaksPath); + + string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); + Assert.That(File.Exists(peptidesPath)); + //File.Delete(peptidesPath); + + string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); + Assert.That(File.Exists(proteinsPath)); + //File.Delete(proteinsPath); + + var results = FlashLfqExecutable.Results; + + //PIP PEP Threshold 0.01 + outputPath = outputBase + "_Pip1"; + Directory.CreateDirectory(outputPath); + results.MbrQValueThreshold = 0.01; + results.CalculatePeptideResults(false); + results.CalculateProteinResultsMedianPolish(false); + results.WriteResults( + peaksOutputPath: null, + modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), + proteinOutputPath: null, + bayesianProteinQuantOutput: null, + silent: false); + results.WriteResults( + peaksOutputPath: null, + modPeptideOutputPath: null, + proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), + bayesianProteinQuantOutput: null, + silent: false); + + //PIP PEP Threshold 0.10 + outputPath = outputBase + "_Pip10"; + Directory.CreateDirectory(outputPath); + results.MbrQValueThreshold = 0.1; + results.CalculatePeptideResults(false); + results.CalculateProteinResultsMedianPolish(false); + results.WriteResults( + peaksOutputPath: null, + modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), + proteinOutputPath: null, + bayesianProteinQuantOutput: null, + silent: false); + results.WriteResults( + peaksOutputPath: null, + modPeptideOutputPath: null, + proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), + bayesianProteinQuantOutput: null, + silent: false); + + // PIP PEP Threshold 1.00 + outputPath = outputBase + "_Pip100"; + Directory.CreateDirectory(outputPath); + results.MbrQValueThreshold = 1.0; + results.CalculatePeptideResults(false); + results.CalculateProteinResultsMedianPolish(false); + results.WriteResults( + peaksOutputPath: null, + modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), + proteinOutputPath: null, + bayesianProteinQuantOutput: null, + silent: false); + results.WriteResults( + peaksOutputPath: null, + modPeptideOutputPath: null, + proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), + bayesianProteinQuantOutput: null, + silent: false); + } + + //[Test] + //public static void SingleCellFcTest() + //{ + // string psmFile = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\Task1-SearchTask\AllPSMs.psmtsv"; + // string peptideFile = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\Task1-SearchTask\AllPeptides.psmtsv"; + + // var mzmlDirectoy = @"D:\SpikeIn_PXD001819\MetaMorpheus105_Cal_Search_Quant\Task1-CalibrateTask\FlashLFQ_Files"; + + // string outputPath = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\FlashLFQ_209_donor_1_pip_5"; + + // string[] myargs = new string[] + // { + // "--rep", + // mzmlDirectoy, + // "--idt", + // psmFile, + // "--pep", + // peptideFile, + // "--out", + // outputPath, + // "--donorq", + // "0.01", + // "--pipfdr", + // "0.02", + // "--ppm", + // "10" + // }; + + // CMD.FlashLfqExecutable.Main(myargs); + + // string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); + // Assert.That(File.Exists(peaksPath)); + // //File.Delete(peaksPath); + + // string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); + // Assert.That(File.Exists(peptidesPath)); + // //File.Delete(peptidesPath); + + // string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); + // Assert.That(File.Exists(proteinsPath)); + // //File.Delete(proteinsPath); + //} } diff --git a/Test/Test.csproj b/Test/Test.csproj index 60aa78e..7dc8325 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -15,7 +15,7 @@ - + diff --git a/Util/OutputWriter.cs b/Util/OutputWriter.cs index 914f97b..c5b20cc 100644 --- a/Util/OutputWriter.cs +++ b/Util/OutputWriter.cs @@ -24,6 +24,7 @@ public static void WriteOutput(string inputPath, FlashLfqResults results, bool s bool bayesianResults = results.ProteinGroups.Any(p => p.Value.ConditionToQuantificationResults.Any()); + results.WritePepResults(Path.Combine(outputPath, "PEPAnalysis.txt")); results.WriteResults( Path.Combine(outputPath, "QuantifiedPeaks.tsv"), Path.Combine(outputPath, "QuantifiedPeptides.tsv"), diff --git a/Util/PsmReader.cs b/Util/PsmReader.cs index 74104cf..a762acf 100644 --- a/Util/PsmReader.cs +++ b/Util/PsmReader.cs @@ -182,10 +182,10 @@ private static Identification GetIdentification(string line, bool silent, Dictio // only quantify PSMs below 1% notch FDR with MetaMorpheus/Morpheus results - if (fileType == PsmFileType.MetaMorpheus && double.Parse(param[_qValueNotchCol], CultureInfo.InvariantCulture) > qValueThreshold) - { - return null; - } + //if (fileType == PsmFileType.MetaMorpheus && double.Parse(param[_qValueNotchCol], CultureInfo.InvariantCulture) > qValueThreshold) + //{ + // return null; + //} // skip decoys with MetaMorpheus/Morpheus results //TODO: what about decoys from other input types? @@ -590,8 +590,12 @@ private static PsmFileType GetFileTypeFromHeader(string header) _protNameCol = Array.IndexOf(split, "Protein Accession".ToLowerInvariant()); _decoyCol = Array.IndexOf(split, "Decoy/Contaminant/Target".ToLowerInvariant()); _scoreCol = Array.IndexOf(split, "Score".ToLowerInvariant()); - _qValueCol = Array.IndexOf(split, "QValue".ToLowerInvariant()); - _qValueNotchCol = Array.IndexOf(split, "QValue Notch".ToLowerInvariant()); + //_qValueCol = Array.IndexOf(split, "QValue".ToLowerInvariant()); + //_qValueNotchCol = Array.IndexOf(split, "QValue Notch".ToLowerInvariant()); + + // TODO: WARNING - this is a fucked up hack. I'm using pep-q value for both Q value and q value notch + _qValueCol = Array.IndexOf(split, "PEP_QValue".ToLowerInvariant()); + _qValueNotchCol = Array.IndexOf(split, "PEP_QValue".ToLowerInvariant()); _geneNameCol = Array.IndexOf(split, "Gene Name".ToLowerInvariant()); _organismCol = Array.IndexOf(split, "Organism Name".ToLowerInvariant()); diff --git a/Util/Util.csproj b/Util/Util.csproj index b181567..ea6f907 100644 --- a/Util/Util.csproj +++ b/Util/Util.csproj @@ -15,7 +15,7 @@ - + From 950e8e8a6f5784b715b0668c5832c15358a725d0 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 26 Jun 2024 22:23:16 -0500 Subject: [PATCH 06/19] minodr --- CMD/CMD.csproj | 2 +- GUI/GUI.csproj | 2 +- Test/LocalFileRunner.cs | 229 +++++++++++++++++++++------------------- Test/Test.csproj | 2 +- Util/OutputWriter.cs | 2 +- Util/Util.csproj | 2 +- 6 files changed, 123 insertions(+), 116 deletions(-) diff --git a/CMD/CMD.csproj b/CMD/CMD.csproj index 94a4b77..a6e6b6b 100644 --- a/CMD/CMD.csproj +++ b/CMD/CMD.csproj @@ -17,7 +17,7 @@ - + diff --git a/GUI/GUI.csproj b/GUI/GUI.csproj index 80b82e1..855a56d 100644 --- a/GUI/GUI.csproj +++ b/GUI/GUI.csproj @@ -17,7 +17,7 @@ - + diff --git a/Test/LocalFileRunner.cs b/Test/LocalFileRunner.cs index 6019a63..33f451f 100644 --- a/Test/LocalFileRunner.cs +++ b/Test/LocalFileRunner.cs @@ -22,7 +22,7 @@ public static void GygiTwoProteome() var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\MM105_Calibration_Search_MBR\Task1-CalibrateTask"; - string outputPath = @"D:\GygiTwoProteome_PXD014415\FlashLFQ_218_DonorPepQ_0pt2"; + string outputPath = @"D:\GygiTwoProteome_PXD014415\FlashLFQ_301_DonorPepQ_0pt2"; string[] myargs = new string[] { @@ -65,7 +65,7 @@ public static void GygiTwoProteomeCensored() var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\CensoredDataFiles"; - string outputPath = @"D:\GygiTwoProteome_PXD014415\CensoredData_FlashLFQ_218_DonorPepQ_0pt2"; + string outputPath = @"D:\GygiTwoProteome_PXD014415\CensoredData_FlashLFQ_301_DonorPepQ_0pt2"; string[] myargs = new string[] { @@ -100,48 +100,48 @@ public static void GygiTwoProteomeCensored() //File.Delete(proteinsPath); } - [Test] - public static void InHouseTwoProteomeEcoli() - { - string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\mm105_Ecoli_Mixed\Task1-SearchTask\AllPSMs.psmtsv"; - string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\mm105_Ecoli_Mixed\Task1-SearchTask\AllPeptides.psmtsv"; + //[Test] + //public static void InHouseTwoProteomeEcoli() + //{ + // string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\mm105_Ecoli_Mixed\Task1-SearchTask\AllPSMs.psmtsv"; + // string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\mm105_Ecoli_Mixed\Task1-SearchTask\AllPeptides.psmtsv"; - var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\CalibrateSearch_4_19_24\EColi_Calibrated_Files"; + // var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\CalibrateSearch_4_19_24\EColi_Calibrated_Files"; - string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Ecoli_FlashLFQ_218_DonorPepQ_0pt2"; + // string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Ecoli_FlashLFQ_301_DonorPepQ_0pt2"; - string[] myargs = new string[] - { - "--rep", - mzmlDirectoy, - "--idt", - psmFile, - "--pep", - peptideFile, - "--out", - outputPath, - "--donorq", - "0.002", - "--pipfdr", - "0.01", - "--ppm", - "10" - }; + // string[] myargs = new string[] + // { + // "--rep", + // mzmlDirectoy, + // "--idt", + // psmFile, + // "--pep", + // peptideFile, + // "--out", + // outputPath, + // "--donorq", + // "0.002", + // "--pipfdr", + // "0.01", + // "--ppm", + // "10" + // }; - CMD.FlashLfqExecutable.Main(myargs); + // CMD.FlashLfqExecutable.Main(myargs); - string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); - Assert.That(File.Exists(peaksPath)); - //File.Delete(peaksPath); + // string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); + // Assert.That(File.Exists(peaksPath)); + // //File.Delete(peaksPath); - string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); - Assert.That(File.Exists(peptidesPath)); - //File.Delete(peptidesPath); + // string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); + // Assert.That(File.Exists(peptidesPath)); + // //File.Delete(peptidesPath); - string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); - Assert.That(File.Exists(proteinsPath)); - //File.Delete(proteinsPath); - } + // string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); + // Assert.That(File.Exists(proteinsPath)); + // //File.Delete(proteinsPath); + //} [Test] public static void InHouseTwoProteomeHumanCensored() @@ -151,7 +151,7 @@ public static void InHouseTwoProteomeHumanCensored() var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHumanData"; - string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHuman_FlashLFQ_218_DonorPepQ_0pt2"; + string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHuman_FlashLFQ_301_DonorPepQ_0pt2"; string[] myargs = new string[] { @@ -194,7 +194,7 @@ public static void InHouseTwoProteomeHuman() var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\CalibrateSearch_4_19_24\Human_Calibrated_Files"; - string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Human_FlashLFQ_218_DonorPepQ_0pt2"; + string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Human_FlashLFQ_301_DonorPepQ_0pt2"; string[] myargs = new string[] { @@ -237,7 +237,7 @@ public static void KellyTwoProteome() var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\TenFile_NewDataMM105\Task1-CalibrateTask"; - string outputPath = @"D:\Kelly_TwoProteomeData\FlashLFQ_218_DonorPepQ_0pt2"; + string outputPath = @"D:\Kelly_TwoProteomeData\FlashLFQ_301_DonorPepQ_0pt2"; string[] myargs = new string[] { @@ -280,7 +280,7 @@ public static void KellyTwoProteomeCensored() var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\CensoredDataFiles"; - string outputPath = @"D:\Kelly_TwoProteomeData\CensoredData_FlashLFQ_218_DonorPepQ_0pt2"; + string outputPath = @"D:\Kelly_TwoProteomeData\CensoredData_FlashLFQ_301_DonorPepQ_0pt2"; string[] myargs = new string[] { @@ -327,9 +327,9 @@ public static void TestMetaMorpheusOutputIonStar(string donorQ) var mzmlDirectoy = @"D:\PXD003881_IonStar_SpikeIn\MM105_Cal_Search_Quant\Task1-CalibrateTask"; - string outputBase = @"D:\PXD003881_IonStar_SpikeIn\FlashLFQ_218_Donor" + donorQ; + string outputBase = @"D:\PXD003881_IonStar_SpikeIn\FlashLFQ_302_Normed_Donor" + donorQ; - string outputPath = outputBase + "_Pip2"; + string outputPath = outputBase + "_Pip5"; string[] myargs = new string[] { @@ -344,9 +344,13 @@ public static void TestMetaMorpheusOutputIonStar(string donorQ) "--donorq", "0.0" + donorQ, "--pipfdr", - "0.02", + "0.05", "--ppm", - "10" + "10", + "--thr", + "10", + "--nor", + "true" }; CMD.FlashLfqExecutable.Main(myargs); @@ -366,10 +370,11 @@ public static void TestMetaMorpheusOutputIonStar(string donorQ) var results = FlashLfqExecutable.Results; - //PIP PEP Threshold 0.01 - outputPath = outputBase + "_Pip1"; + //PIP PEP Threshold 0.02 + outputPath = outputBase + "_Pip2"; Directory.CreateDirectory(outputPath); - results.MbrQValueThreshold = 0.01; + results.MbrQValueThreshold = 0.02; + results.ReNormalizeResults(); results.CalculatePeptideResults(false); results.CalculateProteinResultsMedianPolish(false); results.WriteResults( @@ -389,6 +394,7 @@ public static void TestMetaMorpheusOutputIonStar(string donorQ) outputPath = outputBase + "_Pip10"; Directory.CreateDirectory(outputPath); results.MbrQValueThreshold = 0.1; + results.ReNormalizeResults(); results.CalculatePeptideResults(false); results.CalculateProteinResultsMedianPolish(false); results.WriteResults( @@ -408,6 +414,7 @@ public static void TestMetaMorpheusOutputIonStar(string donorQ) outputPath = outputBase + "_Pip100"; Directory.CreateDirectory(outputPath); results.MbrQValueThreshold = 1.0; + results.ReNormalizeResults(); results.CalculatePeptideResults(false); results.CalculateProteinResultsMedianPolish(false); results.WriteResults( @@ -426,8 +433,8 @@ public static void TestMetaMorpheusOutputIonStar(string donorQ) [Test] - //[TestCase("02")] - //[TestCase("1")] + [TestCase("02")] + [TestCase("1")] [TestCase("5")] public static void TestMetaMorpheusOutputSc(string donorQ) { @@ -436,9 +443,9 @@ public static void TestMetaMorpheusOutputSc(string donorQ) var mzmlDirectoy = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task1-CalibrateTask\mzMLs"; - string outputBase = @"D:\pepDesc_spikeIn\FlashLFQ_218_Donor" + donorQ; + string outputBase = @"D:\pepDesc_spikeIn\FlashLFQ_301_Donor" + donorQ; - string outputPath = outputBase + "_Pip2"; + string outputPath = outputBase + "_Pip5"; string[] myargs = new string[] { @@ -453,7 +460,7 @@ public static void TestMetaMorpheusOutputSc(string donorQ) "--donorq", "0.0" + donorQ, "--pipfdr", - "0.02", + "0.05", "--ppm", "10" }; @@ -472,64 +479,64 @@ public static void TestMetaMorpheusOutputSc(string donorQ) Assert.That(File.Exists(proteinsPath)); //File.Delete(proteinsPath); - var results = FlashLfqExecutable.Results; - - //PIP PEP Threshold 0.01 - outputPath = outputBase + "_Pip1"; - Directory.CreateDirectory(outputPath); - results.MbrQValueThreshold = 0.01; - results.CalculatePeptideResults(false); - results.CalculateProteinResultsMedianPolish(false); - results.WriteResults( - peaksOutputPath: null, - modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), - proteinOutputPath: null, - bayesianProteinQuantOutput: null, - silent: false); - results.WriteResults( - peaksOutputPath: null, - modPeptideOutputPath: null, - proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), - bayesianProteinQuantOutput: null, - silent: false); - - //PIP PEP Threshold 0.10 - outputPath = outputBase + "_Pip10"; - Directory.CreateDirectory(outputPath); - results.MbrQValueThreshold = 0.1; - results.CalculatePeptideResults(false); - results.CalculateProteinResultsMedianPolish(false); - results.WriteResults( - peaksOutputPath: null, - modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), - proteinOutputPath: null, - bayesianProteinQuantOutput: null, - silent: false); - results.WriteResults( - peaksOutputPath: null, - modPeptideOutputPath: null, - proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), - bayesianProteinQuantOutput: null, - silent: false); - - // PIP PEP Threshold 1.00 - outputPath = outputBase + "_Pip100"; - Directory.CreateDirectory(outputPath); - results.MbrQValueThreshold = 1.0; - results.CalculatePeptideResults(false); - results.CalculateProteinResultsMedianPolish(false); - results.WriteResults( - peaksOutputPath: null, - modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), - proteinOutputPath: null, - bayesianProteinQuantOutput: null, - silent: false); - results.WriteResults( - peaksOutputPath: null, - modPeptideOutputPath: null, - proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), - bayesianProteinQuantOutput: null, - silent: false); + //var results = FlashLfqExecutable.Results; + + ////PIP PEP Threshold 0.01 + //outputPath = outputBase + "_Pip1"; + //Directory.CreateDirectory(outputPath); + //results.MbrQValueThreshold = 0.01; + //results.CalculatePeptideResults(false); + //results.CalculateProteinResultsMedianPolish(false); + //results.WriteResults( + // peaksOutputPath: null, + // modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), + // proteinOutputPath: null, + // bayesianProteinQuantOutput: null, + // silent: false); + //results.WriteResults( + // peaksOutputPath: null, + // modPeptideOutputPath: null, + // proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), + // bayesianProteinQuantOutput: null, + // silent: false); + + ////PIP PEP Threshold 0.10 + //outputPath = outputBase + "_Pip10"; + //Directory.CreateDirectory(outputPath); + //results.MbrQValueThreshold = 0.1; + //results.CalculatePeptideResults(false); + //results.CalculateProteinResultsMedianPolish(false); + //results.WriteResults( + // peaksOutputPath: null, + // modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), + // proteinOutputPath: null, + // bayesianProteinQuantOutput: null, + // silent: false); + //results.WriteResults( + // peaksOutputPath: null, + // modPeptideOutputPath: null, + // proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), + // bayesianProteinQuantOutput: null, + // silent: false); + + //// PIP PEP Threshold 1.00 + //outputPath = outputBase + "_Pip100"; + //Directory.CreateDirectory(outputPath); + //results.MbrQValueThreshold = 1.0; + //results.CalculatePeptideResults(false); + //results.CalculateProteinResultsMedianPolish(false); + //results.WriteResults( + // peaksOutputPath: null, + // modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), + // proteinOutputPath: null, + // bayesianProteinQuantOutput: null, + // silent: false); + //results.WriteResults( + // peaksOutputPath: null, + // modPeptideOutputPath: null, + // proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), + // bayesianProteinQuantOutput: null, + // silent: false); } //[Test] diff --git a/Test/Test.csproj b/Test/Test.csproj index 7dc8325..de9dca6 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -15,7 +15,7 @@ - + diff --git a/Util/OutputWriter.cs b/Util/OutputWriter.cs index c5b20cc..3835c20 100644 --- a/Util/OutputWriter.cs +++ b/Util/OutputWriter.cs @@ -24,7 +24,7 @@ public static void WriteOutput(string inputPath, FlashLfqResults results, bool s bool bayesianResults = results.ProteinGroups.Any(p => p.Value.ConditionToQuantificationResults.Any()); - results.WritePepResults(Path.Combine(outputPath, "PEPAnalysis.txt")); + //results.WritePepResults(Path.Combine(outputPath, "PEPAnalysis.txt")); results.WriteResults( Path.Combine(outputPath, "QuantifiedPeaks.tsv"), Path.Combine(outputPath, "QuantifiedPeptides.tsv"), diff --git a/Util/Util.csproj b/Util/Util.csproj index ea6f907..7a62c60 100644 --- a/Util/Util.csproj +++ b/Util/Util.csproj @@ -15,7 +15,7 @@ - + From 7e90877a0e3bfbb0f0f7294989e0c2f3aad32af1 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 2 Jul 2024 12:59:34 -0500 Subject: [PATCH 07/19] minor --- Test/LocalFileRunner.cs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Test/LocalFileRunner.cs b/Test/LocalFileRunner.cs index 33f451f..4104d12 100644 --- a/Test/LocalFileRunner.cs +++ b/Test/LocalFileRunner.cs @@ -22,7 +22,7 @@ public static void GygiTwoProteome() var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\MM105_Calibration_Search_MBR\Task1-CalibrateTask"; - string outputPath = @"D:\GygiTwoProteome_PXD014415\FlashLFQ_301_DonorPepQ_0pt2"; + string outputPath = @"D:\GygiTwoProteome_PXD014415\FlashLFQ_301_DonorPepQ_0pt1"; string[] myargs = new string[] { @@ -35,7 +35,7 @@ public static void GygiTwoProteome() "--out", outputPath, "--donorq", - "0.002", + "0.001", "--pipfdr", "0.01", "--ppm", @@ -65,7 +65,7 @@ public static void GygiTwoProteomeCensored() var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\CensoredDataFiles"; - string outputPath = @"D:\GygiTwoProteome_PXD014415\CensoredData_FlashLFQ_301_DonorPepQ_0pt2"; + string outputPath = @"D:\GygiTwoProteome_PXD014415\CensoredData_FlashLFQ_302_DonorPepQ_0pt1"; string[] myargs = new string[] { @@ -78,7 +78,7 @@ public static void GygiTwoProteomeCensored() "--out", outputPath, "--donorq", - "0.002", + "0.001", "--pipfdr", "0.01", "--ppm", @@ -108,7 +108,7 @@ public static void GygiTwoProteomeCensored() // var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\CalibrateSearch_4_19_24\EColi_Calibrated_Files"; - // string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Ecoli_FlashLFQ_301_DonorPepQ_0pt2"; + // string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Ecoli_FlashLFQ_301_DonorPepQ_0pt1"; // string[] myargs = new string[] // { @@ -121,7 +121,7 @@ public static void GygiTwoProteomeCensored() // "--out", // outputPath, // "--donorq", - // "0.002", + // "0.001", // "--pipfdr", // "0.01", // "--ppm", @@ -151,7 +151,7 @@ public static void InHouseTwoProteomeHumanCensored() var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHumanData"; - string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHuman_FlashLFQ_301_DonorPepQ_0pt2"; + string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHuman_FlashLFQ_302_DonorPepQ_0pt1"; string[] myargs = new string[] { @@ -164,7 +164,7 @@ public static void InHouseTwoProteomeHumanCensored() "--out", outputPath, "--donorq", - "0.002", + "0.001", "--pipfdr", "0.01", "--ppm", @@ -194,7 +194,7 @@ public static void InHouseTwoProteomeHuman() var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\CalibrateSearch_4_19_24\Human_Calibrated_Files"; - string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Human_FlashLFQ_301_DonorPepQ_0pt2"; + string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Human_FlashLFQ_302_DonorPepQ_0pt1"; string[] myargs = new string[] { @@ -207,7 +207,7 @@ public static void InHouseTwoProteomeHuman() "--out", outputPath, "--donorq", - "0.002", + "0.001", "--pipfdr", "0.01", "--ppm", @@ -237,7 +237,7 @@ public static void KellyTwoProteome() var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\TenFile_NewDataMM105\Task1-CalibrateTask"; - string outputPath = @"D:\Kelly_TwoProteomeData\FlashLFQ_301_DonorPepQ_0pt2"; + string outputPath = @"D:\Kelly_TwoProteomeData\FlashLFQ_302_DonorPepQ_0pt1"; string[] myargs = new string[] { @@ -250,7 +250,7 @@ public static void KellyTwoProteome() "--out", outputPath, "--donorq", - "0.002", + "0.001", "--pipfdr", "0.01", "--ppm", @@ -280,7 +280,7 @@ public static void KellyTwoProteomeCensored() var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\CensoredDataFiles"; - string outputPath = @"D:\Kelly_TwoProteomeData\CensoredData_FlashLFQ_301_DonorPepQ_0pt2"; + string outputPath = @"D:\Kelly_TwoProteomeData\CensoredData_FlashLFQ_302_DonorPepQ_0pt1"; string[] myargs = new string[] { @@ -293,7 +293,7 @@ public static void KellyTwoProteomeCensored() "--out", outputPath, "--donorq", - "0.002", + "0.001", "--pipfdr", "0.01", "--ppm", From 1ce1497663190b069284e36171bb4bf33ac17de5 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 5 Jul 2024 10:52:00 -0500 Subject: [PATCH 08/19] minor --- CMD/CMD.csproj | 2 +- GUI/GUI.csproj | 2 +- Test/LocalFileRunner.cs | 12 ++++++------ Test/Test.csproj | 2 +- Util/Util.csproj | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CMD/CMD.csproj b/CMD/CMD.csproj index a6e6b6b..020892d 100644 --- a/CMD/CMD.csproj +++ b/CMD/CMD.csproj @@ -17,7 +17,7 @@ - + diff --git a/GUI/GUI.csproj b/GUI/GUI.csproj index 855a56d..f8cd095 100644 --- a/GUI/GUI.csproj +++ b/GUI/GUI.csproj @@ -17,7 +17,7 @@ - + diff --git a/Test/LocalFileRunner.cs b/Test/LocalFileRunner.cs index 4104d12..c3d4876 100644 --- a/Test/LocalFileRunner.cs +++ b/Test/LocalFileRunner.cs @@ -22,7 +22,7 @@ public static void GygiTwoProteome() var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\MM105_Calibration_Search_MBR\Task1-CalibrateTask"; - string outputPath = @"D:\GygiTwoProteome_PXD014415\FlashLFQ_301_DonorPepQ_0pt1"; + string outputPath = @"D:\GygiTwoProteome_PXD014415\FlashLFQ_303_DonorPepQ_0pt1"; string[] myargs = new string[] { @@ -65,7 +65,7 @@ public static void GygiTwoProteomeCensored() var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\CensoredDataFiles"; - string outputPath = @"D:\GygiTwoProteome_PXD014415\CensoredData_FlashLFQ_302_DonorPepQ_0pt1"; + string outputPath = @"D:\GygiTwoProteome_PXD014415\CensoredData_FlashLFQ_303_DonorPepQ_0pt1"; string[] myargs = new string[] { @@ -151,7 +151,7 @@ public static void InHouseTwoProteomeHumanCensored() var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHumanData"; - string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHuman_FlashLFQ_302_DonorPepQ_0pt1"; + string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHuman_FlashLFQ_303_DonorPepQ_0pt1"; string[] myargs = new string[] { @@ -194,7 +194,7 @@ public static void InHouseTwoProteomeHuman() var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\CalibrateSearch_4_19_24\Human_Calibrated_Files"; - string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Human_FlashLFQ_302_DonorPepQ_0pt1"; + string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Human_FlashLFQ_303_DonorPepQ_0pt1"; string[] myargs = new string[] { @@ -237,7 +237,7 @@ public static void KellyTwoProteome() var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\TenFile_NewDataMM105\Task1-CalibrateTask"; - string outputPath = @"D:\Kelly_TwoProteomeData\FlashLFQ_302_DonorPepQ_0pt1"; + string outputPath = @"D:\Kelly_TwoProteomeData\FlashLFQ_303_DonorPepQ_0pt1"; string[] myargs = new string[] { @@ -280,7 +280,7 @@ public static void KellyTwoProteomeCensored() var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\CensoredDataFiles"; - string outputPath = @"D:\Kelly_TwoProteomeData\CensoredData_FlashLFQ_302_DonorPepQ_0pt1"; + string outputPath = @"D:\Kelly_TwoProteomeData\CensoredData_FlashLFQ_303_DonorPepQ_0pt1"; string[] myargs = new string[] { diff --git a/Test/Test.csproj b/Test/Test.csproj index de9dca6..985fbe4 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -15,7 +15,7 @@ - + diff --git a/Util/Util.csproj b/Util/Util.csproj index 7a62c60..01c672b 100644 --- a/Util/Util.csproj +++ b/Util/Util.csproj @@ -15,7 +15,7 @@ - + From 4a5af780dce81a83b070ea8816430bb954c9a9eb Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 13 Aug 2024 12:37:22 -0500 Subject: [PATCH 09/19] Updated nuget --- CMD/CMD.csproj | 2 +- GUI/GUI.csproj | 2 +- Test/LocalFileRunner.cs | 169 +++++++++++++++++++-------------------- Test/Test.csproj | 2 +- Util/FlashLfqSettings.cs | 6 +- Util/Util.csproj | 2 +- 6 files changed, 91 insertions(+), 92 deletions(-) diff --git a/CMD/CMD.csproj b/CMD/CMD.csproj index 020892d..30bbb8c 100644 --- a/CMD/CMD.csproj +++ b/CMD/CMD.csproj @@ -17,7 +17,7 @@ - + diff --git a/GUI/GUI.csproj b/GUI/GUI.csproj index f8cd095..c981587 100644 --- a/GUI/GUI.csproj +++ b/GUI/GUI.csproj @@ -17,7 +17,7 @@ - + diff --git a/Test/LocalFileRunner.cs b/Test/LocalFileRunner.cs index c3d4876..db8972f 100644 --- a/Test/LocalFileRunner.cs +++ b/Test/LocalFileRunner.cs @@ -1,5 +1,6 @@ using CMD; using FlashLFQ; +using FlashLFQ.PEP; using IO.MzML; using MzLibUtil; using NUnit.Framework; @@ -7,6 +8,8 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using System.Threading.Tasks; +using ThermoFisher.CommonCore.Data.Interfaces; using Util; namespace Test @@ -14,15 +17,25 @@ namespace Test [TestFixture] internal class LocalFileRunner { + [Test] - public static void GygiTwoProteome() + [TestCase("01")] + [TestCase("02")] + [TestCase("05")] + [TestCase("1")] + public static void GygiTwoProteome(string donorQ) { - string psmFile = @"D:\GygiTwoProteome_PXD014415\Yeast_Human_Arabad_Contam_search\AllPSMs.psmtsv"; - string peptideFile = @"D:\GygiTwoProteome_PXD014415\Yeast_Human_Arabad_Contam_search\AllPeptides.psmtsv"; + //string psmFile = @"D:\GygiTwoProteome_PXD014415\Yeast_Human_Arabad_Contam_search\AllPSMs.psmtsv"; + //string peptideFile = @"D:\GygiTwoProteome_PXD014415\Yeast_Human_Arabad_Contam_search\AllPeptides.psmtsv"; + + //var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\MM105_Calibration_Search_MBR\Task1-CalibrateTask"; - var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\MM105_Calibration_Search_MBR\Task1-CalibrateTask"; + string psmFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_NewPep_NewDB\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_NewPep_NewDB\Task1-SearchTask\AllPeptides.psmtsv"; + var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_NewPepSearch\Task1-CalibrateTask"; - string outputPath = @"D:\GygiTwoProteome_PXD014415\FlashLFQ_303_DonorPepQ_0pt1"; + + string outputPath = @"D:\GygiTwoProteome_PXD014415\FlashLFQ_329_DonorPepQ_" + donorQ + "_NewDb"; string[] myargs = new string[] { @@ -35,7 +48,7 @@ public static void GygiTwoProteome() "--out", outputPath, "--donorq", - "0.001", + "0.0" + donorQ, "--pipfdr", "0.01", "--ppm", @@ -58,14 +71,18 @@ public static void GygiTwoProteome() } [Test] - public static void GygiTwoProteomeCensored() + [TestCase("01")] + [TestCase("02")] + [TestCase("05")] + [TestCase("1")] + public static void GygiTwoProteomeCensored(string donorQ) { - string psmFile = @"D:\GygiTwoProteome_PXD014415\CensoredDataFiles\MM105_Search\Task1-SearchTask\AllPSMs.psmtsv"; - string peptideFile = @"D:\GygiTwoProteome_PXD014415\CensoredDataFiles\MM105_Search\Task1-SearchTask\AllPeptides.psmtsv"; - var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\CensoredDataFiles"; + string psmFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_NewPep_CensoredMzmls\NewDbSearch\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_NewPep_CensoredMzmls\NewDbSearch\Task1-SearchTask\AllPeptides.psmtsv"; + var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_NewPep_CensoredMzmls"; - string outputPath = @"D:\GygiTwoProteome_PXD014415\CensoredData_FlashLFQ_303_DonorPepQ_0pt1"; + string outputPath = @"D:\GygiTwoProteome_PXD014415\CensoredData_FlashLFQ_329_DonorPepQ_" + donorQ + "_NewDb"; string[] myargs = new string[] { @@ -78,7 +95,7 @@ public static void GygiTwoProteomeCensored() "--out", outputPath, "--donorq", - "0.001", + "0.0" + donorQ, "--pipfdr", "0.01", "--ppm", @@ -100,58 +117,20 @@ public static void GygiTwoProteomeCensored() //File.Delete(proteinsPath); } - //[Test] - //public static void InHouseTwoProteomeEcoli() - //{ - // string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\mm105_Ecoli_Mixed\Task1-SearchTask\AllPSMs.psmtsv"; - // string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\mm105_Ecoli_Mixed\Task1-SearchTask\AllPeptides.psmtsv"; - - // var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\CalibrateSearch_4_19_24\EColi_Calibrated_Files"; - - // string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Ecoli_FlashLFQ_301_DonorPepQ_0pt1"; - - // string[] myargs = new string[] - // { - // "--rep", - // mzmlDirectoy, - // "--idt", - // psmFile, - // "--pep", - // peptideFile, - // "--out", - // outputPath, - // "--donorq", - // "0.001", - // "--pipfdr", - // "0.01", - // "--ppm", - // "10" - // }; - - // CMD.FlashLfqExecutable.Main(myargs); - - // string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); - // Assert.That(File.Exists(peaksPath)); - // //File.Delete(peaksPath); - - // string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); - // Assert.That(File.Exists(peptidesPath)); - // //File.Delete(peptidesPath); - - // string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); - // Assert.That(File.Exists(proteinsPath)); - // //File.Delete(proteinsPath); - //} [Test] - public static void InHouseTwoProteomeHumanCensored() + [TestCase("01")] + [TestCase("02")] + [TestCase("05")] + [TestCase("1")] + public static void InHouseTwoProteomeHuman(string donorQ) { - string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHumanData\MM105_Search\Task1-SearchTask\AllPSMs.psmtsv"; - string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHumanData\MM105_Search\Task1-SearchTask\AllPeptides.psmtsv"; + string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_NewPep_NewEntrapment\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_NewPep_NewEntrapment\Task1-SearchTask\AllPeptides.psmtsv"; - var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHumanData"; + var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MMNewPep_CalSearch\Task1-CalibrateTask"; - string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHuman_FlashLFQ_303_DonorPepQ_0pt1"; + string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Human_FlashLFQ_329_DonorPepQ_" + donorQ + "_NewDb"; string[] myargs = new string[] { @@ -164,7 +143,7 @@ public static void InHouseTwoProteomeHumanCensored() "--out", outputPath, "--donorq", - "0.001", + "0.0" + donorQ, "--pipfdr", "0.01", "--ppm", @@ -187,14 +166,18 @@ public static void InHouseTwoProteomeHumanCensored() } [Test] - public static void InHouseTwoProteomeHuman() + [TestCase("01")] + [TestCase("02")] + [TestCase("05")] + [TestCase("1")] + public static void InHouseTwoProteomeHumanCensored(string donorQ) { - string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\MM105_Human_Mixed\Task1-SearchTask\AllPSMs.psmtsv"; - string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\MM105_Human_Mixed\Task1-SearchTask\AllPeptides.psmtsv"; + string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_CensoredMzml_8_3_24\NewDbSearch\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_CensoredMzml_8_3_24\NewDbSearch\Task1-SearchTask\AllPeptides.psmtsv"; - var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\CalibrateSearch_4_19_24\Human_Calibrated_Files"; + var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_CensoredMzml_8_3_24"; - string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Human_FlashLFQ_303_DonorPepQ_0pt1"; + string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHuman_FlashLFQ_329_DonorPepQ_" + donorQ + "_NewDb"; string[] myargs = new string[] { @@ -207,7 +190,7 @@ public static void InHouseTwoProteomeHuman() "--out", outputPath, "--donorq", - "0.001", + "0.0" + donorQ, "--pipfdr", "0.01", "--ppm", @@ -230,14 +213,20 @@ public static void InHouseTwoProteomeHuman() } [Test] - public static void KellyTwoProteome() + [TestCase("01")] + [TestCase("02")] + [TestCase("05")] + [TestCase("1")] + public static void KellyTwoProteome(string donorQ) { - string psmFile = @"D:\Kelly_TwoProteomeData\NineFileSearch_MM105\Task1-SearchTask\AllPSMs.psmtsv"; - string peptideFile = @"D:\Kelly_TwoProteomeData\NineFileSearch_MM105\Task1-SearchTask\AllPeptides.psmtsv"; + //string psmFile = @"D:\Kelly_TwoProteomeData\NineFileSearch_MM105\Task1-SearchTask\AllPSMs.psmtsv"; + string psmFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_NewPEP_NewEntrapment\Task1-SearchTask\AllPSMs.psmtsv"; + //string peptideFile = @"D:\Kelly_TwoProteomeData\NineFileSearch_MM105\Task1-SearchTask\AllPeptides.psmtsv"; + string peptideFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_NewPEP_NewEntrapment\Task1-SearchTask\AllPeptides.psmtsv"; - var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\TenFile_NewDataMM105\Task1-CalibrateTask"; + var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MetaMorpheusNewPepSearch\Task1-CalibrateTask"; - string outputPath = @"D:\Kelly_TwoProteomeData\FlashLFQ_303_DonorPepQ_0pt1"; + string outputPath = @"D:\Kelly_TwoProteomeData\FlashLFQ_329_DonorPepQ_" + donorQ + "_NewDb"; string[] myargs = new string[] { @@ -250,7 +239,7 @@ public static void KellyTwoProteome() "--out", outputPath, "--donorq", - "0.001", + "0.0" + donorQ, "--pipfdr", "0.01", "--ppm", @@ -265,7 +254,6 @@ public static void KellyTwoProteome() string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); Assert.That(File.Exists(peptidesPath)); - //File.Delete(peptidesPath); string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); Assert.That(File.Exists(proteinsPath)); @@ -273,14 +261,21 @@ public static void KellyTwoProteome() } [Test] - public static void KellyTwoProteomeCensored() + [TestCase("01")] + [TestCase("02")] + [TestCase("05")] + [TestCase("1")] + public static void KellyTwoProteomeCensored(string donorQ) { - string psmFile = @"D:\Kelly_TwoProteomeData\CensoredDataFiles\MM105_Search\Task1-SearchTask\AllPSMs.psmtsv"; - string peptideFile = @"D:\Kelly_TwoProteomeData\CensoredDataFiles\MM105_Search\Task1-SearchTask\AllPeptides.psmtsv"; + //string psmFile = @"D:\Kelly_TwoProteomeData\CensoredDataFiles_7_22_24\MM105_Search\Task1-SearchTask\AllPSMs.psmtsv"; + //string peptideFile = @"D:\Kelly_TwoProteomeData\CensoredDataFiles_7_22_24\MM105_Search\Task1-SearchTask\AllPeptides.psmtsv"; + + string psmFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_Censored_8_2_24\NewPep_NewEntrapment\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_Censored_8_2_24\NewPep_NewEntrapment\Task1-SearchTask\AllPeptides.psmtsv"; - var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\CensoredDataFiles"; + var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_Censored_8_2_24"; - string outputPath = @"D:\Kelly_TwoProteomeData\CensoredData_FlashLFQ_303_DonorPepQ_0pt1"; + string outputPath = @"D:\Kelly_TwoProteomeData\CensoredData_FlashLFQ_329_DonorPepQ_" + donorQ + "_NewDb"; string[] myargs = new string[] { @@ -293,7 +288,7 @@ public static void KellyTwoProteomeCensored() "--out", outputPath, "--donorq", - "0.001", + "0.0" + donorQ, "--pipfdr", "0.01", "--ppm", @@ -322,12 +317,12 @@ public static void KellyTwoProteomeCensored() [TestCase("5")] public static void TestMetaMorpheusOutputIonStar(string donorQ) { - string psmFile = @"D:\PXD003881_IonStar_SpikeIn\MM105_Cal_Search_Quant\Task2-SearchTask\AllPSMs.psmtsv"; - string peptideFile = @"D:\PXD003881_IonStar_SpikeIn\MM105_Cal_Search_Quant\Task2-SearchTask\AllPeptides.psmtsv"; + string psmFile = @"D:\PXD003881_IonStar_SpikeIn\MM_NewPEP_CalSearch\Task2-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\PXD003881_IonStar_SpikeIn\MM_NewPEP_CalSearch\Task2-SearchTask\AllPeptides.psmtsv"; - var mzmlDirectoy = @"D:\PXD003881_IonStar_SpikeIn\MM105_Cal_Search_Quant\Task1-CalibrateTask"; + var mzmlDirectoy = @"D:\PXD003881_IonStar_SpikeIn\MM_NewPEP_CalSearch\Task1-CalibrateTask"; - string outputBase = @"D:\PXD003881_IonStar_SpikeIn\FlashLFQ_302_Normed_Donor" + donorQ; + string outputBase = @"D:\PXD003881_IonStar_SpikeIn\FlashLFQ_329_Normed_Donor" + donorQ + "_NewSearch"; string outputPath = outputBase + "_Pip5"; @@ -371,9 +366,9 @@ public static void TestMetaMorpheusOutputIonStar(string donorQ) var results = FlashLfqExecutable.Results; //PIP PEP Threshold 0.02 - outputPath = outputBase + "_Pip2"; + outputPath = outputBase + "_Pip2p5"; Directory.CreateDirectory(outputPath); - results.MbrQValueThreshold = 0.02; + results.MbrQValueThreshold = 0.025; results.ReNormalizeResults(); results.CalculatePeptideResults(false); results.CalculateProteinResultsMedianPolish(false); @@ -391,9 +386,9 @@ public static void TestMetaMorpheusOutputIonStar(string donorQ) silent: false); //PIP PEP Threshold 0.10 - outputPath = outputBase + "_Pip10"; + outputPath = outputBase + "_Pip1"; Directory.CreateDirectory(outputPath); - results.MbrQValueThreshold = 0.1; + results.MbrQValueThreshold = 0.01; results.ReNormalizeResults(); results.CalculatePeptideResults(false); results.CalculateProteinResultsMedianPolish(false); diff --git a/Test/Test.csproj b/Test/Test.csproj index 985fbe4..443cc6f 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -15,7 +15,7 @@ - + diff --git a/Util/FlashLfqSettings.cs b/Util/FlashLfqSettings.cs index 7659061..b06d5c1 100644 --- a/Util/FlashLfqSettings.cs +++ b/Util/FlashLfqSettings.cs @@ -60,9 +60,12 @@ public class FlashLfqSettings [Option("mbr", Default = true, HelpText = "bool; match between runs")] public bool MatchBetweenRuns { get; set; } - [Option("mrt", Default = 2.5, HelpText = "double; maximum MBR window in minutes")] + [Option("mrt", Default = 1.5, HelpText = "double; maximum MBR window in minutes")] public double MbrRtWindow { get; set; } + [Option("dew", Default = 0, HelpText = "double; MBR donor exclusion window (in minutes)")] + public double MbrDonorExclusionWindow { get; set; } + [Option("rmc", Default = false, HelpText = "bool; require MS/MS ID in condition")] public bool RequireMsmsIdInCondition { get; set; } @@ -144,6 +147,7 @@ public static FlashLfqEngine CreateEngineWithSettings(FlashLfqSettings settings, donorCriterion: 'S', donorQValueThreshold: settings.DonorQValueThreshold, matchBetweenRunsFdrThreshold: settings.MbrFdrThreshold, + mbrDonorExclusionWindow: settings.MbrDonorExclusionWindow, requireMsmsIdInCondition: settings.RequireMsmsIdInCondition, bayesianProteinQuant: settings.BayesianProteinQuant, diff --git a/Util/Util.csproj b/Util/Util.csproj index 01c672b..841c32f 100644 --- a/Util/Util.csproj +++ b/Util/Util.csproj @@ -15,7 +15,7 @@ - + From 7b6e390d48b94f33cd0a55837a523ef96bcc8cab Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 20 Aug 2024 07:17:42 -0500 Subject: [PATCH 10/19] Nuget update, path update --- CMD/CMD.csproj | 2 +- GUI/GUI.csproj | 2 +- Test/LocalFileRunner.cs | 54 +++++++++++++++-------------------------- Test/Test.csproj | 2 +- Util/Util.csproj | 2 +- 5 files changed, 23 insertions(+), 39 deletions(-) diff --git a/CMD/CMD.csproj b/CMD/CMD.csproj index 30bbb8c..7ef6d95 100644 --- a/CMD/CMD.csproj +++ b/CMD/CMD.csproj @@ -17,7 +17,7 @@ - + diff --git a/GUI/GUI.csproj b/GUI/GUI.csproj index c981587..f729895 100644 --- a/GUI/GUI.csproj +++ b/GUI/GUI.csproj @@ -17,7 +17,7 @@ - + diff --git a/Test/LocalFileRunner.cs b/Test/LocalFileRunner.cs index db8972f..3c792e5 100644 --- a/Test/LocalFileRunner.cs +++ b/Test/LocalFileRunner.cs @@ -19,23 +19,17 @@ internal class LocalFileRunner { [Test] - [TestCase("01")] [TestCase("02")] [TestCase("05")] [TestCase("1")] public static void GygiTwoProteome(string donorQ) { - //string psmFile = @"D:\GygiTwoProteome_PXD014415\Yeast_Human_Arabad_Contam_search\AllPSMs.psmtsv"; - //string peptideFile = @"D:\GygiTwoProteome_PXD014415\Yeast_Human_Arabad_Contam_search\AllPeptides.psmtsv"; - - //var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\MM105_Calibration_Search_MBR\Task1-CalibrateTask"; - - string psmFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_NewPep_NewDB\Task1-SearchTask\AllPSMs.psmtsv"; - string peptideFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_NewPep_NewDB\Task1-SearchTask\AllPeptides.psmtsv"; + string psmFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPeptides.psmtsv"; var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_NewPepSearch\Task1-CalibrateTask"; - string outputPath = @"D:\GygiTwoProteome_PXD014415\FlashLFQ_329_DonorPepQ_" + donorQ + "_NewDb"; + string outputPath = @"D:\GygiTwoProteome_PXD014415\FlashLFQ_330_DonorPepQ_" + donorQ + "_ConcatenatedDb"; string[] myargs = new string[] { @@ -71,18 +65,17 @@ public static void GygiTwoProteome(string donorQ) } [Test] - [TestCase("01")] [TestCase("02")] [TestCase("05")] [TestCase("1")] public static void GygiTwoProteomeCensored(string donorQ) { - string psmFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_NewPep_CensoredMzmls\NewDbSearch\Task1-SearchTask\AllPSMs.psmtsv"; - string peptideFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_NewPep_CensoredMzmls\NewDbSearch\Task1-SearchTask\AllPeptides.psmtsv"; + string psmFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPeptides.psmtsv"; var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_NewPep_CensoredMzmls"; - string outputPath = @"D:\GygiTwoProteome_PXD014415\CensoredData_FlashLFQ_329_DonorPepQ_" + donorQ + "_NewDb"; + string outputPath = @"D:\GygiTwoProteome_PXD014415\CensoredData_FlashLFQ_330_DonorPepQ_" + donorQ + "_ConcatenatedDb"; string[] myargs = new string[] { @@ -119,18 +112,17 @@ public static void GygiTwoProteomeCensored(string donorQ) [Test] - [TestCase("01")] [TestCase("02")] [TestCase("05")] [TestCase("1")] public static void InHouseTwoProteomeHuman(string donorQ) { - string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_NewPep_NewEntrapment\Task1-SearchTask\AllPSMs.psmtsv"; - string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_NewPep_NewEntrapment\Task1-SearchTask\AllPeptides.psmtsv"; + string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPeptides.psmtsv"; ; var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MMNewPep_CalSearch\Task1-CalibrateTask"; - string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Human_FlashLFQ_329_DonorPepQ_" + donorQ + "_NewDb"; + string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Human_FlashLFQ_330_DonorPepQ_" + donorQ + "_ConcatenatedDb"; string[] myargs = new string[] { @@ -166,18 +158,17 @@ public static void InHouseTwoProteomeHuman(string donorQ) } [Test] - [TestCase("01")] [TestCase("02")] [TestCase("05")] [TestCase("1")] public static void InHouseTwoProteomeHumanCensored(string donorQ) { - string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_CensoredMzml_8_3_24\NewDbSearch\Task1-SearchTask\AllPSMs.psmtsv"; - string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_CensoredMzml_8_3_24\NewDbSearch\Task1-SearchTask\AllPeptides.psmtsv"; + string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPeptides.psmtsv"; var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_CensoredMzml_8_3_24"; - string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHuman_FlashLFQ_329_DonorPepQ_" + donorQ + "_NewDb"; + string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHuman_FlashLFQ_330_DonorPepQ_" + donorQ + "_ConcatenatedDb"; string[] myargs = new string[] { @@ -213,20 +204,17 @@ public static void InHouseTwoProteomeHumanCensored(string donorQ) } [Test] - [TestCase("01")] [TestCase("02")] [TestCase("05")] [TestCase("1")] public static void KellyTwoProteome(string donorQ) { - //string psmFile = @"D:\Kelly_TwoProteomeData\NineFileSearch_MM105\Task1-SearchTask\AllPSMs.psmtsv"; - string psmFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_NewPEP_NewEntrapment\Task1-SearchTask\AllPSMs.psmtsv"; - //string peptideFile = @"D:\Kelly_TwoProteomeData\NineFileSearch_MM105\Task1-SearchTask\AllPeptides.psmtsv"; - string peptideFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_NewPEP_NewEntrapment\Task1-SearchTask\AllPeptides.psmtsv"; + string psmFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPeptides.psmtsv"; var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MetaMorpheusNewPepSearch\Task1-CalibrateTask"; - string outputPath = @"D:\Kelly_TwoProteomeData\FlashLFQ_329_DonorPepQ_" + donorQ + "_NewDb"; + string outputPath = @"D:\Kelly_TwoProteomeData\FlashLFQ_330_DonorPepQ_" + donorQ + "_ConcatenatedDb"; string[] myargs = new string[] { @@ -261,21 +249,17 @@ public static void KellyTwoProteome(string donorQ) } [Test] - [TestCase("01")] [TestCase("02")] [TestCase("05")] [TestCase("1")] public static void KellyTwoProteomeCensored(string donorQ) { - //string psmFile = @"D:\Kelly_TwoProteomeData\CensoredDataFiles_7_22_24\MM105_Search\Task1-SearchTask\AllPSMs.psmtsv"; - //string peptideFile = @"D:\Kelly_TwoProteomeData\CensoredDataFiles_7_22_24\MM105_Search\Task1-SearchTask\AllPeptides.psmtsv"; - - string psmFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_Censored_8_2_24\NewPep_NewEntrapment\Task1-SearchTask\AllPSMs.psmtsv"; - string peptideFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_Censored_8_2_24\NewPep_NewEntrapment\Task1-SearchTask\AllPeptides.psmtsv"; + string psmFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPSMs.psmtsv"; + string peptideFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPeptides.psmtsv"; var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_Censored_8_2_24"; - string outputPath = @"D:\Kelly_TwoProteomeData\CensoredData_FlashLFQ_329_DonorPepQ_" + donorQ + "_NewDb"; + string outputPath = @"D:\Kelly_TwoProteomeData\CensoredData_FlashLFQ_330_DonorPepQ_" + donorQ + "_ConcatenatedDb"; string[] myargs = new string[] { @@ -322,7 +306,7 @@ public static void TestMetaMorpheusOutputIonStar(string donorQ) var mzmlDirectoy = @"D:\PXD003881_IonStar_SpikeIn\MM_NewPEP_CalSearch\Task1-CalibrateTask"; - string outputBase = @"D:\PXD003881_IonStar_SpikeIn\FlashLFQ_329_Normed_Donor" + donorQ + "_NewSearch"; + string outputBase = @"D:\PXD003881_IonStar_SpikeIn\FlashLFQ_330_Normed_Donor" + donorQ + "_NewSearch"; string outputPath = outputBase + "_Pip5"; diff --git a/Test/Test.csproj b/Test/Test.csproj index 443cc6f..001eff7 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -15,7 +15,7 @@ - + diff --git a/Util/Util.csproj b/Util/Util.csproj index 841c32f..c08b682 100644 --- a/Util/Util.csproj +++ b/Util/Util.csproj @@ -15,7 +15,7 @@ - + From bcc2f10d20170299041a19e113015c73b3aa239c Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 31 Aug 2024 15:58:59 -0500 Subject: [PATCH 11/19] local file runner messed up --- Test/LocalFileRunner.cs | 367 +++++++++++++++++++--------------------- 1 file changed, 172 insertions(+), 195 deletions(-) diff --git a/Test/LocalFileRunner.cs b/Test/LocalFileRunner.cs index 3c792e5..f81bbf1 100644 --- a/Test/LocalFileRunner.cs +++ b/Test/LocalFileRunner.cs @@ -1,6 +1,5 @@ using CMD; using FlashLFQ; -using FlashLFQ.PEP; using IO.MzML; using MzLibUtil; using NUnit.Framework; @@ -19,17 +18,14 @@ internal class LocalFileRunner { [Test] - [TestCase("02")] - [TestCase("05")] - [TestCase("1")] - public static void GygiTwoProteome(string donorQ) + public static void GygiTwoProteome() { string psmFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPSMs.psmtsv"; string peptideFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPeptides.psmtsv"; var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_NewPepSearch\Task1-CalibrateTask"; - string outputPath = @"D:\GygiTwoProteome_PXD014415\FlashLFQ_330_DonorPepQ_" + donorQ + "_ConcatenatedDb"; + string outputPath = @"D:\GygiTwoProteome_PXD014415\FlashLFQ_CurRel_PepQ" + "_ConcatenatedDb"; string[] myargs = new string[] { @@ -42,7 +38,7 @@ public static void GygiTwoProteome(string donorQ) "--out", outputPath, "--donorq", - "0.0" + donorQ, + "0.001", "--pipfdr", "0.01", "--ppm", @@ -65,17 +61,14 @@ public static void GygiTwoProteome(string donorQ) } [Test] - [TestCase("02")] - [TestCase("05")] - [TestCase("1")] - public static void GygiTwoProteomeCensored(string donorQ) + public static void GygiTwoProteomeCensored() { string psmFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPSMs.psmtsv"; string peptideFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPeptides.psmtsv"; var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_NewPep_CensoredMzmls"; - string outputPath = @"D:\GygiTwoProteome_PXD014415\CensoredData_FlashLFQ_330_DonorPepQ_" + donorQ + "_ConcatenatedDb"; + string outputPath = @"D:\GygiTwoProteome_PXD014415\CensoredData_FlashLFQ_CurRel_PepQ" + "_ConcatenatedDb"; string[] myargs = new string[] { @@ -88,7 +81,7 @@ public static void GygiTwoProteomeCensored(string donorQ) "--out", outputPath, "--donorq", - "0.0" + donorQ, + "0.001", "--pipfdr", "0.01", "--ppm", @@ -112,17 +105,14 @@ public static void GygiTwoProteomeCensored(string donorQ) [Test] - [TestCase("02")] - [TestCase("05")] - [TestCase("1")] - public static void InHouseTwoProteomeHuman(string donorQ) + public static void InHouseTwoProteomeHuman() { string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPSMs.psmtsv"; string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPeptides.psmtsv"; ; var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MMNewPep_CalSearch\Task1-CalibrateTask"; - string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Human_FlashLFQ_330_DonorPepQ_" + donorQ + "_ConcatenatedDb"; + string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Human_FlashLFQ_CurRel_PepQ" + "_ConcatenatedDb"; string[] myargs = new string[] { @@ -135,7 +125,7 @@ public static void InHouseTwoProteomeHuman(string donorQ) "--out", outputPath, "--donorq", - "0.0" + donorQ, + "0.001", "--pipfdr", "0.01", "--ppm", @@ -158,17 +148,14 @@ public static void InHouseTwoProteomeHuman(string donorQ) } [Test] - [TestCase("02")] - [TestCase("05")] - [TestCase("1")] - public static void InHouseTwoProteomeHumanCensored(string donorQ) + public static void InHouseTwoProteomeHumanCensored() { string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPSMs.psmtsv"; string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPeptides.psmtsv"; var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_CensoredMzml_8_3_24"; - string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHuman_FlashLFQ_330_DonorPepQ_" + donorQ + "_ConcatenatedDb"; + string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHuman_FlashLFQ_CurRel_PepQ" + "_ConcatenatedDb"; string[] myargs = new string[] { @@ -181,7 +168,7 @@ public static void InHouseTwoProteomeHumanCensored(string donorQ) "--out", outputPath, "--donorq", - "0.0" + donorQ, + "0.001", "--pipfdr", "0.01", "--ppm", @@ -204,17 +191,14 @@ public static void InHouseTwoProteomeHumanCensored(string donorQ) } [Test] - [TestCase("02")] - [TestCase("05")] - [TestCase("1")] - public static void KellyTwoProteome(string donorQ) + public static void KellyTwoProteome() { string psmFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPSMs.psmtsv"; string peptideFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPeptides.psmtsv"; var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MetaMorpheusNewPepSearch\Task1-CalibrateTask"; - string outputPath = @"D:\Kelly_TwoProteomeData\FlashLFQ_330_DonorPepQ_" + donorQ + "_ConcatenatedDb"; + string outputPath = @"D:\Kelly_TwoProteomeData\FlashLFQ_CurRel_PepQ" + "_ConcatenatedDb"; string[] myargs = new string[] { @@ -227,7 +211,7 @@ public static void KellyTwoProteome(string donorQ) "--out", outputPath, "--donorq", - "0.0" + donorQ, + "0.001", "--pipfdr", "0.01", "--ppm", @@ -249,17 +233,14 @@ public static void KellyTwoProteome(string donorQ) } [Test] - [TestCase("02")] - [TestCase("05")] - [TestCase("1")] - public static void KellyTwoProteomeCensored(string donorQ) + public static void KellyTwoProteomeCensored() { string psmFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPSMs.psmtsv"; string peptideFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPeptides.psmtsv"; var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_Censored_8_2_24"; - string outputPath = @"D:\Kelly_TwoProteomeData\CensoredData_FlashLFQ_330_DonorPepQ_" + donorQ + "_ConcatenatedDb"; + string outputPath = @"D:\Kelly_TwoProteomeData\CensoredData_FlashLFQ_CurRel_PepQ" + "_ConcatenatedDb"; string[] myargs = new string[] { @@ -272,7 +253,7 @@ public static void KellyTwoProteomeCensored(string donorQ) "--out", outputPath, "--donorq", - "0.0" + donorQ, + "0.001", "--pipfdr", "0.01", "--ppm", @@ -297,8 +278,8 @@ public static void KellyTwoProteomeCensored(string donorQ) [Test] [TestCase("02")] + [TestCase("05")] [TestCase("1")] - [TestCase("5")] public static void TestMetaMorpheusOutputIonStar(string donorQ) { string psmFile = @"D:\PXD003881_IonStar_SpikeIn\MM_NewPEP_CalSearch\Task2-SearchTask\AllPSMs.psmtsv"; @@ -308,7 +289,7 @@ public static void TestMetaMorpheusOutputIonStar(string donorQ) string outputBase = @"D:\PXD003881_IonStar_SpikeIn\FlashLFQ_330_Normed_Donor" + donorQ + "_NewSearch"; - string outputPath = outputBase + "_Pip5"; + string outputPath = outputBase + "_Pip1"; string[] myargs = new string[] { @@ -323,11 +304,11 @@ public static void TestMetaMorpheusOutputIonStar(string donorQ) "--donorq", "0.0" + donorQ, "--pipfdr", - "0.05", + "0.01", "--ppm", "10", "--thr", - "10", + "12", "--nor", "true" }; @@ -370,9 +351,9 @@ public static void TestMetaMorpheusOutputIonStar(string donorQ) silent: false); //PIP PEP Threshold 0.10 - outputPath = outputBase + "_Pip1"; + outputPath = outputBase + "_Pip5"; Directory.CreateDirectory(outputPath); - results.MbrQValueThreshold = 0.01; + results.MbrQValueThreshold = 0.05; results.ReNormalizeResults(); results.CalculatePeptideResults(false); results.CalculateProteinResultsMedianPolish(false); @@ -411,157 +392,153 @@ public static void TestMetaMorpheusOutputIonStar(string donorQ) } - [Test] - [TestCase("02")] - [TestCase("1")] - [TestCase("5")] - public static void TestMetaMorpheusOutputSc(string donorQ) - { - string psmFile = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task2-SearchTask\AllPSMs.psmtsv"; - string peptideFile = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task2-SearchTask\AllPeptides.psmtsv"; - - var mzmlDirectoy = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task1-CalibrateTask\mzMLs"; - - string outputBase = @"D:\pepDesc_spikeIn\FlashLFQ_301_Donor" + donorQ; - - string outputPath = outputBase + "_Pip5"; - - string[] myargs = new string[] - { - "--rep", - mzmlDirectoy, - "--idt", - psmFile, - "--pep", - peptideFile, - "--out", - outputPath, - "--donorq", - "0.0" + donorQ, - "--pipfdr", - "0.05", - "--ppm", - "10" - }; - - CMD.FlashLfqExecutable.Main(myargs); - - string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); - Assert.That(File.Exists(peaksPath)); - //File.Delete(peaksPath); - - string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); - Assert.That(File.Exists(peptidesPath)); - //File.Delete(peptidesPath); - - string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); - Assert.That(File.Exists(proteinsPath)); - //File.Delete(proteinsPath); - - //var results = FlashLfqExecutable.Results; - - ////PIP PEP Threshold 0.01 - //outputPath = outputBase + "_Pip1"; - //Directory.CreateDirectory(outputPath); - //results.MbrQValueThreshold = 0.01; - //results.CalculatePeptideResults(false); - //results.CalculateProteinResultsMedianPolish(false); - //results.WriteResults( - // peaksOutputPath: null, - // modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), - // proteinOutputPath: null, - // bayesianProteinQuantOutput: null, - // silent: false); - //results.WriteResults( - // peaksOutputPath: null, - // modPeptideOutputPath: null, - // proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), - // bayesianProteinQuantOutput: null, - // silent: false); - - ////PIP PEP Threshold 0.10 - //outputPath = outputBase + "_Pip10"; - //Directory.CreateDirectory(outputPath); - //results.MbrQValueThreshold = 0.1; - //results.CalculatePeptideResults(false); - //results.CalculateProteinResultsMedianPolish(false); - //results.WriteResults( - // peaksOutputPath: null, - // modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), - // proteinOutputPath: null, - // bayesianProteinQuantOutput: null, - // silent: false); - //results.WriteResults( - // peaksOutputPath: null, - // modPeptideOutputPath: null, - // proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), - // bayesianProteinQuantOutput: null, - // silent: false); - - //// PIP PEP Threshold 1.00 - //outputPath = outputBase + "_Pip100"; - //Directory.CreateDirectory(outputPath); - //results.MbrQValueThreshold = 1.0; - //results.CalculatePeptideResults(false); - //results.CalculateProteinResultsMedianPolish(false); - //results.WriteResults( - // peaksOutputPath: null, - // modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), - // proteinOutputPath: null, - // bayesianProteinQuantOutput: null, - // silent: false); - //results.WriteResults( - // peaksOutputPath: null, - // modPeptideOutputPath: null, - // proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), - // bayesianProteinQuantOutput: null, - // silent: false); - } + //[Test] + //[TestCase("02")] + //[TestCase("1")] + //[TestCase("5")] + //public static void TestMetaMorpheusOutputSc() + //{ + // string psmFile = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task2-SearchTask\AllPSMs.psmtsv"; + // string peptideFile = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task2-SearchTask\AllPeptides.psmtsv"; + + // var mzmlDirectoy = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task1-CalibrateTask\mzMLs"; + + // string outputBase = @"D:\pepDesc_spikeIn\FlashLFQ_301_Donor01"; + + // string outputPath = outputBase + "_Pip5"; + + // string[] myargs = new string[] + // { + // "--rep", + // mzmlDirectoy, + // "--idt", + // psmFile, + // "--pep", + // peptideFile, + // "--out", + // outputPath, + // "--donorq", + // "0.001", + // "--pipfdr", + // "0.05", + // "--ppm", + // "10" + // }; + + // CMD.FlashLfqExecutable.Main(myargs); + + // string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); + // Assert.That(File.Exists(peaksPath)); + // //File.Delete(peaksPath); + + // string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); + // Assert.That(File.Exists(peptidesPath)); + // //File.Delete(peptidesPath); + + // string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); + // Assert.That(File.Exists(proteinsPath)); + //File.Delete(proteinsPath); + + //var results = FlashLfqExecutable.Results; + + ////PIP PEP Threshold 0.01 + //outputPath = outputBase + "_Pip1"; + //Directory.CreateDirectory(outputPath); + //results.MbrQValueThreshold = 0.01; + //results.CalculatePeptideResults(false); + //results.CalculateProteinResultsMedianPolish(false); + //results.WriteResults( + // peaksOutputPath: null, + // modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), + // proteinOutputPath: null, + // bayesianProteinQuantOutput: null, + // silent: false); + //results.WriteResults( + // peaksOutputPath: null, + // modPeptideOutputPath: null, + // proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), + // bayesianProteinQuantOutput: null, + // silent: false); + + ////PIP PEP Threshold 0.10 + //outputPath = outputBase + "_Pip10"; + //Directory.CreateDirectory(outputPath); + //results.MbrQValueThreshold = 0.1; + //results.CalculatePeptideResults(false); + //results.CalculateProteinResultsMedianPolish(false); + //results.WriteResults( + // peaksOutputPath: null, + // modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), + // proteinOutputPath: null, + // bayesianProteinQuantOutput: null, + // silent: false); + //results.WriteResults( + // peaksOutputPath: null, + // modPeptideOutputPath: null, + // proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), + // bayesianProteinQuantOutput: null, + // silent: false); + + //// PIP PEP Threshold 1.00 + //outputPath = outputBase + "_Pip100"; + //Directory.CreateDirectory(outputPath); + //results.MbrQValueThreshold = 1.0; + //results.CalculatePeptideResults(false); + //results.CalculateProteinResultsMedianPolish(false); + //results.WriteResults( + // peaksOutputPath: null, + // modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), + // proteinOutputPath: null, + // bayesianProteinQuantOutput: null, + // silent: false); + //results.WriteResults( + // peaksOutputPath: null, + // modPeptideOutputPath: null, + // proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), + // bayesianProteinQuantOutput: null, + // silent: false); +} - //[Test] - //public static void SingleCellFcTest() - //{ - // string psmFile = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\Task1-SearchTask\AllPSMs.psmtsv"; - // string peptideFile = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\Task1-SearchTask\AllPeptides.psmtsv"; - - // var mzmlDirectoy = @"D:\SpikeIn_PXD001819\MetaMorpheus105_Cal_Search_Quant\Task1-CalibrateTask\FlashLFQ_Files"; - - // string outputPath = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\FlashLFQ_209_donor_1_pip_5"; - - // string[] myargs = new string[] - // { - // "--rep", - // mzmlDirectoy, - // "--idt", - // psmFile, - // "--pep", - // peptideFile, - // "--out", - // outputPath, - // "--donorq", - // "0.01", - // "--pipfdr", - // "0.02", - // "--ppm", - // "10" - // }; - - // CMD.FlashLfqExecutable.Main(myargs); - - // string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); - // Assert.That(File.Exists(peaksPath)); - // //File.Delete(peaksPath); - - // string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); - // Assert.That(File.Exists(peptidesPath)); - // //File.Delete(peptidesPath); - - // string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); - // Assert.That(File.Exists(proteinsPath)); - // //File.Delete(proteinsPath); - //} - } - - - + //[Test] + //public static void SingleCellFcTest() + //{ + // string psmFile = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\Task1-SearchTask\AllPSMs.psmtsv"; + // string peptideFile = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\Task1-SearchTask\AllPeptides.psmtsv"; + + // var mzmlDirectoy = @"D:\SpikeIn_PXD001819\MetaMorpheus105_Cal_Search_Quant\Task1-CalibrateTask\FlashLFQ_Files"; + + // string outputPath = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\FlashLFQ_209_donor_1_pip_5"; + + // string[] myargs = new string[] + // { + // "--rep", + // mzmlDirectoy, + // "--idt", + // psmFile, + // "--pep", + // peptideFile, + // "--out", + // outputPath, + // "--donorq", + // "0.01", + // "--pipfdr", + // "0.02", + // "--ppm", + // "10" + // }; + + // CMD.FlashLfqExecutable.Main(myargs); + + // string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); + // Assert.That(File.Exists(peaksPath)); + // //File.Delete(peaksPath); + + // string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); + // Assert.That(File.Exists(peptidesPath)); + // //File.Delete(peptidesPath); + + // string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); + // Assert.That(File.Exists(proteinsPath)); + // //File.Delete(proteinsPath); + //} } From aeea9c29f389abcb724e0d95f67e4b015a3d762f Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 31 Aug 2024 16:44:41 -0500 Subject: [PATCH 12/19] mzLib 331 --- CMD/CMD.csproj | 2 +- GUI/GUI.csproj | 2 +- Test/LocalFileRunner.cs | 221 ++++++++------------------------------- Test/Test.csproj | 2 +- Util/FlashLfqSettings.cs | 4 - Util/Util.csproj | 2 +- 6 files changed, 49 insertions(+), 184 deletions(-) diff --git a/CMD/CMD.csproj b/CMD/CMD.csproj index 7ef6d95..43cadb2 100644 --- a/CMD/CMD.csproj +++ b/CMD/CMD.csproj @@ -17,7 +17,7 @@ - + diff --git a/GUI/GUI.csproj b/GUI/GUI.csproj index f729895..b53b331 100644 --- a/GUI/GUI.csproj +++ b/GUI/GUI.csproj @@ -17,7 +17,7 @@ - + diff --git a/Test/LocalFileRunner.cs b/Test/LocalFileRunner.cs index f81bbf1..ea4b919 100644 --- a/Test/LocalFileRunner.cs +++ b/Test/LocalFileRunner.cs @@ -1,5 +1,6 @@ using CMD; using FlashLFQ; +using FlashLFQ.PEP; using IO.MzML; using MzLibUtil; using NUnit.Framework; @@ -18,14 +19,16 @@ internal class LocalFileRunner { [Test] - public static void GygiTwoProteome() + [TestCase("02")] + [TestCase("05")] + [TestCase("1")] + public static void GygiTwoProteome(string donorQ) { string psmFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPSMs.psmtsv"; string peptideFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPeptides.psmtsv"; var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_NewPepSearch\Task1-CalibrateTask"; - - string outputPath = @"D:\GygiTwoProteome_PXD014415\FlashLFQ_CurRel_PepQ" + "_ConcatenatedDb"; + string outputPath = @"D:\GygiTwoProteome_PXD014415\FlashLFQ_331_DonorPepQ_" + donorQ; string[] myargs = new string[] { @@ -38,7 +41,7 @@ public static void GygiTwoProteome() "--out", outputPath, "--donorq", - "0.001", + "0.0" + donorQ, "--pipfdr", "0.01", "--ppm", @@ -61,14 +64,17 @@ public static void GygiTwoProteome() } [Test] - public static void GygiTwoProteomeCensored() + [TestCase("02")] + [TestCase("05")] + [TestCase("1")] + public static void GygiTwoProteomeCensored(string donorQ) { string psmFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPSMs.psmtsv"; string peptideFile = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPeptides.psmtsv"; var mzmlDirectoy = @"D:\GygiTwoProteome_PXD014415\MsConvertmzMLs\MM_NewPep_CensoredMzmls"; - string outputPath = @"D:\GygiTwoProteome_PXD014415\CensoredData_FlashLFQ_CurRel_PepQ" + "_ConcatenatedDb"; + string outputPath = @"D:\GygiTwoProteome_PXD014415\CensoredData_FlashLFQ_331_DonorPepQ_" + donorQ; string[] myargs = new string[] { @@ -81,7 +87,7 @@ public static void GygiTwoProteomeCensored() "--out", outputPath, "--donorq", - "0.001", + "0.0" + donorQ, "--pipfdr", "0.01", "--ppm", @@ -105,14 +111,17 @@ public static void GygiTwoProteomeCensored() [Test] - public static void InHouseTwoProteomeHuman() + [TestCase("02")] + [TestCase("05")] + [TestCase("1")] + public static void InHouseTwoProteomeHuman(string donorQ) { string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPSMs.psmtsv"; - string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPeptides.psmtsv"; ; + string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPeptides.psmtsv"; var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MMNewPep_CalSearch\Task1-CalibrateTask"; - string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Human_FlashLFQ_CurRel_PepQ" + "_ConcatenatedDb"; + string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\Human_FlashLFQ_331_DonorPepQ_" + donorQ; string[] myargs = new string[] { @@ -125,7 +134,7 @@ public static void InHouseTwoProteomeHuman() "--out", outputPath, "--donorq", - "0.001", + "0.0" + donorQ, "--pipfdr", "0.01", "--ppm", @@ -148,14 +157,17 @@ public static void InHouseTwoProteomeHuman() } [Test] - public static void InHouseTwoProteomeHumanCensored() + [TestCase("02")] + [TestCase("05")] + [TestCase("1")] + public static void InHouseTwoProteomeHumanCensored(string donorQ) { string psmFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPSMs.psmtsv"; string peptideFile = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPeptides.psmtsv"; var mzmlDirectoy = @"D:\Human_Ecoli_TwoProteome_60minGradient\RawData\MM_CensoredMzml_8_3_24"; - string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHuman_FlashLFQ_CurRel_PepQ" + "_ConcatenatedDb"; + string outputPath = @"D:\Human_Ecoli_TwoProteome_60minGradient\CensoredHuman_FlashLFQ_331_DonorPepQ_" + donorQ; string[] myargs = new string[] { @@ -168,7 +180,7 @@ public static void InHouseTwoProteomeHumanCensored() "--out", outputPath, "--donorq", - "0.001", + "0.0" + donorQ, "--pipfdr", "0.01", "--ppm", @@ -191,14 +203,17 @@ public static void InHouseTwoProteomeHumanCensored() } [Test] - public static void KellyTwoProteome() + [TestCase("02")] + [TestCase("05")] + [TestCase("1")] + public static void KellyTwoProteome(string donorQ) { string psmFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPSMs.psmtsv"; string peptideFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_ConcatenatedHumanDb_Search\Task1-SearchTask\AllPeptides.psmtsv"; var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MetaMorpheusNewPepSearch\Task1-CalibrateTask"; - string outputPath = @"D:\Kelly_TwoProteomeData\FlashLFQ_CurRel_PepQ" + "_ConcatenatedDb"; + string outputPath = @"D:\Kelly_TwoProteomeData\FlashLFQ_331_DonorPepQ_" + donorQ; string[] myargs = new string[] { @@ -211,7 +226,7 @@ public static void KellyTwoProteome() "--out", outputPath, "--donorq", - "0.001", + "0.0" + donorQ, "--pipfdr", "0.01", "--ppm", @@ -233,14 +248,17 @@ public static void KellyTwoProteome() } [Test] - public static void KellyTwoProteomeCensored() + [TestCase("02")] + [TestCase("05")] + [TestCase("1")] + public static void KellyTwoProteomeCensored(string donorQ) { string psmFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPSMs.psmtsv"; string peptideFile = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_ConcatenatedHumanDb_Search_CensoredFiles\Task1-SearchTask\AllPeptides.psmtsv"; var mzmlDirectoy = @"D:\Kelly_TwoProteomeData\MsConvertMzMls\MM_Censored_8_2_24"; - string outputPath = @"D:\Kelly_TwoProteomeData\CensoredData_FlashLFQ_CurRel_PepQ" + "_ConcatenatedDb"; + string outputPath = @"D:\Kelly_TwoProteomeData\CensoredData_FlashLFQ_331_DonorPepQ_" + donorQ; string[] myargs = new string[] { @@ -253,7 +271,7 @@ public static void KellyTwoProteomeCensored() "--out", outputPath, "--donorq", - "0.001", + "0.0" + donorQ, "--pipfdr", "0.01", "--ppm", @@ -287,9 +305,9 @@ public static void TestMetaMorpheusOutputIonStar(string donorQ) var mzmlDirectoy = @"D:\PXD003881_IonStar_SpikeIn\MM_NewPEP_CalSearch\Task1-CalibrateTask"; - string outputBase = @"D:\PXD003881_IonStar_SpikeIn\FlashLFQ_330_Normed_Donor" + donorQ + "_NewSearch"; + string outputBase = @"D:\PXD003881_IonStar_SpikeIn\FlashLFQ_331_Normed_Donor" + donorQ; - string outputPath = outputBase + "_Pip1"; + string outputPath = outputBase + "_Pip5"; string[] myargs = new string[] { @@ -304,11 +322,11 @@ public static void TestMetaMorpheusOutputIonStar(string donorQ) "--donorq", "0.0" + donorQ, "--pipfdr", - "0.01", + "0.05", "--ppm", "10", "--thr", - "12", + "10", "--nor", "true" }; @@ -351,9 +369,9 @@ public static void TestMetaMorpheusOutputIonStar(string donorQ) silent: false); //PIP PEP Threshold 0.10 - outputPath = outputBase + "_Pip5"; + outputPath = outputBase + "_Pip1"; Directory.CreateDirectory(outputPath); - results.MbrQValueThreshold = 0.05; + results.MbrQValueThreshold = 0.01; results.ReNormalizeResults(); results.CalculatePeptideResults(false); results.CalculateProteinResultsMedianPolish(false); @@ -390,155 +408,6 @@ public static void TestMetaMorpheusOutputIonStar(string donorQ) bayesianProteinQuantOutput: null, silent: false); } + } - - //[Test] - //[TestCase("02")] - //[TestCase("1")] - //[TestCase("5")] - //public static void TestMetaMorpheusOutputSc() - //{ - // string psmFile = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task2-SearchTask\AllPSMs.psmtsv"; - // string peptideFile = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task2-SearchTask\AllPeptides.psmtsv"; - - // var mzmlDirectoy = @"D:\pepDesc_spikeIn\MM105_CalSearch\Task1-CalibrateTask\mzMLs"; - - // string outputBase = @"D:\pepDesc_spikeIn\FlashLFQ_301_Donor01"; - - // string outputPath = outputBase + "_Pip5"; - - // string[] myargs = new string[] - // { - // "--rep", - // mzmlDirectoy, - // "--idt", - // psmFile, - // "--pep", - // peptideFile, - // "--out", - // outputPath, - // "--donorq", - // "0.001", - // "--pipfdr", - // "0.05", - // "--ppm", - // "10" - // }; - - // CMD.FlashLfqExecutable.Main(myargs); - - // string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); - // Assert.That(File.Exists(peaksPath)); - // //File.Delete(peaksPath); - - // string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); - // Assert.That(File.Exists(peptidesPath)); - // //File.Delete(peptidesPath); - - // string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); - // Assert.That(File.Exists(proteinsPath)); - //File.Delete(proteinsPath); - - //var results = FlashLfqExecutable.Results; - - ////PIP PEP Threshold 0.01 - //outputPath = outputBase + "_Pip1"; - //Directory.CreateDirectory(outputPath); - //results.MbrQValueThreshold = 0.01; - //results.CalculatePeptideResults(false); - //results.CalculateProteinResultsMedianPolish(false); - //results.WriteResults( - // peaksOutputPath: null, - // modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), - // proteinOutputPath: null, - // bayesianProteinQuantOutput: null, - // silent: false); - //results.WriteResults( - // peaksOutputPath: null, - // modPeptideOutputPath: null, - // proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), - // bayesianProteinQuantOutput: null, - // silent: false); - - ////PIP PEP Threshold 0.10 - //outputPath = outputBase + "_Pip10"; - //Directory.CreateDirectory(outputPath); - //results.MbrQValueThreshold = 0.1; - //results.CalculatePeptideResults(false); - //results.CalculateProteinResultsMedianPolish(false); - //results.WriteResults( - // peaksOutputPath: null, - // modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), - // proteinOutputPath: null, - // bayesianProteinQuantOutput: null, - // silent: false); - //results.WriteResults( - // peaksOutputPath: null, - // modPeptideOutputPath: null, - // proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), - // bayesianProteinQuantOutput: null, - // silent: false); - - //// PIP PEP Threshold 1.00 - //outputPath = outputBase + "_Pip100"; - //Directory.CreateDirectory(outputPath); - //results.MbrQValueThreshold = 1.0; - //results.CalculatePeptideResults(false); - //results.CalculateProteinResultsMedianPolish(false); - //results.WriteResults( - // peaksOutputPath: null, - // modPeptideOutputPath: Path.Combine(outputPath, "QuantifiedPeptides.tsv"), - // proteinOutputPath: null, - // bayesianProteinQuantOutput: null, - // silent: false); - //results.WriteResults( - // peaksOutputPath: null, - // modPeptideOutputPath: null, - // proteinOutputPath: Path.Combine(outputPath, "QuantifiedProteins.tsv"), - // bayesianProteinQuantOutput: null, - // silent: false); -} - - //[Test] - //public static void SingleCellFcTest() - //{ - // string psmFile = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\Task1-SearchTask\AllPSMs.psmtsv"; - // string peptideFile = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\Task1-SearchTask\AllPeptides.psmtsv"; - - // var mzmlDirectoy = @"D:\SpikeIn_PXD001819\MetaMorpheus105_Cal_Search_Quant\Task1-CalibrateTask\FlashLFQ_Files"; - - // string outputPath = @"D:\SpikeIn_PXD001819\MetaMorpheus105_medium_search\FlashLFQ_209_donor_1_pip_5"; - - // string[] myargs = new string[] - // { - // "--rep", - // mzmlDirectoy, - // "--idt", - // psmFile, - // "--pep", - // peptideFile, - // "--out", - // outputPath, - // "--donorq", - // "0.01", - // "--pipfdr", - // "0.02", - // "--ppm", - // "10" - // }; - - // CMD.FlashLfqExecutable.Main(myargs); - - // string peaksPath = Path.Combine(outputPath, "QuantifiedPeaks.tsv"); - // Assert.That(File.Exists(peaksPath)); - // //File.Delete(peaksPath); - - // string peptidesPath = Path.Combine(outputPath, "QuantifiedPeptides.tsv"); - // Assert.That(File.Exists(peptidesPath)); - // //File.Delete(peptidesPath); - - // string proteinsPath = Path.Combine(outputPath, "QuantifiedProteins.tsv"); - // Assert.That(File.Exists(proteinsPath)); - // //File.Delete(proteinsPath); - //} } diff --git a/Test/Test.csproj b/Test/Test.csproj index 001eff7..0c86e7a 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -15,7 +15,7 @@ - + diff --git a/Util/FlashLfqSettings.cs b/Util/FlashLfqSettings.cs index b06d5c1..1712d3a 100644 --- a/Util/FlashLfqSettings.cs +++ b/Util/FlashLfqSettings.cs @@ -63,9 +63,6 @@ public class FlashLfqSettings [Option("mrt", Default = 1.5, HelpText = "double; maximum MBR window in minutes")] public double MbrRtWindow { get; set; } - [Option("dew", Default = 0, HelpText = "double; MBR donor exclusion window (in minutes)")] - public double MbrDonorExclusionWindow { get; set; } - [Option("rmc", Default = false, HelpText = "bool; require MS/MS ID in condition")] public bool RequireMsmsIdInCondition { get; set; } @@ -147,7 +144,6 @@ public static FlashLfqEngine CreateEngineWithSettings(FlashLfqSettings settings, donorCriterion: 'S', donorQValueThreshold: settings.DonorQValueThreshold, matchBetweenRunsFdrThreshold: settings.MbrFdrThreshold, - mbrDonorExclusionWindow: settings.MbrDonorExclusionWindow, requireMsmsIdInCondition: settings.RequireMsmsIdInCondition, bayesianProteinQuant: settings.BayesianProteinQuant, diff --git a/Util/Util.csproj b/Util/Util.csproj index c08b682..de7813a 100644 --- a/Util/Util.csproj +++ b/Util/Util.csproj @@ -15,7 +15,7 @@ - + From fe6ef8bd5070a53496a3650301c1ca8702ad7228 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 16 Oct 2024 11:56:05 -0500 Subject: [PATCH 13/19] .NET 8 upgrade --- CMD/CMD.csproj | 9 ++------- GUI/GUI.csproj | 7 +------ Test/Test.csproj | 10 ++-------- Util/Util.csproj | 7 ++----- 4 files changed, 7 insertions(+), 26 deletions(-) diff --git a/CMD/CMD.csproj b/CMD/CMD.csproj index 43cadb2..9dd6d36 100644 --- a/CMD/CMD.csproj +++ b/CMD/CMD.csproj @@ -1,8 +1,7 @@  - Exe - net6.0 + net8.0 1.0.0.0 false false @@ -13,7 +12,6 @@ FlashLFQ_Icon.ico AnyCPU - @@ -30,11 +28,9 @@ - - Always @@ -43,5 +39,4 @@ Always - - + \ No newline at end of file diff --git a/GUI/GUI.csproj b/GUI/GUI.csproj index b53b331..c8bc640 100644 --- a/GUI/GUI.csproj +++ b/GUI/GUI.csproj @@ -1,8 +1,7 @@  - WinExe - net6.0-windows + net8.0-windows true 1.0.0.0 false @@ -14,7 +13,6 @@ FlashLFQ_Icon.ico AnyCPU - @@ -30,15 +28,12 @@ - - Always - \ No newline at end of file diff --git a/Test/Test.csproj b/Test/Test.csproj index 0c86e7a..018e34e 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -1,8 +1,6 @@  - - net6.0 - + net8.0 false false false @@ -12,7 +10,6 @@ false AnyCPU - @@ -21,12 +18,10 @@ - - Always @@ -80,5 +75,4 @@ Always - - + \ No newline at end of file diff --git a/Util/Util.csproj b/Util/Util.csproj index de7813a..6f5d87d 100644 --- a/Util/Util.csproj +++ b/Util/Util.csproj @@ -1,7 +1,6 @@  - - net6.0 + net8.0 1.0.0.0 false false @@ -11,7 +10,6 @@ false AnyCPU - @@ -19,5 +17,4 @@ - - + \ No newline at end of file From eb710b3f34d91cd2cb384385078ca8c3d145a5a5 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 12 Nov 2024 16:45:00 -0600 Subject: [PATCH 14/19] Updated GUI settings --- CMD/CMD.csproj | 2 +- GUI/GUI.csproj | 2 +- GUI/MainWindow.xaml | 34 +++++++++++++++----- GUI/MainWindow.xaml.cs | 26 +++++++++++++++ Test/LocalFileRunner.cs | 68 +++++++++++++++++++++++++++++++++++----- Test/Test.csproj | 2 +- Util/FlashLfqSettings.cs | 4 +-- Util/OutputWriter.cs | 3 +- Util/Util.csproj | 2 +- 9 files changed, 121 insertions(+), 22 deletions(-) diff --git a/CMD/CMD.csproj b/CMD/CMD.csproj index a1ff382..669c246 100644 --- a/CMD/CMD.csproj +++ b/CMD/CMD.csproj @@ -15,7 +15,7 @@ - + diff --git a/GUI/GUI.csproj b/GUI/GUI.csproj index 67fb764..66e6916 100644 --- a/GUI/GUI.csproj +++ b/GUI/GUI.csproj @@ -15,7 +15,7 @@ - + diff --git a/GUI/MainWindow.xaml b/GUI/MainWindow.xaml index 8663aff..8a8901e 100644 --- a/GUI/MainWindow.xaml +++ b/GUI/MainWindow.xaml @@ -376,13 +376,31 @@