Example #1
0
        private List <MSSpectra> GetSpectra(string path)
        {
            var spectrum = new MSSpectra();

            spectrum.Peptides = new List <Peptide>();
            IMsMsSpectraReader reader = new MgfFileReader();
            var spectra = reader.Read(path);

            return(spectra);
        }
Example #2
0
        public void TestMgfReader(string mgfFileName, int expectedScanCount, int expectedMS1, int expectedMS2)
        {
            var expectedScanInfo = GetExpectedDtaOrMgfScanInfo(mgfFileName);

            var dataFile = FindInputFile(mgfFileName);

            var reader = new MgfFileReader();

            reader.OpenFile(dataFile.FullName);

            ValidateScanInfoUsingReader(reader, expectedScanCount, expectedMS1, expectedMS2, expectedScanInfo);
        }