diff --git a/MainClass.cs b/MainClass.cs index 4ccf364..e2e346d 100644 --- a/MainClass.cs +++ b/MainClass.cs @@ -20,7 +20,7 @@ public static class MainClass private static readonly ILog Log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - public const string Version = "1.4.3"; + public const string Version = "1.4.4"; public static void Main(string[] args) { // Set Invariant culture as default for all further processing @@ -83,15 +83,15 @@ private static void XicParametersParsing(string[] args) v => parameters.printJsonExample = v != null }, { - "o=|output=", - "The output directory. Specify this or an output file. Specifying neither writes to the input directory.", - v => outputDirectory = v - }, - { - "b=|output_file", + "b=|output=", "The output file. Specify this or an output directory. Specifying neither writes to the input directory.", v => outputFile = v }, + { + "o=|output_directory=", + "The output directory. Specify this or an output file. Specifying neither writes to the input directory.", + v => outputDirectory = v + }, { "6|base64", "Encodes the content of the xic vectors as base 64 encoded string.", @@ -103,7 +103,7 @@ private static void XicParametersParsing(string[] args) v => parameters.stdout = v != null }, { - "w|warningsAreErrors", "Return non-zero exit code for warnings; default only for errors", + "w|warningsAreErrors", "Return non-zero exit code for warnings; default only for errors", v => parameters.Vigilant = v != null }, { @@ -338,7 +338,7 @@ private static void SpectrumQueryParametersParsing(string[] args) v => parameters.scans = v }, { - "b=|output_file", + "b=|output=", "The output file. Specifying none writes the output file to the input file parent directory.", v => parameters.outputFile = v }, @@ -510,15 +510,15 @@ private static void RegularParametersParsing(string[] args) v => parseInput.RawDirectoryPath = v }, { - "o=|output=", - "The output directory. Specify this or an output file -b. Specifying neither writes to the input directory.", - v => parseInput.OutputDirectory = v - }, - { - "b=|output_file", + "b=|output=", "The output file. Specify this or an output directory -o. Specifying neither writes to the input directory.", v => parseInput.OutputFile = v }, + { + "o=|output_directory=", + "The output directory. Specify this or an output file -b. Specifying neither writes to the input directory.", + v => parseInput.OutputDirectory = v + }, { "s|stdout", "Write to standard output. Cannot be combined with file or directory output. Implies silent logging, i.e. logging level 0", @@ -766,6 +766,8 @@ private static void RegularParametersParsing(string[] args) if (parseInput.OutputFormat == OutputFormat.IndexMzML) parseInput.OutputFormat = OutputFormat.MzML; } + parseInput.MaxLevel = parseInput.MsLevel.Max(); + if (parseInput.S3Url != null && parseInput.S3AccessKeyId != null && parseInput.S3SecretAccessKey != null && parseInput.BucketName != null) if (Uri.IsWellFormedUriString(parseInput.S3Url, UriKind.Absolute)) diff --git a/ParseInput.cs b/ParseInput.cs index e6b6475..2172a8c 100644 --- a/ParseInput.cs +++ b/ParseInput.cs @@ -96,6 +96,8 @@ public int Warnings public HashSet MsLevel { get; set; } + public int MaxLevel { get; set; } + public bool MgfPrecursor { get; set; } public bool NoiseData { get; set; } @@ -136,6 +138,7 @@ public ParseInput() Vigilant = false; _errors = 0; _warnings = 0; + MaxLevel = 10; } public ParseInput(string rawFilePath, string rawDirectoryPath, string outputDirectory, OutputFormat outputFormat diff --git a/README.md b/README.md index e9b35b6..c382b22 100644 --- a/README.md +++ b/README.md @@ -59,12 +59,13 @@ optional subcommands are xic|query (use [subcommand] -h for more info]): -d, --input_directory=VALUE The directory containing the raw files (Required). Specify this or an input raw file -i. - -o, --output=VALUE The output directory. Specify this or an output - file -b. Specifying neither writes to the input - directory. - -b, --output_file=VALUE The output file. Specify this or an output + -b, --output=VALUE The output file. Specify this or an output directory -o. Specifying neither writes to the input directory. + -o, --output_directory=VALUE + The output directory. Specify this or an output + file -b. Specifying neither writes to the input + directory. -s, --stdout Write to standard output. Cannot be combined with file or directory output. Implies silent logging, i.e. logging level 0 @@ -137,7 +138,7 @@ usage is: -h, --help Prints out the options. -i, --input=VALUE The raw file input (Required). -n, --scans=VALUE The scan numbers. e.g. "1-5, 20, 25-30" - -b, --output_file=VALUE The output file. Specifying none writes the output + -b, --output=VALUE The output file. Specifying none writes the output file to the input file parent directory. -p, --noPeakPicking Don't use the peak picking provided by the native Thermo library. By default peak picking is @@ -169,12 +170,13 @@ ThermoRawFileParser.exe xic --help Specify this or an input file -i. -j, --json=VALUE The json input file (Required). -p, --print_example Show a json input file example. - -o, --output=VALUE The output directory. Specify this or an output - file. Specifying neither writes to the input - directory. - -b, --output_file=VALUE The output file. Specify this or an output + -b, --output=VALUE The output file. Specify this or an output directory. Specifying neither writes to the input directory. + -o, --output_directory=VALUE + The output directory. Specify this or an output + file. Specifying neither writes to the input + directory. -6, --base64 Encodes the content of the xic vectors as base 64 encoded string. -s, --stdout Pipes the output into standard output. Logging is diff --git a/Util/CVHelpers.cs b/Util/CVHelpers.cs index cf7c617..62232b5 100644 --- a/Util/CVHelpers.cs +++ b/Util/CVHelpers.cs @@ -1,4 +1,5 @@ -using ThermoRawFileParser.Writer.MzML; +using System.Collections.Generic; +using ThermoRawFileParser.Writer.MzML; namespace ThermoRawFileParser.Util { @@ -18,4 +19,17 @@ public static CVParamType Copy (this CVParamType old) }; } } + + public class CVComparer : IEqualityComparer + { + public bool Equals(CVParamType cv1, CVParamType cv2) + { + return cv1.accession == cv2.accession; + } + + public int GetHashCode(CVParamType cv) + { + return cv.accession.GetHashCode(); + } + } } diff --git a/Writer/MetadataWriter.cs b/Writer/MetadataWriter.cs index 663ec13..ed9a76d 100644 --- a/Writer/MetadataWriter.cs +++ b/Writer/MetadataWriter.cs @@ -4,7 +4,6 @@ using System.IO; using System.Linq; using System.Reflection; -using System.Web.WebSockets; using log4net; using Newtonsoft.Json; using ThermoFisher.CommonCore.Data; @@ -122,16 +121,14 @@ public void WriteMetadata(IRawDataPlus rawFile, int firstScanNumber, int lastSca switch (_parseInput.MetadataFormat) { case MetadataFormat.JSON: - _metadataFileName = _parseInput.MetadataOutputFile != null - ? _parseInput.MetadataOutputFile - : Path.Combine(_parseInput.OutputDirectory, _parseInput.RawFileNameWithoutExtension) + + _metadataFileName = _parseInput.MetadataOutputFile ?? + Path.Combine(_parseInput.OutputDirectory, _parseInput.RawFileNameWithoutExtension) + "-metadata.json"; WriteJsonMetada(rawFile, firstScanNumber, lastScanNumber); break; case MetadataFormat.TXT: - _metadataFileName = _parseInput.MetadataOutputFile != null - ? _parseInput.MetadataOutputFile - : Path.Combine(_parseInput.OutputDirectory, _parseInput.RawFileNameWithoutExtension) + + _metadataFileName = _parseInput.MetadataOutputFile ?? + Path.Combine(_parseInput.OutputDirectory, _parseInput.RawFileNameWithoutExtension) + "-metadata.txt"; WriteTextMetadata(rawFile, firstScanNumber, lastScanNumber); break; @@ -176,43 +173,40 @@ private void WriteJsonMetada(IRawDataPlus rawFile, int firstScanNumber, int last metadata.addInstrumentProperty(new CVTerm("AFR:0001259", "AFO", "firmware version", rawFile.GetInstrumentData().HardwareVersion)); } - } - - // MS Data - foreach (KeyValuePair entry in msTypes) - { - if (entry.Key.Equals(MSOrderType.Ms.ToString())) - metadata.addMSData(new CVTerm("PRIDE:0000481", "PRIDE", "Number of MS1 spectra", - entry.Value.ToString())); - if (entry.Key.Equals(MSOrderType.Ms2.ToString())) - metadata.addMSData(new CVTerm("PRIDE:0000482", "PRIDE", "Number of MS2 spectra", - entry.Value.ToString())); - if (entry.Key.Equals(MSOrderType.Ms3.ToString())) - metadata.addMSData(new CVTerm("PRIDE:0000483", "PRIDE", "Number of MS3 spectra", - entry.Value.ToString())); - } - - metadata.addMSData(new CVTerm("PRIDE:0000472", "PRIDE", "MS min charge", - minCharge.ToString(CultureInfo.InvariantCulture))); - metadata.addMSData(new CVTerm("PRIDE:0000473", "PRIDE", "MS max charge", - maxCharge.ToString(CultureInfo.InvariantCulture))); - - metadata.addMSData(new CVTerm("PRIDE:0000474", "PRIDE", "MS min RT", - minTime.ToString(CultureInfo.InvariantCulture))); - metadata.addMSData(new CVTerm("PRIDE:0000475", "PRIDE", "MS max RT", - maxTime.ToString(CultureInfo.InvariantCulture))); - - metadata.addMSData(new CVTerm("PRIDE:0000476", "PRIDE", "MS min MZ", - minMz.ToString(CultureInfo.InvariantCulture))); - metadata.addMSData(new CVTerm("PRIDE:0000477", "PRIDE", "MS max MZ", - maxMz.ToString(CultureInfo.InvariantCulture))); - - // Scan Settings - // Get the start and end time from the RAW file - - if (rawFile.SelectMsData()) - { + + + // MS Data + foreach (KeyValuePair entry in msTypes) + { + if (entry.Key.Equals(MSOrderType.Ms.ToString())) + metadata.addMSData(new CVTerm("PRIDE:0000481", "PRIDE", "Number of MS1 spectra", + entry.Value.ToString())); + if (entry.Key.Equals(MSOrderType.Ms2.ToString())) + metadata.addMSData(new CVTerm("PRIDE:0000482", "PRIDE", "Number of MS2 spectra", + entry.Value.ToString())); + if (entry.Key.Equals(MSOrderType.Ms3.ToString())) + metadata.addMSData(new CVTerm("PRIDE:0000483", "PRIDE", "Number of MS3 spectra", + entry.Value.ToString())); + } + + metadata.addMSData(new CVTerm("PRIDE:0000472", "PRIDE", "MS min charge", + minCharge.ToString(CultureInfo.InvariantCulture))); + metadata.addMSData(new CVTerm("PRIDE:0000473", "PRIDE", "MS max charge", + maxCharge.ToString(CultureInfo.InvariantCulture))); + + metadata.addMSData(new CVTerm("PRIDE:0000474", "PRIDE", "MS min RT", + minTime.ToString(CultureInfo.InvariantCulture))); + metadata.addMSData(new CVTerm("PRIDE:0000475", "PRIDE", "MS max RT", + maxTime.ToString(CultureInfo.InvariantCulture))); + + metadata.addMSData(new CVTerm("PRIDE:0000476", "PRIDE", "MS min MZ", + minMz.ToString(CultureInfo.InvariantCulture))); + metadata.addMSData(new CVTerm("PRIDE:0000477", "PRIDE", "MS max MZ", + maxMz.ToString(CultureInfo.InvariantCulture))); + + // Scan Settings + // Get the start and end time from the RAW file var runHeaderEx = rawFile.RunHeaderEx; var startTime = runHeaderEx.StartTime; var endTime = runHeaderEx.EndTime; @@ -373,21 +367,20 @@ private void WriteTextMetadata(IRawDataPlus rawFile, int firstScanNumber, int la { output.Add("Firmware version=" + rawFile.GetInstrumentData().HardwareVersion); } - } - - // MS Data - output.Add("#MsData"); - foreach (KeyValuePair entry in msTypes) - { - if (entry.Key.Equals(MSOrderType.Ms.ToString())) - output.Add("Number of MS1 spectra=" + entry.Value); - if (entry.Key.Equals(MSOrderType.Ms2.ToString())) - output.Add("Number of MS2 spectra=" + entry.Value); - if (entry.Key.Equals(MSOrderType.Ms3.ToString())) - output.Add("Number of MS3 spectra=" + entry.Value); - } - output.AddRange(new List + // MS Data + output.Add("#MsData"); + foreach (KeyValuePair entry in msTypes) + { + if (entry.Key.Equals(MSOrderType.Ms.ToString())) + output.Add("Number of MS1 spectra=" + entry.Value); + if (entry.Key.Equals(MSOrderType.Ms2.ToString())) + output.Add("Number of MS2 spectra=" + entry.Value); + if (entry.Key.Equals(MSOrderType.Ms3.ToString())) + output.Add("Number of MS3 spectra=" + entry.Value); + } + + output.AddRange(new List { $"MS min charge={minCharge.ToString(CultureInfo.InvariantCulture)}", $"MS max charge={maxCharge.ToString(CultureInfo.InvariantCulture)}", @@ -396,11 +389,9 @@ private void WriteTextMetadata(IRawDataPlus rawFile, int firstScanNumber, int la $"MS min MZ={minMz.ToString(CultureInfo.InvariantCulture)}", $"MS max MZ={maxMz.ToString(CultureInfo.InvariantCulture)}" } - ); + ); - // Scan Settings - if (rawFile.SelectMsData()) - { + // Scan Settings // Get the start and end time from the RAW file var startTime = rawFile.RunHeaderEx.StartTime; var endTime = rawFile.RunHeaderEx.EndTime; @@ -410,7 +401,7 @@ private void WriteTextMetadata(IRawDataPlus rawFile, int firstScanNumber, int la $"Scan start time={startTime.ToString(CultureInfo.InvariantCulture)}", $"Expected runtime={rawFile.RunHeaderEx.ExpectedRunTime.ToString(CultureInfo.InvariantCulture)}", $"Mass resolution=[MS, MS:1000011, mass resolution, {rawFile.RunHeaderEx.MassResolution.ToString(CultureInfo.InvariantCulture)}]", - "Units=" + rawFile.GetInstrumentData().Units, + $"Units={rawFile.GetInstrumentData().Units}", $"Number of scans={rawFile.RunHeaderEx.SpectraCount}", $"Scan range={firstScanNumber};{lastScanNumber}", $"Time range={startTime.ToString(CultureInfo.InvariantCulture)};{endTime.ToString(CultureInfo.InvariantCulture)}", @@ -419,6 +410,7 @@ private void WriteTextMetadata(IRawDataPlus rawFile, int firstScanNumber, int la } ); } + // Sample Data output.Add("#SampleData"); diff --git a/Writer/MgfSpectrumWriter.cs b/Writer/MgfSpectrumWriter.cs index 0c86189..a6449bf 100644 --- a/Writer/MgfSpectrumWriter.cs +++ b/Writer/MgfSpectrumWriter.cs @@ -5,11 +5,9 @@ using System.Reflection; using System.Text.RegularExpressions; using log4net; -using ThermoFisher.CommonCore.Data; using ThermoFisher.CommonCore.Data.Business; using ThermoFisher.CommonCore.Data.FilterEnums; using ThermoFisher.CommonCore.Data.Interfaces; -using ThermoRawFileParser.Util; namespace ThermoRawFileParser.Writer { diff --git a/Writer/MzMlSpectrumWriter.cs b/Writer/MzMlSpectrumWriter.cs index 411f2dc..e16c107 100644 --- a/Writer/MzMlSpectrumWriter.cs +++ b/Writer/MzMlSpectrumWriter.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; using System.Collections.Specialized; -using System.Diagnostics; -using System.Diagnostics.Eventing.Reader; using System.Globalization; using System.IO; using System.IO.Compression; @@ -18,6 +16,7 @@ using ThermoFisher.CommonCore.Data.Business; using ThermoFisher.CommonCore.Data.FilterEnums; using ThermoFisher.CommonCore.Data.Interfaces; +using ThermoRawFileParser.Util; using ThermoRawFileParser.Writer.MzML; using zlib; @@ -145,7 +144,7 @@ public override void Write(IRawDataPlus rawFile, int firstScanNumber, int lastSc _writer.WriteStartElement("fileContent"); //accumulating different types of file content - HashSet content = new HashSet(); + HashSet content = new HashSet(new CVComparer()); if (_rawFile.HasMsData) { @@ -279,6 +278,9 @@ public override void Write(IRawDataPlus rawFile, int firstScanNumber, int lastSc instrumentModel = OntologyMapping.GetInstrumentModel(instrumentData.Model); SerializeCvParam(instrumentModel); + //Update the definition of FTMS + OntologyMapping.UpdateFTMSDefinition(instrumentData.Model); + SerializeCvParam(new CVParamType { cvRef = "MS", @@ -401,10 +403,13 @@ public override void Write(IRawDataPlus rawFile, int firstScanNumber, int lastSc SpectrumType spectrum = null; + int level; try { - spectrum = ConstructMSSpectrum(scanNumber); + level = (int) _rawFile.GetScanEventForScanNumber(scanNumber).MSOrder; //applying MS level pre filter + if (level <= ParseInput.MaxLevel) + spectrum = ConstructMSSpectrum(scanNumber); } catch (Exception ex) { @@ -412,9 +417,9 @@ public override void Write(IRawDataPlus rawFile, int firstScanNumber, int lastSc ParseInput.NewError(); } - var level = spectrum != null ? int.Parse(spectrum.cvParam.Where(p => p.accession == "MS:1000511").First().value) : 0; + level = spectrum != null ? int.Parse(spectrum.cvParam.Where(p => p.accession == "MS:1000511").First().value) : 0; - if (spectrum != null && ParseInput.MsLevel.Contains(level)) //applying MS level filter + if (spectrum != null && ParseInput.MsLevel.Contains(level)) //applying final MS filter { spectrum.index = index.ToString(); if (_doIndexing) @@ -521,7 +526,7 @@ public override void Write(IRawDataPlus rawFile, int firstScanNumber, int lastSc _writer.WriteEndElement(); // spectrumList index = 0; - var chromatograms = ConstructChromatograms(firstScanNumber, lastScanNumber); + var chromatograms = ConstructChromatograms(); if (!chromatograms.IsNullOrEmpty()) { // ChromatogramList @@ -908,7 +913,7 @@ private void Serialize(XmlSerializer serializer, T t) /// the first scan number /// the last scan number /// a list of chromatograms - private List ConstructChromatograms(int firstScanNumber, int lastScanNumber) + private List ConstructChromatograms() { var chromatograms = new List(); @@ -2390,67 +2395,65 @@ private PrecursorListType ConstructPrecursorList(int precursorScanNumber, IScanE //increase reaction count after successful parsing reactionCount++; - if (scanEvent.SupplementalActivation == TriState.On) - //the property is On if *at least* one of the levels had SA (i.e. not necissirily the last one), thus we need to try (and posibly fail) + //Sometimes the property of supplemental activation is not set (Tune v4 on Tribrid), + //or is On if *at least* one of the levels had SA (i.e. not necissirily the last one), thus we need to try (and posibly fail) + try { - try - { - reaction = scanEvent.GetReaction(reactionCount); + reaction = scanEvent.GetReaction(reactionCount); - if (reaction != null) + if (reaction != null) + { + if (reaction.CollisionEnergyValid) { - if (reaction.CollisionEnergyValid) - { - activationCvParams.Add( - new CVParamType - { - accession = "MS:1002680", - name = "supplemental collision energy", - cvRef = "MS", - value = reaction.CollisionEnergy.ToString(CultureInfo.InvariantCulture), - unitCvRef = "UO", - unitAccession = "UO:0000266", - unitName = "electronvolt" - }); - } + activationCvParams.Add( + new CVParamType + { + accession = "MS:1002680", + name = "supplemental collision energy", + cvRef = "MS", + value = reaction.CollisionEnergy.ToString(CultureInfo.InvariantCulture), + unitCvRef = "UO", + unitAccession = "UO:0000266", + unitName = "electronvolt" + }); + } - // Add the supplemental CV term - switch (reaction.ActivationType) - { - case ActivationType.HigherEnergyCollisionalDissociation: - activationCvParams.Add(new CVParamType - { - accession = "MS:1002678", - name = "supplemental beam-type collision-induced dissociation", - cvRef = "MS", - value = "" - }); break; - - case ActivationType.CollisionInducedDissociation: - activationCvParams.Add(new CVParamType - { - accession = "MS:1002679", - name = "supplemental collision-induced dissociation", - cvRef = "MS", - value = "" - }); break; + // Add the supplemental CV term + switch (reaction.ActivationType) + { + case ActivationType.HigherEnergyCollisionalDissociation: + activationCvParams.Add(new CVParamType + { + accession = "MS:1002678", + name = "supplemental beam-type collision-induced dissociation", + cvRef = "MS", + value = "" + }); break; - default: - Log.Warn($"Unknown supplemental activation type: {reaction.ActivationType}"); - ParseInput.NewWarn(); - break; + case ActivationType.CollisionInducedDissociation: + activationCvParams.Add(new CVParamType + { + accession = "MS:1002679", + name = "supplemental collision-induced dissociation", + cvRef = "MS", + value = "" + }); break; - } + default: + Log.Warn($"Unknown supplemental activation type: {reaction.ActivationType}"); + ParseInput.NewWarn(); + break; - //increase reaction count after successful parsing - reactionCount++; } - } - catch (ArgumentOutOfRangeException) - { - // If we failed do nothing + + //increase reaction count after successful parsing + reactionCount++; } } + catch (ArgumentOutOfRangeException) + { + // If we failed do nothing + } precursor.activation = new ParamGroupType @@ -2466,15 +2469,14 @@ private PrecursorListType ConstructPrecursorList(int precursorScanNumber, IScanE var SPSPrecursor = new PrecursorType { selectedIonList = - new SelectedIonListType {count = "1", selectedIon = new ParamGroupType[1]}, - spectrumRef = spectrumRef - }; - - //Isolation window for SPS masses is the same as for the first precursor - SPSPrecursor.isolationWindow = + new SelectedIonListType { count = "1", selectedIon = new ParamGroupType[1] }, + spectrumRef = spectrumRef, + //Isolation window for SPS masses is the same as for the first precursor + isolationWindow = new ParamGroupType { cvParam = new CVParamType[3] + } }; SPSPrecursor.isolationWindow.cvParam[0] = @@ -2751,14 +2753,13 @@ private ScanListType ConstructScanList(int scanNumber, Scan scan) var scanType = new ScanType { - cvParam = scanTypeCvParams.ToArray() - }; - - // Scan window list - scanType.scanWindowList = new ScanWindowListType - { - count = 1, - scanWindow = new ParamGroupType[1] + cvParam = scanTypeCvParams.ToArray(), + // Scan window list + scanWindowList = new ScanWindowListType + { + count = 1, + scanWindow = new ParamGroupType[1] + } }; var scanWindow = new ParamGroupType { @@ -2849,22 +2850,6 @@ private static byte[] GetZLib64BitArray(ICollection array) return bytes; } - /// - /// Calculate the RAW file checksum - /// - /// the checksum string - private string CalculateMD5Checksum() - { - using (var md5 = MD5.Create()) - { - using (var stream = File.OpenRead(ParseInput.RawFilePath)) - { - var hash = md5.ComputeHash(stream); - return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant(); - } - } - } - /// /// Calculate the RAW file checksum /// diff --git a/Writer/OntologyMapping.cs b/Writer/OntologyMapping.cs index bece09f..be9072f 100644 --- a/Writer/OntologyMapping.cs +++ b/Writer/OntologyMapping.cs @@ -718,6 +718,38 @@ public static CVParamType GetInstrumentModel(string instrumentName) return instrumentModel; } + /// + /// Changes the mapping of `MassAnalyserFTMS` for Orbitrap-based instruments + /// updates OntologyMapping dictionarty in place + /// + /// the instrument name + /// Void + public static void UpdateFTMSDefinition(string instrumentName) + { + instrumentName = instrumentName.ToUpper(); + + if (instrumentName.Contains("ORBITRAP") || instrumentName.Contains("EXACTIVE")) + { + MassAnalyzerTypes[MassAnalyzerType.MassAnalyzerFTMS] = new CVParamType + { + accession = "MS:1000484", + name = "orbitrap", + cvRef = "MS", + value = "" + }; + } + else + { + MassAnalyzerTypes[MassAnalyzerType.MassAnalyzerFTMS] = new CVParamType + { + accession = "MS:1000079", + name = "fourier transform ion cyclotron resonance mass spectrometer", + cvRef = "MS", + value = "" + }; + } + } + /// /// Get a list of detectors for the given instrument /// diff --git a/Writer/SpectrumWriter.cs b/Writer/SpectrumWriter.cs index 3002308..3b1d02b 100644 --- a/Writer/SpectrumWriter.cs +++ b/Writer/SpectrumWriter.cs @@ -107,7 +107,7 @@ private string NormalizeFileName(string outputFile, string extension, bool gzip) string tail = ""; string[] extensions; - if (ParseInput.Gzip) + if (gzip) extensions = new string[] { ".gz", extension }; else extensions = new string[] { extension };