Description Usage Arguments Author(s) See Also Examples
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.
CompoundNameFilter
: 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
).
1 2 3 4 5 6 7 | CompoundIdFilter(value, condition = "==")
CompoundNameFilter(value, condition = "==")
MsmsMzRangeMinFilter(value, condition = ">=")
MsmsMzRangeMaxFilter(value, condition = "<=")
|
value |
The value for the filter. For details see
|
condition |
The condition for the filter. For details see
|
Johannes Rainer
supportedFilters()
for the method to list all supported filters
for a CompDb
object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | library(CompoundDb)
## 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"), CompoundNameFilter("b"))
## Using a formula expression
AnnotationFilter(~ compound_id == "a" | compound_name != "b")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.