mzID: Parse an mzIdentML file

Description Usage Arguments Details Value See Also Examples

Description

This function takes a single mzIdentML file and parses it into an mzID object.

Usage

1
mzID(file, verbose = TRUE)

Arguments

file

A character string giving the location of the mzIdentML file to be parsed

verbose

Logical Should information be printed to the console? Default is TRUE

Details

The mzID function uses the XML package to read the content of an mzIdentML file and store it in an mzID object. Unlike how mzR handles mzML files, mzID parses everything in one chunk. Memory can thus be a problem for very big datasets, but as mzIdentML files are not indexed, it is ineficient to access the data dynamically.

If multiple filenames are passed to the function they will be processed in parallel using foreach and doParallel. The number of workers spawned is either the maximal number of available cores or the number of files to parse, whichever is smallest. The return value will in these cases be an mzIDCollection object. If some of the files cannot be parsed they will not be contained in the returned object and a warning will be issued. No errors will be thrown.

Value

An mzID object

See Also

mzID-class mzIDCollection-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Parsing of the example files provided by HUPO:
exampleFiles <- list.files(system.file('extdata', package = 'mzID'), 
                           pattern = '*.mzid', full.names = TRUE)
mzID(exampleFiles[1])

mzID(exampleFiles[2])

mzID(exampleFiles[3])

mzID(exampleFiles[4])

mzID(exampleFiles[5])

mzID(exampleFiles[6])

mzID(exampleFiles[7])

mzID(exampleFiles[8])

mzID(exampleFiles[9])

# Parsing into an mzIDCollection
collection <- mzID(exampleFiles[1:3])
names(collection)

thomasp85/mzID documentation built on May 31, 2019, 11:14 a.m.