MsExperimentFiles: A class to store experiment files

View source: R/MsExperimentFiles.R

MsExperimentFilesR Documentation

A class to store experiment files

Description

The MsExperimentFiles class stores files that are part of a mass spectrometry experiment. The objects are created with the MsExperimentFiles() function.

The files encoded in a MsExperimentFiles instance don't need to exist on the current filesystem - sometimes, these might be created in anticipation of their creation. The existMsExperimentFiles() function can be used to verify which ones currently exist: it returns a list of logicals (formally an instance of IRanges::LogicalList() of lenghts equal to the MsExperimentFiles used as input.

Usage

MsExperimentFiles(..., metadata = list())

## S4 method for signature 'MsExperimentFiles'
show(object)

existMsExperimentFiles(object)

Arguments

...

Either a named list or a set of named vectors. All elements are coerced to characters.

metadata

list() holding arbitrary R objects as annotations.

object

The existMsExperimentFiles() function works with either an instance of MsExperimentFiles or MsExperiment.

Value

MsExperimentFiles returns an instance of MsExperimentFiles.

Author(s)

Laurent Gatto

Examples

fls <- MsExperimentFiles(mzmls = c("/path/to/f1.mzML", "/path/to/f2.mzML"),
                         mzids = "/another/path/to/id1.mzid",
                         fasta = "file.fas")
fls

## A new MsExperimentFiles containing mzML or mzid files
fls[1]
fls["mzids"]

## The actual file names
fls[[1]]
fls[[2]]
fls[["fasta"]]

## None of the files used in this example actually exist
existMsExperimentFiles(fls)

rformassspectrometry/MsExperiment documentation built on April 18, 2024, 11:43 a.m.