MSnID-class {MSnID} | R Documentation

## The "MSnID" Class for Mass Spectrometry Based Proteomics Identification Data

### Description

The `MSnID` is a convenience class for manipulating the MS/MS search results.

### Objects from the Class

The way to create objects is to call `MSnID` constructor function that takes as an input the project working directory `workDir` and the second argument if the cache from previous analysis should be cleaned `cleanCache`.

### Slots

`workDir`:

  Object of class `"character"`. containing working directory for the project. The `.Rcache` subdirectory stores the cached resuls form the previous analyses. The mechanism of caching relies on R.cache package.

`psms`:

  Object of class `data.table` that contains all the MS/MS identification results in the form of peptide(or protein)-spectrum-matches.

### Methods

read_mzIDs

  `signature(object, mzids)`:
  Reads mzIdentML files into `psms` `data.table` slot of `object` MSnID instance. The functionality leverage mzID package facility. Note, the calls are memoised using R.cache facility. So if the call with the same list of files issues again, the results will be read from cache instead of re-parsing the mzIdentML files. See `read_mzIDs`

`psms(object)`, `psms(object)<-value`:

  Gets and sets MS/MS search results as `data.frame`. See `psms`

dim

  `signature(x = "MSnID")`:
  Returns the dimensions of the table with MS/MS identification data.

peptides

  `signature(object = "MSnID")`:
  Returns unique peptide list. See `peptides`

accessions

  `signature(object = "MSnID")`:
  Returns unique accessions (typically proteins) list. See `accessions`

proteins

  `signature(object = "MSnID")`:
  Returns unique proteins list. See `proteins`

assess_termini

  Checks the agreement of peptide termini with enzymes cleavage specificity. The return value is the`MSnID` object with extra variable `numIrregCleavages`. See `assess_termini`

assess_missed_cleavages

  Checks if the peptide sequence contains the sites that were not cleaved by the enzyme. For details see `assess_missed_cleavages`

mass_measurement_error

  Returns parent ion mass measurement error in parts per million (ppm) units. Note, it requires `experimentalMassToCharge` and `calculatedMassToCharge` variables to be set. See `mass_measurement_error`

recalibrate

  Recalibrates, that is removes systematic error from `experimentalMassToCharge` measurements. See `recalibrate`

correct_peak_selection

  Subtracts or adds the mass difference between C13 and C12 isotopes (1.0033548378 Da) if that reduces the mass error. Such a mass error arises from the fact that instrument may peak non-monoisotopic peak for fragmentation and thus report the mass that is different by ~ 1 Da. See `correct_peak_selection`

apply_filter

  `signature(msnidObj="MSnID", filterObj="character")`
  `signature(msnidObj="MSnID", filterObj="MSnIDFilter")`
  The `filterObj` argument is a `"character"` or converted to a `"character"` text string that is evaluated to a `"logical"` for each entry of the MS/MS results table. Return value is a filtered `MSnID` object with entries that pass the applied filter. See `apply_filter`

evaluate_filter

  `evaluate_filter(object, filter, level = c("PSM","peptide", "accession")`
  Returns a list with `fdr` and `n` elements. Argument `filter` is either `"character"` or `"MSnIDFilter"` object. Argument `level` can take one of the values `c("PSM","peptide","accession")` and controls the level filter is evaluated. See `evaluate_filter`

`id_quality`

  `signature(object="MSnID", ...)`
  Other optional ... arguments are `filter` is an "MSnIDFilter" instance and `level`. The `level` values are one of "PSM", "peptide", "accession". The method returns FDR for given level depending of type of identifications. See `id_quality`

as(,"MSnSet")

  `signature(x = "MSnID")`: Coerce object from `MSnID` to `MSnSet`.

names

  signature(x="MSnID")
  Returns the column names in the MS/MS results table.

`object$name`, `object$name<-value`

  Access and set `name` column in MS/MS search results table.

`object[[i]]`, `object[[i]]<-value`

  Access and set column `i` (character or numeric index) in MS/MS search results table.

as(,"MSnSet")

  `signature(from = "MSnID")`: Coerce object from `MSnID` to `MSnSet`.

as(,"data.table")

  `signature(from = "MSnID")`: Coerce object from `MSnID` to `data.table`.

### Author(s)

Vladislav A Petyuk vladislav.petyuk@pnnl.gov

### See Also

`MSnSet`, `mzID`.

### Examples

    ## Not run:
    msnidObj <- MSnID(".")
    mzids <- system.file("extdata","c_elegans.mzid.gz",package="MSnID")
    msnidObj <- read_mzIDs(msnidObj, mzids)
    # clean up the cache directory
    unlink(".Rcache", recursive=TRUE)

    ## End(Not run)

[Package MSnID version 1.14.0 Index]