Skip to content

lukaszsobala/MS_conversion_tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MS Conversion Tools

This repository provides tools for converting mass spectrometry data from the Bruker format or the older mzXML format to the currently recommended format (mzML). Conversion to msd is supported for mMass compatibility. It also contains a bash script to anonymize the file contents.

Script: convertToOpenMS.R

A script to convert Bruker Flex directories or mzXML files to both MSD and mzML formats using the MALDIquant and MALDIquantForeign R packages.

Usage

Rscript convertToOpenMS.R <input_path> [output_directory]
  • <input_path>: Path to a Bruker Flex directory or an mzXML file.
  • [output_directory] (optional): Directory to save the output files. Defaults to the current working directory if not specified.

Example

Convert a Bruker Flex directory (only MS1, fragmentation spectra will not work):

Rscript convertToOpenMS.R /path/to/BrukerFlexDirectory /path/to/output

Convert an mzXML file:

Rscript convertToOpenMS.R /path/to/file.mzXML /path/to/output

Output

  • The script will export the spectra in both MSD and mzML formats to the specified output directory.

Requirements

  • R (>= 3.0)
  • R packages: MALDIquant, MALDIquantForeign

Install required R packages:

BiocManager::install(c("MALDIquant", "MALDIquantForeign"))

Other Files

  • anonymizeMS.sh: Shell script for anonymizing data (see script for details).

Usage: ./anonymizeMS.sh input_file [anonymous_name]. It works with msd, mzML and mzXML files and clears all identifiable info that is usually present in the files.


For questions or issues, please contact me at [email protected], or submit an issue. The scripts were made with the help of LLMs.

About

Mass spec conversion tools

Topics

Resources

Stars

Watchers

Forks