orbitrap-spectrum-extraction-from-raw-files
Summary
Extract individual MS/MS spectra from Thermo Fisher Scientific Orbitrap .raw files with full instrument metadata (resolving power, AGC target, injection time) and centroided m/z–intensity arrays. This skill enables reproducible access to raw spectral data and quality assessment of peptide fragmentation in bottom-up proteomics workflows.
When to use
You have a Thermo Fisher Orbitrap .raw file and need to retrieve a specific scan's spectral data (m/z and intensity arrays), validate instrument parameters (resolving power, AGC injection time), or assess signal-to-noise characteristics of fragment ions for a known precursor peptide (e.g., after peptide identification from a database search or from a targeted parallel reaction monitoring experiment).
When NOT to use
- Input is not a Thermo Fisher Orbitrap .raw file (use ProteoWizard or ThermoRawFileParser for vendor-agnostic conversion to mzML/mzXML first).
- You need statistical or comparative analysis of preprocessed spectra across many samples; use higher-level tools like MSstats or MSnbase instead.
- Windows system without decimal symbol configured as '.' — rawrr will fail to parse numeric data correctly.
Inputs
- Thermo Fisher Scientific .raw file (e.g., 20181113_010_autoQC01.raw)
- Scan number (integer)
- Known peptide sequence (optional, for fragment ion validation)
Outputs
- rawrrSpectrum object with centroided m/z and intensity arrays
- Instrument metadata: resolving power (e.g., 30,000 at 200 m/z), AGC target (e.g., 100,000 charges), injection time (e.g., 2.8 ms)
- Fragment ion signal-to-noise ratios
- Spectral quality assessment (boolean: high-quality if major ions >> noise)
How to apply
Invoke rawrr::readSpectrum() with the path to the .raw file and the target scan number to extract the raw spectrum object via the RawFileReader C# wrapper and API. Parse the returned rawrrSpectrum object to retrieve instrument metadata (resolving power at reference m/z, AGC target in charges, and injection time in milliseconds) from the spectrum header. Extract the centroided m/z and intensity arrays from the spectrum data. For quality assessment, identify fragment ion peaks (e.g., y-ions for a peptide precursor) by matching observed m/z to theoretical values, then calculate signal-to-noise ratio by comparing each peak intensity to the local baseline noise level. Confirm that all major fragment ions exceed tens to hundreds of counts above noise floor, indicating high spectral quality suitable for quantitative proteomics or spectral matching.
Related tools
- rawrr (R package wrapping RawFileReader API; main interface for spectrum extraction and metadata retrieval from .raw files) — https://github.com/fgcz/rawrr
- RawFileReader (Thermo Fisher Scientific .NET assembly providing low-level read access to binary .raw file structure via C# wrapper methods invoked by rawrr) — https://github.com/thermofisherlsms/RawFileReader
- MsBackendRawFileReader (Alternative MsBackend for Bioconductor Spectra package; integrates rawrr for on-disk spectral data access in Spectra ecosystem) — https://github.com/cpanse/MsBackendRawFileReader
- ProteoWizard (Vendor-agnostic alternative for reading .raw files and converting to open formats (mzML); use if rawrr is unavailable or non-Windows platform support needed)
- ThermoRawFileParser (Java-based alternative for reading Thermo .raw files on non-Windows platforms; produces mzML output for downstream analysis) — https://github.com/compomics/ThermoRawFileParser
Examples
S <- rawrr::readSpectrum(rawfile = "20181113_010_autoQC01.raw", scan = 9594); str(S[[1]])
Evaluation signals
- rawrrSpectrum object returned without parsing errors; object contains 119+ metadata items including resolving power, AGC target, and injection time fields.
- Instrument metadata values match expected hardware specifications: e.g., resolving power ≥ 30,000 at 200 m/z for Orbitrap, AGC injection time ≤ 55 ms (max).
- Centroided m/z array has expected length (e.g., 50–200 fragment peaks for a doubly-charged peptide) and intensity array is non-empty with positive values.
- Fragment ion m/z values (e.g., y-ions for LGGNEQVTR++) match theoretical values within instrument mass accuracy (typically ≤ 5 ppm for Orbitrap).
- Signal-to-noise ratio for major fragment ions is ≥ 10:1 (tens to hundreds of counts above baseline); no obvious spectral contamination or baseline elevation.
Limitations
- rawrr is Windows-native; Linux and macOS users may require Mono or Docker, or should use ThermoRawFileParser / ProteoWizard instead.
- Decimal symbol must be configured as '.' on Windows systems, otherwise numeric data parsing will fail silently.
- Only Thermo Fisher Scientific Orbitrap .raw files are supported; other vendor formats (Bruker, Waters, ABB) require alternative tools.
- MsBackendRawFileReader backend for Spectra is still in development (WIP status); use direct rawrr functions for production workflows.
- The skill retrieves individual scans; to extract ion chromatograms or perform multi-scan operations, use readChromatogram() or readIndex() functions separately.
Evidence
- [other] Scan 9594 was successfully extracted using rawrr::readSpectrum, confirming resolving power of 30,000 at 200 m/z and AGC injection time of 2.8 ms: "Scan 9594 was successfully extracted using rawrr::readSpectrum, confirming resolving power of 30,000 at 200 m/z and AGC injection time of 2.8 ms"
- [intro] rawrr wraps the functionality of the RawFileReader .NET assembly, enabling spectrum extraction via C# wrapper methods: "rawrr wraps the functionality of the RawFileReader .NET assembly"
- [methods] invoke compiled C# wrapper methods using a system call to access binary raw file data: "R functions requesting access to data stored in binary raw files invoke compiled C# wrapper methods using a system call"
- [methods] extracted information is written to temporary location, read back into memory and parsed into R objects: "the extracted information is written to a temporary location on the harddrive, read back into memory and"
- [methods] All spectra were written to file after applying centroiding and lock mass correction: "All spectra were written to file after applying centroiding (c) and lock mass correction"
- [results] 119 data items provided by the API for each scanned spectrum: "the API provides 119 data items for this particular scan"
- [other] all y-ion signals for LGGNEQVTR++ peptide are several tens to hundreds of times above the noise level: "all y-ion signals for LGGNEQVTR++ peptide are several tens to hundreds of times above the noise level"
- [readme] The package provides access to proprietary Thermo Fisher Scientific Orbitrap instrument data as a stand-alone R package: "The package provides access to proprietary Thermo Fisher Scientific Orbitrap instrument data as a stand-alone R package"
- [discussion] On Windows, the decimal symbol has to be configured as a '.': "On Windows, the decimal symbol has to be configured as a '.'"
1---2name: orbitrap-spectrum-extraction-from-raw-files3description: Use when you have a Thermo Fisher Orbitrap .raw file and need to retrieve a specific scan's spectral data (m/z and intensity arrays), validate instrument parameters (resolving power, AGC injection time), or assess signal-to-noise characteristics of fragment ions for a known precursor peptide (e.4license: CC-BY-4.05---67# orbitrap-spectrum-extraction-from-raw-files89## Summary1011Extract individual MS/MS spectra from Thermo Fisher Scientific Orbitrap .raw files with full instrument metadata (resolving power, AGC target, injection time) and centroided m/z–intensity arrays. This skill enables reproducible access to raw spectral data and quality assessment of peptide fragmentation in bottom-up proteomics workflows.1213## When to use1415You have a Thermo Fisher Orbitrap .raw file and need to retrieve a specific scan's spectral data (m/z and intensity arrays), validate instrument parameters (resolving power, AGC injection time), or assess signal-to-noise characteristics of fragment ions for a known precursor peptide (e.g., after peptide identification from a database search or from a targeted parallel reaction monitoring experiment).1617## When NOT to use1819- Input is not a Thermo Fisher Orbitrap .raw file (use ProteoWizard or ThermoRawFileParser for vendor-agnostic conversion to mzML/mzXML first).20- You need statistical or comparative analysis of preprocessed spectra across many samples; use higher-level tools like MSstats or MSnbase instead.21- Windows system without decimal symbol configured as '.' — rawrr will fail to parse numeric data correctly.2223## Inputs2425- Thermo Fisher Scientific .raw file (e.g., 20181113_010_autoQC01.raw)26- Scan number (integer)27- Known peptide sequence (optional, for fragment ion validation)2829## Outputs3031- rawrrSpectrum object with centroided m/z and intensity arrays32- Instrument metadata: resolving power (e.g., 30,000 at 200 m/z), AGC target (e.g., 100,000 charges), injection time (e.g., 2.8 ms)33- Fragment ion signal-to-noise ratios34- Spectral quality assessment (boolean: high-quality if major ions >> noise)3536## How to apply3738Invoke rawrr::readSpectrum() with the path to the .raw file and the target scan number to extract the raw spectrum object via the RawFileReader C# wrapper and API. Parse the returned rawrrSpectrum object to retrieve instrument metadata (resolving power at reference m/z, AGC target in charges, and injection time in milliseconds) from the spectrum header. Extract the centroided m/z and intensity arrays from the spectrum data. For quality assessment, identify fragment ion peaks (e.g., y-ions for a peptide precursor) by matching observed m/z to theoretical values, then calculate signal-to-noise ratio by comparing each peak intensity to the local baseline noise level. Confirm that all major fragment ions exceed tens to hundreds of counts above noise floor, indicating high spectral quality suitable for quantitative proteomics or spectral matching.3940## Related tools4142- **rawrr** (R package wrapping RawFileReader API; main interface for spectrum extraction and metadata retrieval from .raw files) — https://github.com/fgcz/rawrr43- **RawFileReader** (Thermo Fisher Scientific .NET assembly providing low-level read access to binary .raw file structure via C# wrapper methods invoked by rawrr) — https://github.com/thermofisherlsms/RawFileReader44- **MsBackendRawFileReader** (Alternative MsBackend for Bioconductor Spectra package; integrates rawrr for on-disk spectral data access in Spectra ecosystem) — https://github.com/cpanse/MsBackendRawFileReader45- **ProteoWizard** (Vendor-agnostic alternative for reading .raw files and converting to open formats (mzML); use if rawrr is unavailable or non-Windows platform support needed)46- **ThermoRawFileParser** (Java-based alternative for reading Thermo .raw files on non-Windows platforms; produces mzML output for downstream analysis) — https://github.com/compomics/ThermoRawFileParser4748## Examples4950```51S <- rawrr::readSpectrum(rawfile = "20181113_010_autoQC01.raw", scan = 9594); str(S[[1]])52```5354## Evaluation signals5556- rawrrSpectrum object returned without parsing errors; object contains 119+ metadata items including resolving power, AGC target, and injection time fields.57- Instrument metadata values match expected hardware specifications: e.g., resolving power ≥ 30,000 at 200 m/z for Orbitrap, AGC injection time ≤ 55 ms (max).58- Centroided m/z array has expected length (e.g., 50–200 fragment peaks for a doubly-charged peptide) and intensity array is non-empty with positive values.59- Fragment ion m/z values (e.g., y-ions for LGGNEQVTR++) match theoretical values within instrument mass accuracy (typically ≤ 5 ppm for Orbitrap).60- Signal-to-noise ratio for major fragment ions is ≥ 10:1 (tens to hundreds of counts above baseline); no obvious spectral contamination or baseline elevation.6162## Limitations6364- rawrr is Windows-native; Linux and macOS users may require Mono or Docker, or should use ThermoRawFileParser / ProteoWizard instead.65- Decimal symbol must be configured as '.' on Windows systems, otherwise numeric data parsing will fail silently.66- Only Thermo Fisher Scientific Orbitrap .raw files are supported; other vendor formats (Bruker, Waters, ABB) require alternative tools.67- MsBackendRawFileReader backend for Spectra is still in development (WIP status); use direct rawrr functions for production workflows.68- The skill retrieves individual scans; to extract ion chromatograms or perform multi-scan operations, use readChromatogram() or readIndex() functions separately.6970## Evidence7172- [other] Scan 9594 was successfully extracted using rawrr::readSpectrum, confirming resolving power of 30,000 at 200 m/z and AGC injection time of 2.8 ms: "Scan 9594 was successfully extracted using rawrr::readSpectrum, confirming resolving power of 30,000 at 200 m/z and AGC injection time of 2.8 ms"73- [intro] rawrr wraps the functionality of the RawFileReader .NET assembly, enabling spectrum extraction via C# wrapper methods: "rawrr wraps the functionality of the RawFileReader .NET assembly"74- [methods] invoke compiled C# wrapper methods using a system call to access binary raw file data: "R functions requesting access to data stored in binary raw files invoke compiled C# wrapper methods using a system call"75- [methods] extracted information is written to temporary location, read back into memory and parsed into R objects: "the extracted information is written to a temporary location on the harddrive, read back into memory and"76- [methods] All spectra were written to file after applying centroiding and lock mass correction: "All spectra were written to file after applying centroiding (c) and lock mass correction"77- [results] 119 data items provided by the API for each scanned spectrum: "the API provides 119 data items for this particular scan"78- [other] all y-ion signals for LGGNEQVTR++ peptide are several tens to hundreds of times above the noise level: "all y-ion signals for LGGNEQVTR++ peptide are several tens to hundreds of times above the noise level"79- [readme] The package provides access to proprietary Thermo Fisher Scientific Orbitrap instrument data as a stand-alone R package: "The package provides access to proprietary Thermo Fisher Scientific Orbitrap instrument data as a stand-alone R package"80- [discussion] On Windows, the decimal symbol has to be configured as a '.': "On Windows, the decimal symbol has to be configured as a '.'"