Skip to content

Commit

Permalink
mzlib update to 504 which removes zero intensity peaks (#2102)
Browse files Browse the repository at this point in the history
  • Loading branch information
trishorts authored Nov 11, 2021
1 parent f7b7bde commit 0a8df46
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 1,210 deletions.
2 changes: 1 addition & 1 deletion CMD/CMD.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<PackageReference Include="Microsoft.ML" Version="1.3.1" />
<PackageReference Include="Microsoft.ML.FastTree" Version="1.3.1" />
<PackageReference Include="Microsoft.NETCore.App" Version="2.2.8" />
<PackageReference Include="mzLib" Version="1.0.500" />
<PackageReference Include="mzLib" Version="1.0.504" />
<PackageReference Include="Nett" Version="0.13.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion EngineLayer/EngineLayer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageReference Include="Microsoft.ML" Version="1.3.1" />
<PackageReference Include="Microsoft.ML.FastTree" Version="1.3.1" />
<PackageReference Include="Microsoft.NETCore.App" Version="2.2.8" />
<PackageReference Include="mzLib" Version="1.0.500" />
<PackageReference Include="mzLib" Version="1.0.504" />
<PackageReference Include="NETStandard.Library" Version="2.0.3" />
<PackageReference Include="Nett" Version="0.13.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
Expand Down
2 changes: 1 addition & 1 deletion GUI/GUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<PackageReference Include="Microsoft.ML.DataView" Version="1.3.1" />
<PackageReference Include="Microsoft.ML.FastTree" Version="1.3.1" />
<PackageReference Include="Microsoft.NETCore.App" Version="2.2.8" />
<PackageReference Include="mzLib" Version="1.0.500" />
<PackageReference Include="mzLib" Version="1.0.504" />
<PackageReference Include="Nett" Version="0.13.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="OxyPlot.Core" Version="2.0.0" />
Expand Down
2 changes: 1 addition & 1 deletion GuiFunctions/GuiFunctions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<ItemGroup>
<PackageReference Include="itext7" Version="7.1.13" />
<PackageReference Include="mzLib" Version="1.0.500" />
<PackageReference Include="mzLib" Version="1.0.504" />
<PackageReference Include="OxyPlot.Wpf" Version="2.0.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion TaskLayer/TaskLayer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageReference Include="Microsoft.ML" Version="1.3.1" />
<PackageReference Include="Microsoft.ML.FastTree" Version="1.3.1" />
<PackageReference Include="Microsoft.NETCore.App" Version="2.2.8" />
<PackageReference Include="mzLib" Version="1.0.500" />
<PackageReference Include="mzLib" Version="1.0.504" />
<PackageReference Include="NetSerializer" Version="4.1.1" />
<PackageReference Include="Nett" Version="0.13.0" />
</ItemGroup>
Expand Down
28 changes: 1 addition & 27 deletions Test/CalibrationTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using EngineLayer;
using EngineLayer.Calibration;
using FlashLFQ;
using MassSpectrometry;
using NUnit.Framework;
Expand Down Expand Up @@ -68,33 +69,6 @@ public static void ExperimentalDesignCalibrationTest(string nonCalibratedFile)
Directory.Delete(unitTestFolder, true);
}

[Test]
public static void CalibrationZeroIntensityTest()
{
//check that peaks with zero intensity don't crash the program

// set up directories
string unitTestFolder = Path.Combine(TestContext.CurrentContext.TestDirectory, @"ExperimentalDesignCalibrationTest");
string outputFolder = Path.Combine(unitTestFolder, @"TaskOutput");
Directory.CreateDirectory(unitTestFolder);
Directory.CreateDirectory(outputFolder);

// set up original spectra file (input to calibration)
string nonCalibratedFilePath = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\withZeros.mzML");
MyFileManager myFileManager = new MyFileManager(false);

MsDataFile myMsDataFile = myFileManager.LoadFile(nonCalibratedFilePath, new CommonParameters());
Assert.IsTrue(myMsDataFile.GetAllScansList().Any(x => x.MassSpectrum.YArray.Contains(0)));


// protein db
string myDatabase = Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData\zero.fasta.gz");

// run calibration
CalibrationTask calibrationTask = new CalibrationTask();
calibrationTask.RunTask(outputFolder, new List<DbForTask> { new DbForTask(myDatabase, false) }, new List<string> { nonCalibratedFilePath }, "test");
}

[Test]
public static void CalibrationTestLowRes()
{
Expand Down
8 changes: 1 addition & 7 deletions Test/Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.ML" Version="1.3.1" />
<PackageReference Include="Microsoft.ML.FastTree" Version="1.3.1" />
<PackageReference Include="mzLib" Version="1.0.500" />
<PackageReference Include="mzLib" Version="1.0.504" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
Expand Down Expand Up @@ -235,18 +235,12 @@
<None Update="TestData\VariantCrossTest.psmtsv">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="TestData\withZeros.mzML">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="TestData\XCorrSearchTest_AllPSMs.psmtsv">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="TestData\XCorrUnitTest.tsv">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="TestData\zero.fasta.gz">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="testFileParams.toml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
1,171 changes: 0 additions & 1,171 deletions Test/TestData/withZeros.mzML

This file was deleted.

Binary file removed Test/TestData/zero.fasta.gz
Binary file not shown.

0 comments on commit 0a8df46

Please sign in to comment.