Conversion of MS analysis files between several open and closed data formats.

MSFileFormats(algorithm = "pwiz", vendor = FALSE)

convertMSFiles(
  files = NULL,
  outPath = NULL,
  dirs = TRUE,
  anaInfo = NULL,
  from = NULL,
  to = "mzML",
  overWrite = FALSE,
  algorithm = "pwiz",
  centroid = algorithm != "openms",
  filters = NULL,
  extraOpts = NULL,
  PWizBatchSize = 1
)

Arguments

algorithm

Either "pwiz" (implemented by msConvert of ProteoWizard), "openms" (implemented by FileConverter of OpenMS) or "bruker" (implemented by DataAnalysis).

vendor

If TRUE only vendor formats are returned.

files, dirs

The files argument should be a character vector with input files. If files contains directories and dirs=TRUE then files from these directories are also considered. An alternative method to specify input files is by the anaInfo argument. If the latter is specified files may be NULL.

outPath

A character vector specifying directories that should be used for the output. Will be re-cycled if necessary. If NULL, output directories will be kept the same as the input directories.

anaInfo

An analysis info table used to retrieve input files. Either this argument or files (or both) should be set (i.e. not NULL).

from

Input format (see below). These are used to find analyses when dirs=TRUE or anaInfo is set.

to

Output format: "mzXML" or "mzML".

overWrite

Should existing destination file be overwritten (TRUE) or not (FALSE)?

centroid

Set to TRUE to enable centroiding (not supported if algorithm="openms"). In addition, when algorithm="pwiz" the value may be "vendor" to perform centroiding with the vendor algorithm or "cwt" to use ProteoWizard's wavelet algorithm.

filters

When algorithm="pwiz": a character vector specifying one or more filters. The elements of the specified vector are directly passed to the --filter option (see here)

extraOpts

A character vector specifying any extra commandline parameters passed to msConvert or FileConverter. Set to NULL to ignore. For options: see FileConverter and msConvert.

PWizBatchSize

When algorithm="pwiz": the number of analyses to process by a single call to msConvert. Usually a value of one is most efficient. Set to zero to run all analyses all at once from a single call.

Details

MSFileFormats returns a character with all supported input formats (see below).

convertMSFiles converts the data format of an analysis to another. It uses tools from ProteoWizard (msConvert command), OpenMS (FileConverter command) or Bruker DataAnalysis to perform the conversion. Supported input and output formats include mzXML, .mzML and several vendor formats, depending on which algorithm is used.

Parallelization

convertMSFiles (except if algorithm="bruker") uses multiprocessing to parallelize computations. Please see the parallelization section in the handbook for more details and patRoon options for configuration options.

Conversion formats

Possible output formats (to argument) are mzXML and mzML.

Possible input formats (from argument) depend on the algorithm that was chosen and may include:

  • thermo: Thermo .RAW files (only algorithm="pwiz").

  • bruker: Bruker .d, .yep, .baf and .fid files (only algorithm="pwiz" or algorithm="bruker").

  • agilent: Agilent .d files (only algorithm="pwiz").

  • ab: AB Sciex .wiff files (only algorithm="pwiz").

  • waters Waters .RAW files (only algorithm="pwiz").

  • mzXML/mzML: Open format .mzXML/.mzML files (only algorithm="pwiz" or algorithm="openms").

Note that the actual supported file formats of ProteoWizard depend on how it was installed (see here).

References

Rst2016patRoon

Chambers2012patRoon

Examples

if (FALSE) { # \dontrun{
# Use FileConverter of OpenMS to convert between open mzXML/mzML format
convertMSFiles("standard-1.mzXML", to = "mzML", algorithm = "openms")

# Convert all Thermo .RAW files in the analyses/raw directory to mzML and
# store the files in analyses/mzml. During conversion files are centroided by
# the peakPicking filter and only MS 1 data is kept.
convertMSFiles("analyses/raw", "analyses/mzml", dirs = TRUE, from = "thermo",
               centroid = "vendor", filters = "msLevel 1")
} # }