MSnIDFilter-class {MSnID} | R Documentation

## The "MSnIDFilter" Class for Handling MS/MS Criteria, Relationships and Thresholds for Data Filtration.

### Description

The `MSnIDFilter` is a convenience class for manipulating the MS/MS filter for MS/MS results.

### Objects from the Class

The way to create objects is to call `MSnIDFilter` constructor function that takes as input the `MSnID` class instance and (optionally) `filterList`.

### Slots

`MSnIDObj`:

  An instance of class "MSnID".

`filterList`:

  An optional argument. A list with element names corresponding to column names avalable in `MSnID` instance. Each element contains sub-elements "comparison" and "threshold". "Comparison" is one of the relationship operators (e.g. ">") see Comparison for details. "Threshold" is the corresponding parameter value the identification has to be more or less (depending on comparison) to pass the filter.

### Methods

show

  `signature(object="MSnIDFilter")`:
  Prints `MSnIDFilter` object.

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

  Access and set filterList elements.

names

  signature(x="MSnIDFilter")
  Returns the names of the criteria.

`as.numeric`

  `signature(x="MSnIDFilter")`
  Converts `filterList` into "numeric" vector. Vector names are the list element names. Vector values are threshold values. Comparison operators are lost.

`length`

  `signature(x="MSnIDFilter")`
  Returns the number of criteria set in the "MSnIDFilter" object.

`update`

  `signature(object="MSnIDFilter", ...)`
  The additional ... argument is `numeric` vector of the same length as the number of criteria in `MSnIDFilter` object. The method update the corresponding thresholds to new provided values.

### Author(s)

Vladislav A Petyuk vladislav.petyuk@pnnl.gov

### See Also

`MSnSet` `evaluate_filter` `apply_filter` `optimize_filter`

### Examples

    data(c_elegans)

    ## Filtering using filter object:
    # first adding columns that will be used as filters
    msnidObj$msmsScore <- -log10(msnidObj$`MS-GF:SpecEValue`)
    msnidObj$mzError <- abs(msnidObj$experimentalMassToCharge -
                            msnidObj$calculatedMassToCharge)
    # setting up filter object
    filtObj <- MSnIDFilter(msnidObj)
    filtObj$msmsScore <- list(comparison=">", threshold=10.0)
    filtObj$mzError <- list(comparison="<", threshold=0.1) # 0.1 Thomson
    show(filtObj)
    # applying filter and comparing MSnID object before and after
    show(msnidObj)
    msnidObj <- apply_filter(msnidObj, filtObj)
    show(msnidObj)

[Package MSnID version 1.28.0 Index]