readMSdata: Read raw mass spectral data files.

Description Usage Arguments Value Examples

View source: R/reading.R

Description

Creates a CMSraw object that contains a data.table of raw mass spectral information for all samples. The resulting object also stores phenotype and sample information. This object is the basic encapsulation of essential raw experimental data and serves as the output for further processing methods.

Usage

1
readMSdata(files, colData, mzsubset, verbose)

Arguments

files

A character vector of filenames pointing to the raw data.

colData

A DataFrame of phenotype and sample information.

mzsubset

A length-2 vector indicating a subset of the M/Z range to process. NULL otherwise.

verbose

Should the function be verbose?

Value

A vector with length equal to the number of scans containing the log2 sum of intensities at each scan.

Examples

1
2
3
4
5
6
7
8
if (require(mtbls2)) {
data(mtbls2)
filepath <- file.path(find.package("mtbls2"), "mzML")
file <- list.files(filepath, pattern = "MSpos-Ex1",
                   recursive = TRUE, full.names = TRUE)[1]
colData <- DataFrame(group = "wild-type")
cmsRaw <- readMSdata(files = file, colData = colData, verbose = TRUE)
}

hansenlab/yamss documentation built on Feb. 8, 2022, 4:28 p.m.