diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 3efc89e51..dca2c6509 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -88,5 +88,15 @@ jobs: run: cd ./MetaMorpheus/MetaMorpheus && dotnet build --no-restore - name: Test run: cd ./MetaMorpheus/MetaMorpheus && dotnet test --no-build --verbosity normal - + - name: Upload artifact (installer) + uses: actions/upload-artifact@v4 + with: + name: MetaMorpheusInstaller + path: ./MetaMorpheus/MetaMorpheus/MetaMorpheusSetup/bin/Debug/MetaMorpheusInstaller.msi + compression-level: 0 + - name: Upload artifact (GUI) + uses: actions/upload-artifact@v4 + with: + name: MetaMorpheusGUI + path: ./MetaMorpheus/MetaMorpheus/GUI/bin/Debug/net8.0-windows/ diff --git a/mzLib/MassSpectrometry/MzSpectra/MzSpectrum.cs b/mzLib/MassSpectrometry/MzSpectra/MzSpectrum.cs index 315c4a6b7..62422cc96 100644 --- a/mzLib/MassSpectrometry/MzSpectra/MzSpectrum.cs +++ b/mzLib/MassSpectrometry/MzSpectra/MzSpectrum.cs @@ -498,7 +498,7 @@ public byte[] Get64BitYarray() public byte[] Get64BitXarray() { - return Get64Bitarray(XArray.Select(x => Math.Round(x, 4))); + return Get64Bitarray(XArray); } public override string ToString() diff --git a/mzLib/Test/FileReadingTests/TestMsDataFileToResultsAdapter.cs b/mzLib/Test/FileReadingTests/TestMsDataFileToResultsAdapter.cs index fe2e50de0..9328ded99 100644 --- a/mzLib/Test/FileReadingTests/TestMsDataFileToResultsAdapter.cs +++ b/mzLib/Test/FileReadingTests/TestMsDataFileToResultsAdapter.cs @@ -137,7 +137,7 @@ public void TestWriting(string filePath, string outfile, int loop) Assert.That(readInScan.MsnOrder.Equals(writtenScan.MsnOrder)); Assert.That(readInScan.IsCentroid.Equals(writtenScan.IsCentroid)); Assert.That(readInScan.MassSpectrum.YArray, Is.EquivalentTo(writtenScan.MassSpectrum.YArray)); - Assert.That(readInScan.MassSpectrum.XArray, Is.EquivalentTo(writtenScan.MassSpectrum.XArray.Select(x => Math.Round(x, 4)))); + Assert.That(readInScan.MassSpectrum.XArray, Is.EquivalentTo(writtenScan.MassSpectrum.XArray)); } File.Delete(outfile); diff --git a/mzLib/Test/FileReadingTests/TestMzML.cs b/mzLib/Test/FileReadingTests/TestMzML.cs index 2855805c3..63107e471 100644 --- a/mzLib/Test/FileReadingTests/TestMzML.cs +++ b/mzLib/Test/FileReadingTests/TestMzML.cs @@ -741,8 +741,7 @@ public void WriteMzmlTest() Assert.AreEqual(2, reader.GetClosestOneBasedSpectrumNumber(2)); var newFirstValue = reader.GetOneBasedScan(1).MassSpectrum.FirstX; - Assert.AreNotEqual(oldFirstValue.Value, newFirstValue.Value); - Assert.AreEqual(Math.Round((double)oldFirstValue, 4), newFirstValue.Value, 1e-6); + Assert.AreEqual(oldFirstValue.Value, newFirstValue.Value); var secondScan2 = reader.GetOneBasedScan(2); @@ -1452,32 +1451,6 @@ public void MzmlFindPrecursorReferenceScan() Assert.AreEqual(1, fakeMzml1.GetAllScansList().ElementAt(3).OneBasedPrecursorScanNumber); } - [Test] - public void TestMzmlWriterRounding() - { - // This test ensure the CreateAndWriteMzml method only writes m/z values out to 4 decimal places of precision - MsDataScan[] scans = new MsDataScan[1]; - - double[] intensities0 = new double[] { 1, 1, 1, 1 }; - double[] mz0 = new double[] { 50.00014, 50.00015, 50.0004, 50.0005 }; - MzSpectrum massSpec0 = new MzSpectrum(mz0, intensities0, false); - scans[0] = new MsDataScan(massSpec0, 1, 1, true, Polarity.Positive, 1, new MzRange(1, 100), "f", MZAnalyzerType.Orbitrap, massSpec0.SumOfAllY, null, null, "1"); - - FakeMsDataFile fakeFile = new FakeMsDataFile(scans); - MzmlMethods.CreateAndWriteMyMzmlWithCalibratedSpectra(fakeFile, Path.Combine(TestContext.CurrentContext.TestDirectory, "what.mzML"), false); - var fakeMzml = - MsDataFileReader.GetDataFile(Path.Combine(TestContext.CurrentContext.TestDirectory, "what.mzML")); - fakeMzml.LoadAllStaticData(); - - var readSpectrum = fakeMzml.Scans[0].MassSpectrum; - - // Ensure that the spectrum was rounded to the fourth decimal place on write - Assert.That(readSpectrum.XArray[0], Is.EqualTo(50.0001).Within(0.000001)); - Assert.That(readSpectrum.XArray[1], Is.EqualTo(50.0002).Within(0.000001)); - Assert.That(readSpectrum.XArray[2], Is.EqualTo(50.0004).Within(0.000001)); - Assert.That(readSpectrum.XArray[3], Is.EqualTo(50.0005).Within(0.000001)); - } - [Test] [TestCase("tester.mzml")] [TestCase("SmallCalibratibleYeast.mzml")] diff --git a/mzLib/Test/FileReadingTests/TestRawFileReader.cs b/mzLib/Test/FileReadingTests/TestRawFileReader.cs index 9c5039578..7ebfae6ff 100644 --- a/mzLib/Test/FileReadingTests/TestRawFileReader.cs +++ b/mzLib/Test/FileReadingTests/TestRawFileReader.cs @@ -172,9 +172,10 @@ public static void TestPeakFilteringRawFileReader(string infile) for (int j = 0; j < mzmlScan.MassSpectrum.XArray.Length; j++) { double roundedRawMz = Math.Round(rawScan.MassSpectrum.XArray[j], 4); + double roundedMzmlMz = Math.Round(mzmlScan.MassSpectrum.XArray[j], 4); // XArray is rounded to the 4th digit during CreateAndWrite - Assert.AreEqual(mzmlScan.MassSpectrum.XArray[j], roundedRawMz); + Assert.AreEqual(roundedMzmlMz, roundedRawMz); double roundedMzmlIntensity = Math.Round(mzmlScan.MassSpectrum.XArray[j], 0); double roundedRawIntensity = Math.Round(rawScan.MassSpectrum.XArray[j], 0); diff --git a/mzLib/TestFlashLFQ/TestFlashLFQ.cs b/mzLib/TestFlashLFQ/TestFlashLFQ.cs index 9def997ce..430f75d67 100644 --- a/mzLib/TestFlashLFQ/TestFlashLFQ.cs +++ b/mzLib/TestFlashLFQ/TestFlashLFQ.cs @@ -1493,7 +1493,7 @@ public static void ProteoformPeakfindingTest() Assert.That((int)results.PeptideModifiedSequences[sequence].GetIntensity(file1) == 1386491); ChromatographicPeak peak = results.Peaks[file1].First(p => p.Identifications.First().ModifiedSequence == sequence); - Assert.That(Math.Round(peak.MassError, 3), Is.EqualTo(0.006).Within(0.0001)); + Assert.That(Math.Round(peak.MassError, 3), Is.EqualTo(0)); Assert.That(peak.IsotopicEnvelopes.Count == 10); } diff --git a/mzLib/mzLib.nuspec b/mzLib/mzLib.nuspec index 6829c9050..d23d69f82 100644 --- a/mzLib/mzLib.nuspec +++ b/mzLib/mzLib.nuspec @@ -24,6 +24,7 @@ + @@ -39,6 +40,7 @@ +