mzML2csv: Convert .mzML file to CSV

Description Usage Arguments Value Examples

View source: R/mzML2csv.R

Description

Convert mz data to a CSV file using mzR and data.table. Individual scans can be indexed and selectively extracted. The operation can be performed in chunks or all at once.

Usage

1
mzML2csv(path, csvPath, scans = NULL, chunkSize = 100)

Arguments

path

path to the mzML file

csvPath

path and fileName.csv specifying write location of .csv file

scans

Optional parameter. Provide a numeric vector to import select scans and write to a .csv file. If not provided, the whole file is converted. Default is NULL.

chunkSize

number of scans to be extracted and written to a .csv file at a time. Useful for breaking up large data files and converting to .csv. Default is 100. If NULL, imports all scans in single operation and you will probably run out of memory.

Value

the results from writing the .csv file

Examples

1
2
3
4
5
6
7
8
9
## Not run:  #read .mzML file from system path and write to .csv
#100 scans (default) at a time mzML2diskFrame(path = path_2_mzML, csvPath =
"csvPath.csv")

#read scans 100-200 from .mzML file specified by a system path #and write to
.csv 20 scans at a time mzML2diskFrame(path = path_2_mzML, diskFramePath =
"dfPath.df", scans = c(100:200), chunkSize = 20)

## End(Not run)

pmbrophy/mzDataTable documentation built on June 6, 2020, 7:43 a.m.