Learn R Programming

MSnbase (version 1.20.7)

addIdentificationData-methods: Adds Identification Data

Description

This methods add identification data to an experiment "MSnExp" or to a "MSnSet".

Arguments

Methods

signature(object = "MSnExp", id = "character", fcol = "character", icol = "character", verbose = "logical")
Adds the identification data stored in mzIdentML files to a "MSnExp" instance. The method handles one or multiple mzIdentML files provided via id. id has to be a character vector of valid filenames. fcol and icol specify the columns in the featureData slot and the identification data.frame that are used to merge both data together as character vectors (defaults are fcol = c("spectrum.file", "acquisition.number") and icol = c("spectrumFile", "acquisitionnum")). The verbose argument (default is TRUE) defines whether status messages should be showed.
signature(object = "MSnExp", id = "mzID", fcol = "character", icol = "character", verbose = "logical")
Same as above but id could be an mzID object.
signature(object = "MSnExp", id = "mzIDCollection", fcol = "character", icol = "character", verbose = "logical")
Same as above but id could be an mzIDCollection object.
signature(object = "MSnExp", id = "data.frame", fcol = "character", icol = "character", verbose = "logical")
Same as above but id could be a data.frame.
signature(object = "MSnSet", id = "character", verbose = "logical")
Adds the identification data stored in mzIdentML files to an "MSnSet" instance. The method handles one or multiple mzIdentML files provided via id. id has to be a character vector of valid filenames. fcol and icol specify the columns in the featureData slot and the identification data.frame that are used to merge both data together as character vectors (defaults are fcol = c("spectrum.file", "acquisition.number") and icol = c("spectrumFile", "acquisitionnum")). The verbose argument (default is TRUE) defines whether status messages should be showed.
signature(object = "MSnSet", id = "mzID", fcol = "character", icol = "character", verbose = "logical")
Same as above but id could be an mzID object.
signature(object = "MSnSet", id = "mzIDCollection", fcol = "character", icol = "character", verbose = "logical")
Same as above but id could be an mzIDCollection object.
signature(object = "MSnSet", id = "data.frame", fcol = "character", icol = "character", verbose = "logical")
Same as above but id could be a data.frame.

Details

The featureData slots in an "MSnExp" or an "MSnSet" instance provides only one row per MS2 spectrum but the identification is not always bijective. If multiple possible matches are present only the highest ranked identification is added.

The column nprot contains the number of members in the protein group; the columns accession and description contain a semicolon separated list of all matches sorted by their rank values. The columns npsm.prot and npep.prot represent the number of PSMs and peptides that were matched to a particular protein group. The column npsm.pep indicates how many PSMs were attributed to a peptide (as defined by its sequence pepseq).

See Also

MSnExp and MSnSet.

Examples

Run this code
## find path to a mzXML file
quantFile <- dir(system.file(package = "MSnbase", dir = "extdata"),
                 full.name = TRUE, pattern = "mzXML$")
## find path to a mzIdentML file
identFile <- dir(system.file(package = "MSnbase", dir = "extdata"),
                 full.name = TRUE, pattern = "dummyiTRAQ.mzid")

## create basic MSnExp
msexp <- readMSData(quantFile)

## add identification information
msexp <- addIdentificationData(msexp, identFile)

## access featureData; please note the multiple identification data
## for spectrum 1 (row 1)
fData(msexp)

idSummary(msexp)

Run the code above in your browser using DataLab