Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q value threshold adjustment and bug fix #2426

Merged
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
bd5aefc
update mzlib nuget package to 551
trishorts Aug 26, 2024
d60e32e
Merge remote-tracking branch 'upstream/master'
trishorts Sep 5, 2024
3049ef3
Merge remote-tracking branch 'upstream/master'
trishorts Oct 7, 2024
5231c70
adjust inverted qValue threshold to 1000
trishorts Oct 15, 2024
5186b82
add override qValue threshold for unit testing
trishorts Oct 15, 2024
4f9e99f
calculate notch specific inverted qVAlue
trishorts Oct 15, 2024
4196788
add static bool to override psmcount threshold for PEP calculation in…
trishorts Oct 16, 2024
70f2d7a
final unit tests repaired
trishorts Oct 16, 2024
6ece6ba
ghk
trishorts Oct 16, 2024
10b2333
prevent unit tests from going down pep rabbit hole
trishorts Oct 16, 2024
60c2d69
not supposed to be hard
trishorts Oct 16, 2024
375bcd0
finally got that threshold to behave kinda
trishorts Oct 17, 2024
8340667
gf
trishorts Oct 17, 2024
d1080e6
add NonParallelizable to tests
trishorts Oct 17, 2024
d96c2da
kgh
trishorts Oct 17, 2024
17f994e
Merge remote-tracking branch 'upstream/master' into qValueThresholdAd…
trishorts Oct 21, 2024
02a696d
calibrated when it helps
trishorts Oct 21, 2024
68db4f4
Merge branch 'master' into qValueThresholdAdjustmentAndBugFix
trishorts Oct 30, 2024
df1907e
Merge remote-tracking branch 'upstream/master' into qValueThresholdAd…
trishorts Oct 30, 2024
0eb5136
Merge branch 'qValueThresholdAdjustmentAndBugFix' of https://github.c…
trishorts Oct 30, 2024
e49061d
seems fine
trishorts Oct 30, 2024
d6f0bcb
Merge branch 'master' into qValueThresholdAdjustmentAndBugFix
trishorts Oct 31, 2024
4975e08
Merge branch 'master' into qValueThresholdAdjustmentAndBugFix
elaboy Nov 4, 2024
3afcf09
close but no cigar
trishorts Nov 4, 2024
70705b4
Merge branch 'qValueThresholdAdjustmentAndBugFix' of https://github.c…
trishorts Nov 4, 2024
cef3bb3
jk
trishorts Nov 4, 2024
2bfe86a
dg
trishorts Nov 5, 2024
e4c6569
fh
trishorts Nov 5, 2024
6022547
maybe works finaly
trishorts Nov 5, 2024
35db00c
gk
trishorts Nov 6, 2024
312b02c
eliminate unneccessary changes to calibration task
trishorts Nov 6, 2024
6869d22
eliminate unneccesary spaces
trishorts Nov 6, 2024
6c3dee1
eliminate unneeded usings and spaces
trishorts Nov 6, 2024
45f44ad
same
trishorts Nov 6, 2024
b0bb0fa
more same
trishorts Nov 6, 2024
794353e
d
trishorts Nov 6, 2024
ca4fdc5
kg
trishorts Nov 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 35 additions & 14 deletions MetaMorpheus/EngineLayer/FdrAnalysis/FdrAnalysisEngine.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using EngineLayer.CrosslinkSearch;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;

namespace EngineLayer.FdrAnalysis
{
Expand All @@ -14,7 +12,17 @@ public class FdrAnalysisEngine : MetaMorpheusEngine
private readonly string AnalysisType;
private readonly string OutputFolder; // used for storing PEP training models
private readonly bool DoPEP;

private static bool qvalueThresholdOverride;
private readonly int PsmCountThresholdForInvertedQvalue = 1000;
/// <summary>
/// This is to be used only for unit testing. Threshold for q-value calculation is set to 1000
/// However, many unit tests don't generate that many PSMs. Therefore, this property is used to override the threshold
/// to enable PEP calculation in unit tests with lower number of PSMs
/// </summary>
public static bool QvalueThresholdOverride // property
{
set { qvalueThresholdOverride = value; } // set method
}
public FdrAnalysisEngine(List<SpectralMatch> psms, int massDiffAcceptorNumNotches, CommonParameters commonParameters,
List<(string fileName, CommonParameters fileSpecificParameters)> fileSpecificParameters, List<string> nestedIds, string analysisType = "PSM",
bool doPEP = true, string outputFolder = null) : base(commonParameters, fileSpecificParameters, nestedIds)
Expand Down Expand Up @@ -71,10 +79,10 @@ private void DoFalseDiscoveryRateAnalysis(FdrAnalysisResults myAnalysisResults)
.Select(b => b.FirstOrDefault())
.ToList();

if (psms.Count > 100 & DoPEP)
if ((psms.Count > PsmCountThresholdForInvertedQvalue || qvalueThresholdOverride) & DoPEP)
{
CalculateQValue(psms, peptideLevelCalculation: false, pepCalculation: false);
if (peptides.Count > 100 )
if (peptides.Count > PsmCountThresholdForInvertedQvalue || qvalueThresholdOverride)
{
CalculateQValue(peptides, peptideLevelCalculation: true, pepCalculation: false);

Expand Down Expand Up @@ -161,6 +169,7 @@ public void CalculateQValue(List<SpectralMatch> psms, bool peptideLevelCalculati
// Stop if canceled
if (GlobalVariables.StopLoops) { break; }

// we have to keep track of q-values separately for each notch
int notch = psm.Notch ?? MassDiffAcceptorNumNotches;
if (psm.IsDecoy)
{
Expand Down Expand Up @@ -199,7 +208,9 @@ public void CalculateQValue(List<SpectralMatch> psms, bool peptideLevelCalculati
}
else
{
if(psms.Count < 100)
//the QValueThreshodOverride condition here can be problematic in unit tests. If tests fail unexpectedly,
//try setting FdrAnalysisEngine.QvalueThresholdOverride = false; in the test method
if (psms.Count < PsmCountThresholdForInvertedQvalue && !qvalueThresholdOverride)
{

QValueTraditional(psms, peptideLevelAnalysis: peptideLevelCalculation);
Expand All @@ -217,39 +228,49 @@ public void CalculateQValue(List<SpectralMatch> psms, bool peptideLevelCalculati
private void QValueTraditional(List<SpectralMatch> psms, bool peptideLevelAnalysis)
{
double qValue = 0;
double qValueNotch = 0;
double[] qValueNotch = new double[MassDiffAcceptorNumNotches + 1];

for (int i = 0; i < psms.Count; i++)
{
// Stop if canceled
if (GlobalVariables.StopLoops) { break; }

int notch = psms[i].Notch ?? MassDiffAcceptorNumNotches;
qValue = Math.Max(qValue, psms[i].GetFdrInfo(peptideLevelAnalysis).CumulativeDecoy / Math.Max(psms[i].GetFdrInfo(peptideLevelAnalysis).CumulativeTarget, 1));
qValueNotch = Math.Max(qValueNotch, psms[i].GetFdrInfo(peptideLevelAnalysis).CumulativeDecoyNotch / Math.Max(psms[i].GetFdrInfo(peptideLevelAnalysis).CumulativeTargetNotch, 1));
qValueNotch[notch] = Math.Max(qValueNotch[notch], psms[i].GetFdrInfo(peptideLevelAnalysis).CumulativeDecoyNotch / Math.Max(psms[i].GetFdrInfo(peptideLevelAnalysis).CumulativeTargetNotch, 1));

psms[i].GetFdrInfo(peptideLevelAnalysis).QValue = Math.Min(qValue, 1);
psms[i].GetFdrInfo(peptideLevelAnalysis).QValueNotch = Math.Min(qValueNotch, 1);
psms[i].GetFdrInfo(peptideLevelAnalysis).QValueNotch = Math.Min(qValueNotch[notch], 1);
}
}

private static void QValueInverted(List<SpectralMatch> psms, bool peptideLevelAnalysis)
private void QValueInverted(List<SpectralMatch> psms, bool peptideLevelAnalysis)
{
double[] qValueNotch = new double[MassDiffAcceptorNumNotches + 1];
bool[] qValueNotchCalculated = new bool[MassDiffAcceptorNumNotches + 1];
psms.Reverse();
//this calculation is performed from bottom up. So, we begin the loop by computing qValue
//and qValueNotch for the last/lowest scoring psm in the bunch
double qValue = (psms[0].GetFdrInfo(peptideLevelAnalysis).CumulativeDecoy + 1) / psms[0].GetFdrInfo(peptideLevelAnalysis).CumulativeTarget;
double qValueNotch = (psms[0].GetFdrInfo(peptideLevelAnalysis).CumulativeDecoyNotch + 1) / psms[0].GetFdrInfo(peptideLevelAnalysis).CumulativeTargetNotch;

//Assign FDR values to PSMs
for (int i = 0; i < psms.Count; i++)
{
// Stop if canceled
if (GlobalVariables.StopLoops) { break; }
int notch = psms[i].Notch ?? MassDiffAcceptorNumNotches;

// populate the highest q-Value for each notch
if (!qValueNotchCalculated[notch])
{
qValueNotch[notch] = (psms[0].GetFdrInfo(peptideLevelAnalysis).CumulativeDecoyNotch + 1) / psms[0].GetFdrInfo(peptideLevelAnalysis).CumulativeTargetNotch;
qValueNotchCalculated[notch] = true;
}

qValue = Math.Min(qValue, (psms[i].GetFdrInfo(peptideLevelAnalysis).CumulativeDecoy + 1) / Math.Max(psms[i].GetFdrInfo(peptideLevelAnalysis).CumulativeTarget, 1));
qValueNotch = Math.Min(qValueNotch, (psms[i].GetFdrInfo(peptideLevelAnalysis).CumulativeDecoyNotch + 1) / Math.Max(psms[i].GetFdrInfo(peptideLevelAnalysis).CumulativeTargetNotch, 1));
qValueNotch[notch] = Math.Min(qValueNotch[notch], (psms[i].GetFdrInfo(peptideLevelAnalysis).CumulativeDecoyNotch + 1) / Math.Max(psms[i].GetFdrInfo(peptideLevelAnalysis).CumulativeTargetNotch, 1));

psms[i].GetFdrInfo(peptideLevelAnalysis).QValue = Math.Min(qValue, 1);
psms[i].GetFdrInfo(peptideLevelAnalysis).QValueNotch = Math.Min(qValueNotch, 1);
psms[i].GetFdrInfo(peptideLevelAnalysis).QValueNotch = Math.Min(qValueNotch[notch], 1);
}
psms.Reverse(); //we inverted the psms for this calculation. now we need to put them back into the original order
}
Expand Down
3 changes: 2 additions & 1 deletion MetaMorpheus/Test/MatchIonsOfAllCharges.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using Omics.Modifications;
using Omics.SpectrumMatch;
using static System.Net.WebRequestMethods;
using EngineLayer.FdrAnalysis;

namespace Test
{
Expand Down Expand Up @@ -408,6 +409,7 @@ public static void TestLibraryGeneration()

public static void TestLibraryUpdate()
{
FdrAnalysisEngine.QvalueThresholdOverride = false;
string thisTaskOutputFolder = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\SpectralLibrarySearch\UpdateLibrary");
_ = Directory.CreateDirectory(thisTaskOutputFolder);
SearchTask task = Toml.ReadFile<SearchTask>(Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\SpectralLibrarySearch\SpectralSearchTask.toml"), MetaMorpheusTask.tomlConfig);
Expand All @@ -425,7 +427,6 @@ public static void TestLibraryUpdate()

string rawCopy = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\SpectralLibrarySearch\UpdateLibrary\rawCopy.mzML");
System.IO.File.Copy(raw1, rawCopy);

EverythingRunnerEngine UpdateLibrary = new(new List<(string, MetaMorpheusTask)> { ("UpdateSpectraFileOutput", task) }, new List<string> { raw1, raw2 }, new List<DbForTask> { new DbForTask(lib, false), new DbForTask( db1,false), new DbForTask(db2, false) }, thisTaskOutputFolder);

UpdateLibrary.Run();
Expand Down
11 changes: 10 additions & 1 deletion MetaMorpheus/Test/MetaDraw/MetaDrawTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using Proteomics.ProteolyticDigestion;
using Readers;
using TaskLayer;
using EngineLayer.FdrAnalysis;

namespace Test.MetaDraw
{
Expand Down Expand Up @@ -229,6 +230,7 @@ public static void MetaDraw_TestStationarySequencePositioning()
[Test]
public static void MetaDraw_SearchTaskTest()
{
FdrAnalysisEngine.QvalueThresholdOverride = false;
string outputFolder = Path.Combine(TestContext.CurrentContext.TestDirectory, @"MetaDraw_SearchTaskTest");
string proteinDatabase = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\smalldb.fasta");
string spectraFile = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\SmallCalibratible_Yeast.mzML");
Expand Down Expand Up @@ -693,6 +695,7 @@ public static void TestMetaDrawXlSpectralLibrary()
[Test]
public static void MetaDraw_GlycoSearchTaskWithChildScansTest()
{
FdrAnalysisEngine.QvalueThresholdOverride = false;
string outputFolder = Path.Combine(TestContext.CurrentContext.TestDirectory, @"MetaDraw_GlycoSearchTaskTest");
string proteinDatabase = Path.Combine(TestContext.CurrentContext.TestDirectory, @"GlycoTestData\leukosialin.fasta");
string spectraFile = Path.Combine(TestContext.CurrentContext.TestDirectory, @"GlycoTestData\sliced_glyco_hcd_ethcd.raw");
Expand Down Expand Up @@ -854,6 +857,7 @@ public static void MetaDraw_GlycoSearchTaskWithChildScansTest()
[Test]
public static void MetaDraw_TestChimeraScanSpectrumDisplay()
{
FdrAnalysisEngine.QvalueThresholdOverride = false;
string outputFolder = Path.Combine(TestContext.CurrentContext.TestDirectory, @"MetaDraw_SearchTaskTest");
string proteinDatabase = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\hela_snip_for_unitTest.fasta");
string spectraFile = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\TaGe_SA_HeLa_04_subset_longestSeq.mzML");
Expand Down Expand Up @@ -1081,9 +1085,9 @@ public static void TestMetaDrawErrors()
}

[Test]
[NonParallelizable]
public static void TestMetaDrawLoadingWithWeirdFileNames()
{
FdrAnalysisEngine.QvalueThresholdOverride = false;
// test loading when the file has a periods, commas, spaces in the name
string outputFolder = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestMetaDrawLoadingWithWeirdFileNames");
string proteinDatabase = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\smalldb.fasta");
Expand Down Expand Up @@ -1133,6 +1137,7 @@ public static void TestMetaDrawLoadingWithWeirdFileNames()
[Test]
public static void TestMetaDrawWithSpectralLibrary()
{
FdrAnalysisEngine.QvalueThresholdOverride = false;
string outputFolder = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestMetaDrawWithSpectraLibrary");
string proteinDatabase = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\SpectralLibrarySearch\P16858.fasta");
string library1 = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\SpectralLibrarySearch\P16858_target.msp");
Expand Down Expand Up @@ -1210,6 +1215,7 @@ public static void TestMetaDrawWithSpectralLibrary()
[Test]
public static void TestPsmFromTsvIonParsing()
{
FdrAnalysisEngine.QvalueThresholdOverride = false;
string outputFolder = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestPsmFromTsvIonParsing");
string proteinDatabase = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\SpectralLibrarySearch\P16858.fasta");
string spectraFile = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\SpectralLibrarySearch\slicedMouse.raw");
Expand Down Expand Up @@ -1318,6 +1324,7 @@ public static void SequenceCoverageMapTest()
[Test]
public static void TestMetaDrawLogicCleanUp()
{
FdrAnalysisEngine.QvalueThresholdOverride = false;
string outputFolder = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestMetaDrawWithSpectraLibrary");
string proteinDatabase = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\SpectralLibrarySearch\P16858.fasta");
string library1 = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\SpectralLibrarySearch\P16858_target.msp");
Expand Down Expand Up @@ -1400,6 +1407,7 @@ public static void TestMetaDrawLogicCleanUp()
[Test]
public static void TestMetaDrawOutputFormats()
{
FdrAnalysisEngine.QvalueThresholdOverride = false;
string outputFolder = Path.Combine(TestContext.CurrentContext.TestDirectory, @"MetaDraw_SearchTaskTest");
string proteinDatabase = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\smalldb.fasta");
string spectraFile = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\SmallCalibratible_Yeast.mzML");
Expand Down Expand Up @@ -1509,6 +1517,7 @@ public static void EnsureNoCrashesWithNGlyco()
[Test]
public static void TestMetaDrawSequenceDisplayOutputs()
{
FdrAnalysisEngine.QvalueThresholdOverride = false;
string outputFolder = Path.Combine(TestContext.CurrentContext.TestDirectory, @"MetaDraw_SearchTaskTest");
string proteinDatabase = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\smalldb.fasta");
string spectraFile = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\SmallCalibratible_Yeast.mzML");
Expand Down
2 changes: 2 additions & 0 deletions MetaMorpheus/Test/MetaDraw/SpectrumMatchPlotTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Omics.Fragmentation;
using Readers;
using TaskLayer;
using EngineLayer.FdrAnalysis;

namespace Test.MetaDraw
{
Expand All @@ -31,6 +32,7 @@ public class SpectrumMatchPlotTests
[OneTimeSetUp]
public void Setup()
{
FdrAnalysisEngine.QvalueThresholdOverride = false;
outputFolder = Path.Combine(TestContext.CurrentContext.TestDirectory, @"MetaDraw_PeakAnnotaitonTest");
string proteinDatabase = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\smalldb.fasta");
string spectraFile = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\SmallCalibratible_Yeast.mzML");
Expand Down
10 changes: 9 additions & 1 deletion MetaMorpheus/Test/PostSearchAnalysisTaskTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using NUnit.Framework; using Assert = NUnit.Framework.Legacy.ClassicAssert;
using EngineLayer.FdrAnalysis;
using NUnit.Framework;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

namespace Test
{
Expand All @@ -18,6 +20,7 @@ public static class PostSearchAnalysisTaskTests
[Test]
public static void AllResultsAndResultsTxtContainsCorrectValues_QValue_BottomUp()
{
FdrAnalysisEngine.QvalueThresholdOverride = true;
//First test that AllResults and Results display correct numbers of peptides and psms with q-value filter on
EverythingRunnerEngineTestCase.TryGetTestCase(EverythingRunnerEngineTestCases.BottomUpQValue, out var testCase);
string outputFolder = testCase.OutputDirectory;
Expand Down Expand Up @@ -68,11 +71,13 @@ public static void AllResultsAndResultsTxtContainsCorrectValues_QValue_BottomUp(
Assert.AreEqual("All target PSMs with q-value <= 0.01: " + TaGe_SA_A549_3_snip_2ExpectedPsms, singleFileResults[5]);
Assert.AreEqual("All target peptides with q-value <= 0.01: " + TaGe_SA_A549_3_snip_2ExpectedPeptides, singleFileResults[6]);
Assert.AreEqual("All target protein groups with q-value <= 0.01 (1% FDR): 165", singleFileResults[7]);
FdrAnalysisEngine.QvalueThresholdOverride = false;
}

[Test]
public static void AllResultsAndResultsTxtContainsCorrectValues_PepQValue_BottomUp()
{
FdrAnalysisEngine.QvalueThresholdOverride = true;
//First test that AllResults and Results display correct numbers of peptides and psms with pep q-value filter on
EverythingRunnerEngineTestCase.TryGetTestCase(EverythingRunnerEngineTestCases.BottomUpPepQValue, out var testCase);
string outputFolder = testCase.OutputDirectory;
Expand All @@ -99,6 +104,7 @@ public static void AllResultsAndResultsTxtContainsCorrectValues_PepQValue_Bottom
Assert.AreEqual("TaGe_SA_A549_3_snip_2 - Target PSMs with pep q-value <= 0.01: 190", results[13]);
Assert.AreEqual("TaGe_SA_A549_3_snip_2 - Target peptides with pep q-value <= 0.01: 153", results[14]);
Assert.AreEqual("TaGe_SA_A549_3_snip_2 - Target protein groups within 1 % FDR: 140", results[15]);
FdrAnalysisEngine.QvalueThresholdOverride = false;
}

/// <summary>
Expand All @@ -108,6 +114,7 @@ public static void AllResultsAndResultsTxtContainsCorrectValues_PepQValue_Bottom
[TestCaseSource(nameof(GetTestCases))]
public static void AllResultTxtContainsCorrectNumberOfResultLines(EverythingRunnerEngineTestCases testCaseIdentifier)
{
FdrAnalysisEngine.QvalueThresholdOverride = false;
var testCase = EverythingRunnerEngineTestCase.GetTestCase(testCaseIdentifier);

int expectedIndividualFileLines = testCase.DataFileList.Count == 1 || !testCase.WriteIndividualResults
Expand Down Expand Up @@ -153,6 +160,7 @@ public static void AllResultTxtContainsCorrectNumberOfResultLines(EverythingRunn
[TestCaseSource(nameof(GetTestCases))]
public static void CorrectFilesAreWrittenWithCorrectName(EverythingRunnerEngineTestCases testCaseIdentifier)
{
FdrAnalysisEngine.QvalueThresholdOverride = false;
var testCase = EverythingRunnerEngineTestCase.GetTestCase(testCaseIdentifier);
var psmFiles = Directory.GetFiles(testCase.OutputDirectory, "*PSMs.psmtsv", SearchOption.AllDirectories);
var pepXmlFiles = Directory.GetFiles(testCase.OutputDirectory, "*.pep.xml", SearchOption.AllDirectories);
Expand Down
3 changes: 3 additions & 0 deletions MetaMorpheus/Test/ProteinGroupTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Omics.Digestion;
using Omics.Modifications;
using UsefulProteomicsDatabases;
using EngineLayer.FdrAnalysis;

namespace Test
{
Expand Down Expand Up @@ -206,6 +207,8 @@ public static void TestModificationInfoListInProteinGroupsOutput()
string mzmlName = @"TestData\PrunedDbSpectra.mzml";
string fastaName = @"TestData\DbForPrunedDb.fasta";
string outputFolder = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestPrunedGeneration");

FdrAnalysisEngine.QvalueThresholdOverride = false;
var engine = new EverythingRunnerEngine(taskList, new List<string> { mzmlName }, new List<DbForTask> { new DbForTask(fastaName, false) }, outputFolder);
engine.Run();
string final = Path.Combine(MySetUpClass.outputFolder, "task2", "DbForPrunedDbGPTMDproteinPruned.xml");
Expand Down
2 changes: 2 additions & 0 deletions MetaMorpheus/Test/QuantificationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using System.Text;
using Omics.Modifications;
using TaskLayer;
using EngineLayer.FdrAnalysis;

namespace Test
{
Expand Down Expand Up @@ -224,6 +225,7 @@ public static void TestProteinQuantFileHeaders(bool hasDefinedExperimentalDesign
}

// run the search/quantification
FdrAnalysisEngine.QvalueThresholdOverride = false;
SearchTask task = new SearchTask();
task.RunTask(unitTestFolder, new List<DbForTask> { new DbForTask(dbName, false) }, fileInfos.Select(p => p.FullFilePathWithExtension).ToList(), "");

Expand Down
Loading