| Filter-classes | R Documentation |
A variety of different filters can be applied to the CompDb object to
retrieve only subsets of the data. These filters extend the
AnnotationFilter::AnnotationFilter class and support the filtering concepts
introduced by Bioconductor's AnnotationFilter package.
The supported filters are:
CompoundIdFilter: filter based on the compound ID.
FormulaFilter: filter based on the compound's formula.
InchiFilter: filter based on the compound's InChI.
InchikeyFilter: filter based on the compound's InChI key.
ExactmassFilter: filter based on the compound's (exact) mass.
NameFilter: filter based on the compound name.
MsmsMzRangeMinFilter: retrieve entries based on the smallest m/z of all
peaks of their MS/MS spectra. Requires that MS/MS spectra data are present
(i.e. hasMsMsSpectra(cmp_db) returns TRUE).
MsmsMzRangeMaxFilter: retrieve entries based on the largest m/z of all
peaks of their MS/MS spectra. Requires that MS/MS spectra data are present
(i.e. hasMsMsSpectra(cmp_db) returns TRUE).
SpectrumIdFilter: retrieve entries associated with the provided IDs of
MS/MS spectra.
In addition to the filters listed above, the following ones are supported by a IonDb (but not by a CompDb):
IonIdFilter: filter based on the ion ID.
IonAdductFilter: filter based on the adduct.
IonMzFilter: filter based on the mz of the ion.
IonRtFilter: filter based on the rt of the ion.
CompoundIdFilter(value, condition = "==")
SpectrumIdFilter(value, condition = "==")
NameFilter(value, condition = "==")
MsmsMzRangeMinFilter(value, condition = ">=")
MsmsMzRangeMaxFilter(value, condition = "<=")
ExactmassFilter(value, condition = "==")
FormulaFilter(value, condition = "==")
InchiFilter(value, condition = "==")
InchikeyFilter(value, condition = "==")
IonIdFilter(value, condition = "==")
IonAdductFilter(value, condition = "==")
IonMzFilter(value, condition = "==")
IonRtFilter(value, condition = "==")
value |
The value for the filter. For details see
|
condition |
The condition for the filter. For details see
|
Constructor functions return an instance of the respective class.
Johannes Rainer
AnnotationFilter::supportedFilters() for the method to list all
supported filters for a CompDb (or a IonDb) object.
## Create a filter for the compound id
cf <- CompoundIdFilter("comp_a")
cf
## Create a filter using a formula expression
AnnotationFilter(~ compound_id == "comp_b")
## Combine filters
AnnotationFilterList(CompoundIdFilter("a"), NameFilter("b"))
## Using a formula expression
AnnotationFilter(~ compound_id == "a" | name != "b")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.