mass-spectrum-scan-parsing
Summary
Parse and extract mass spectrometry scan data from raw instrument files (Thermo .raw, .FT1/.FT2, mzML, MGF) into structured peak lists with m/z, intensity, and charge state information. This is the foundational step for annotating fragment ions and validating peptide-spectrum matches in stable isotope labeling experiments.
When to use
You have raw mass spectrometry data files from a Thermo instrument (e.g., Orbitrap or IonTrap) or already-converted open formats (mzML, MGF) and need to extract individual MS1 or MS2 scans with their observed peak m/z values, intensities, and charge states before matching them against theoretical isotopic envelopes or fragment ion predictions. Particularly critical when working with heavily labeled samples (e.g., 52% 13C incorporation) where charge and isotope information must be preserved.
When NOT to use
- Input data are already peak-picked and tabulated in a feature table (use directly for matching instead)
- You require raw ion current time-series data without peak centroiding; use native Thermo libraries instead of Raxport/ThermoRawFileParser
- Working with non-Thermo instruments (e.g., Bruker, Waters, ABSciex) without prior conversion to mzML or MGF; Raxport is Thermo-specific
Inputs
- Thermo .raw file from mass spectrometer (Orbitrap or IonTrap)
- mzML or indexed mzML file (from ThermoRawFileParser or similar)
- MGF file (mascot generic format)
- Raxport-processed .FT1 or .FT2 file
- Scan number (integer identifier)
- Isolation window width (e.g., 5.0 Da for MS2)
Outputs
- Structured peak list with m/z, intensity, and charge state per scan
- Precursor m/z and charge state (for MS2 scans)
- Scan metadata (retention time, MS level, scan number)
- Total ion current (TIC) chromatogram for quality control
How to apply
Convert Thermo .raw files to intermediate .FT1 or .FT2 files using Raxport, extracting charge information (Orbitrap only) and MS1/MS2 scans. Alternatively, use ThermoRawFileParser to convert directly to mzML or MGF. Load the resulting file into Aerith using mzR (mzML/MGF) or Raxport-compatible parsers (FT2), specifying the scan number and isolation window width (e.g., 5.0 Da for MS2). Extract observed peak data (m/z, intensity) and precursor m/z with charge state. Verify data quality by inspecting TIC (total ion current) and scan frequency before proceeding to peak matching. Apply consistent parameter selection across replicate samples to ensure reproducibility.
Related tools
- Raxport (Extract scans from Thermo .raw files with charge information (Orbitrap only) into .FT1/.FT2 intermediate format compatible with Aerith) — https://github.com/xyz1396/Raxport.net
- ThermoRawFileParser (Convert Thermo .raw files to open formats (mzML, indexed mzML, MGF, Parquet) on all platforms; alternative to Raxport for cross-platform compatibility) — https://github.com/CompOmics/ThermoRawFileParser
- Aerith (Read and parse mass spectrum scans from mzML, MGF, Raxport .FT2, pepXML, PIN, and Sipros TSV files; visualize TIC and prepare peaks for theoretical isotopic matching) — https://github.com/xyz1396/Aerith
- mzR (Bioconductor R package integrated into Aerith for direct parsing of mzML and MGF files within R environment)
- MSnbase (Bioconductor R package for parsing pepXML files and handling parsed mass spectrum objects in downstream R workflows)
Examples
# Extract scans from Thermo .raw using Raxport
./Raxport.exe -i input.raw -o output.FT2
# Or convert to mzML using ThermoRawFileParser
ThermoRawFileParser -i=input.raw -f=1 -o=output_dir/
# Then load in R/Aerith
library(Aerith)
spectrum <- readMS2Spectrum('output.FT2', scanNumber=2596, isolationWindowWidth=5.0)
Evaluation signals
- Verify TIC (total ion current) shows expected chromatographic profile and scan frequency is consistent with acquisition method
- Inspect a sample MS2 scan: precursor m/z matches expected peptide mass (within isolation window width, e.g., ±2.5 Da for 5.0 Da window); observed peaks have m/z, intensity, and charge state populated
- Charge state information is non-null for Orbitrap data (if using Raxport); will be null for IonTrap
- Peak m/z values are numeric and sorted in ascending order; intensities are positive and scale appropriately across replicates
- No missing or malformed scan entries; total number of parsed MS2 scans matches expected count from acquisition metadata
Limitations
- Raxport extracts charge information only from Orbitrap scans; IonTrap scans will not include charge state and must be inferred downstream
- ThermoRawFileParser requires .NET Core 8 runtime on Linux/macOS; legacy versions require Mono (pre-1.5.0)
- mzML and MGF formats discard some native Thermo metadata (e.g., instrument resolution tuning); use .FT2 if full fidelity required
- Peak picking algorithms (native Thermo vs. disable with -p flag in ThermoRawFileParser) can affect observed peak positions and intensities; consistent parameter selection is critical for cross-sample comparison
- Aerith's mzR integration is limited to Bioconductor ecosystems; non-R workflows require alternative parsers (e.g., pymzML, mzLib)
Evidence
- [readme] Aerith is an R package that provides interfaces to read and write mass spectrum scans: "Aerith is an R package that provides interfaces to read and write mass spectrum scans"
- [readme] Raxport extracts scans from Thermo raw files; charge information only in Orbitrap: "Raxport is a simple program which extracts scans from raw files generated by mass spectrometers from ThermoFisher. It supports both Orbitrap and IonTrap scans. However, the generated
.FT1 or .FT2"
- [readme] ThermoRawFileParser converts to multiple output formats on cross-platform: "A tool allowing reading Thermo RAW mass spectrometer files and converting to common open formats on all platforms supporting .NET Core. Supported formats: * MGF * mzML and indexed mzML * Apache"
- [intro] Aerith accepts multiple spectral data file formats: "Aerith accepts spectral data files in multiple formats, including Raxport-processed FT2, mzML, and MGF files, as well as pepXML and PIN files (Percolator outputs), and TSV files from the Sipros"
- [intro] mzR integration for parsing mzML and MGF in Aerith: "Integration with the mzR package from Bioconductor allows direct parsing of mzML and MGF files"
- [abstract] Verify data quality using TIC and scan frequency analysis: "Always verify data quality using TIC and scan frequency analysis"
- [other] Concrete task workflow specifies isolation window and parameters: "annotatePSM accepts observed peak data (m/z, intensity, charge), peptide sequence (HYAHVDCPGHADYVK), charge states (1:2), isotope atom (C13), incorporation probability (0.52), precursor m/z, and"
1---2name: mass-spectrum-scan-parsing3description: Use when you have raw mass spectrometry data files from a Thermo instrument (e.4license: CC-BY-4.05---67# mass-spectrum-scan-parsing89## Summary1011Parse and extract mass spectrometry scan data from raw instrument files (Thermo .raw, .FT1/.FT2, mzML, MGF) into structured peak lists with m/z, intensity, and charge state information. This is the foundational step for annotating fragment ions and validating peptide-spectrum matches in stable isotope labeling experiments.1213## When to use1415You have raw mass spectrometry data files from a Thermo instrument (e.g., Orbitrap or IonTrap) or already-converted open formats (mzML, MGF) and need to extract individual MS1 or MS2 scans with their observed peak m/z values, intensities, and charge states before matching them against theoretical isotopic envelopes or fragment ion predictions. Particularly critical when working with heavily labeled samples (e.g., 52% 13C incorporation) where charge and isotope information must be preserved.1617## When NOT to use1819- Input data are already peak-picked and tabulated in a feature table (use directly for matching instead)20- You require raw ion current time-series data without peak centroiding; use native Thermo libraries instead of Raxport/ThermoRawFileParser21- Working with non-Thermo instruments (e.g., Bruker, Waters, ABSciex) without prior conversion to mzML or MGF; Raxport is Thermo-specific2223## Inputs2425- Thermo .raw file from mass spectrometer (Orbitrap or IonTrap)26- mzML or indexed mzML file (from ThermoRawFileParser or similar)27- MGF file (mascot generic format)28- Raxport-processed .FT1 or .FT2 file29- Scan number (integer identifier)30- Isolation window width (e.g., 5.0 Da for MS2)3132## Outputs3334- Structured peak list with m/z, intensity, and charge state per scan35- Precursor m/z and charge state (for MS2 scans)36- Scan metadata (retention time, MS level, scan number)37- Total ion current (TIC) chromatogram for quality control3839## How to apply4041Convert Thermo .raw files to intermediate .FT1 or .FT2 files using Raxport, extracting charge information (Orbitrap only) and MS1/MS2 scans. Alternatively, use ThermoRawFileParser to convert directly to mzML or MGF. Load the resulting file into Aerith using mzR (mzML/MGF) or Raxport-compatible parsers (FT2), specifying the scan number and isolation window width (e.g., 5.0 Da for MS2). Extract observed peak data (m/z, intensity) and precursor m/z with charge state. Verify data quality by inspecting TIC (total ion current) and scan frequency before proceeding to peak matching. Apply consistent parameter selection across replicate samples to ensure reproducibility.4243## Related tools4445- **Raxport** (Extract scans from Thermo .raw files with charge information (Orbitrap only) into .FT1/.FT2 intermediate format compatible with Aerith) — https://github.com/xyz1396/Raxport.net46- **ThermoRawFileParser** (Convert Thermo .raw files to open formats (mzML, indexed mzML, MGF, Parquet) on all platforms; alternative to Raxport for cross-platform compatibility) — https://github.com/CompOmics/ThermoRawFileParser47- **Aerith** (Read and parse mass spectrum scans from mzML, MGF, Raxport .FT2, pepXML, PIN, and Sipros TSV files; visualize TIC and prepare peaks for theoretical isotopic matching) — https://github.com/xyz1396/Aerith48- **mzR** (Bioconductor R package integrated into Aerith for direct parsing of mzML and MGF files within R environment)49- **MSnbase** (Bioconductor R package for parsing pepXML files and handling parsed mass spectrum objects in downstream R workflows)5051## Examples5253```54# Extract scans from Thermo .raw using Raxport55./Raxport.exe -i input.raw -o output.FT25657# Or convert to mzML using ThermoRawFileParser58ThermoRawFileParser -i=input.raw -f=1 -o=output_dir/5960# Then load in R/Aerith61library(Aerith)62spectrum <- readMS2Spectrum('output.FT2', scanNumber=2596, isolationWindowWidth=5.0)63```6465## Evaluation signals6667- Verify TIC (total ion current) shows expected chromatographic profile and scan frequency is consistent with acquisition method68- Inspect a sample MS2 scan: precursor m/z matches expected peptide mass (within isolation window width, e.g., ±2.5 Da for 5.0 Da window); observed peaks have m/z, intensity, and charge state populated69- Charge state information is non-null for Orbitrap data (if using Raxport); will be null for IonTrap70- Peak m/z values are numeric and sorted in ascending order; intensities are positive and scale appropriately across replicates71- No missing or malformed scan entries; total number of parsed MS2 scans matches expected count from acquisition metadata7273## Limitations7475- Raxport extracts charge information only from Orbitrap scans; IonTrap scans will not include charge state and must be inferred downstream76- ThermoRawFileParser requires .NET Core 8 runtime on Linux/macOS; legacy versions require Mono (pre-1.5.0)77- mzML and MGF formats discard some native Thermo metadata (e.g., instrument resolution tuning); use .FT2 if full fidelity required78- Peak picking algorithms (native Thermo vs. disable with -p flag in ThermoRawFileParser) can affect observed peak positions and intensities; consistent parameter selection is critical for cross-sample comparison79- Aerith's mzR integration is limited to Bioconductor ecosystems; non-R workflows require alternative parsers (e.g., pymzML, mzLib)8081## Evidence8283- [readme] Aerith is an R package that provides interfaces to read and write mass spectrum scans: "Aerith is an R package that provides interfaces to read and write mass spectrum scans"84- [readme] Raxport extracts scans from Thermo raw files; charge information only in Orbitrap: "Raxport is a simple program which extracts scans from raw files generated by mass spectrometers from ThermoFisher. It supports both Orbitrap and IonTrap scans. However, the generated `.FT1` or `.FT2`"85- [readme] ThermoRawFileParser converts to multiple output formats on cross-platform: "A tool allowing reading Thermo RAW mass spectrometer files and converting to common open formats on all platforms supporting .NET Core. Supported formats: * MGF * mzML and indexed mzML * Apache"86- [intro] Aerith accepts multiple spectral data file formats: "Aerith accepts spectral data files in multiple formats, including Raxport-processed FT2, mzML, and MGF files, as well as pepXML and PIN files (Percolator outputs), and TSV files from the Sipros"87- [intro] mzR integration for parsing mzML and MGF in Aerith: "Integration with the mzR package from Bioconductor allows direct parsing of mzML and MGF files"88- [abstract] Verify data quality using TIC and scan frequency analysis: "Always verify data quality using TIC and scan frequency analysis"89- [other] Concrete task workflow specifies isolation window and parameters: "annotatePSM accepts observed peak data (m/z, intensity, charge), peptide sequence (HYAHVDCPGHADYVK), charge states (1:2), isotope atom (C13), incorporation probability (0.52), precursor m/z, and"