diff --git a/src/main/java/edu/ucsd/msjava/parser/MgfSpectrumParser.java b/src/main/java/edu/ucsd/msjava/parser/MgfSpectrumParser.java index 613b222..2fdd9ab 100644 --- a/src/main/java/edu/ucsd/msjava/parser/MgfSpectrumParser.java +++ b/src/main/java/edu/ucsd/msjava/parser/MgfSpectrumParser.java @@ -165,11 +165,16 @@ public Spectrum readSpectrum(LineReader lineReader) { } else if (buf.startsWith("SCANS")) { if (buf.matches(".+=\\d+-\\d+")) // e.g. SCANS=953-959 { + // Scan range + // SCANS=7654-7662 int startScanNum = Integer.parseInt(buf.substring(buf.indexOf('=') + 1, buf.lastIndexOf('-'))); int endScanNum = Integer.parseInt(buf.substring(buf.lastIndexOf('-') + 1)); spec.setStartScanNum(startScanNum); spec.setEndScanNum(endScanNum); } else { + // Single scan + // SCANS=1106 + // Look for a single integer after the equals sign try { int scanNum = Integer.valueOf(buf.substring(buf.indexOf("=") + 1)); @@ -343,6 +348,12 @@ public Map getSpecMetaInfoMap(BufferedRandomAccessLin String title = buf.substring(buf.indexOf('=') + 1); metaInfo.setAdditionalInfo("title", title); } else if (buf.startsWith("PEPMASS")) { + // This could be a single mass + // PEPMASS=494.5596 + + // Or a mass, intensity, and charge + // PEPMASS=570.85805 2840724.1 2 + String[] token = buf.substring(buf.indexOf("=") + 1).split("\\s+"); float precursorMz = Float.valueOf(token[0]); metaInfo.setPrecursorMz(precursorMz); diff --git a/src/main/java/edu/ucsd/msjava/ui/MSGFPlus.java b/src/main/java/edu/ucsd/msjava/ui/MSGFPlus.java index 4978891..a54e4d9 100644 --- a/src/main/java/edu/ucsd/msjava/ui/MSGFPlus.java +++ b/src/main/java/edu/ucsd/msjava/ui/MSGFPlus.java @@ -22,8 +22,8 @@ public class MSGFPlus { - public static final String VERSION = "Release (v2021.09.06)"; - public static final String RELEASE_DATE = "06 September 2021"; + public static final String VERSION = "Release (v2022.01.07)"; + public static final String RELEASE_DATE = "07 January 2022"; public static final String DECOY_DB_EXTENSION = ".revCat.fasta"; public static final String DEFAULT_DECOY_PROTEIN_PREFIX = "XXX";