Globally add filters to an EnsDb database
These methods allow to set, delete or show globally defined
filters on an EnsDb
object.
addFilter
: adds an annotation filter to the EnsDb
object.
dropFilter
deletes all globally set filters from the
EnsDb
object.
activeFilter
returns the globally set filter from an
EnsDb
object.
filter
filters an EnsDb
object. filter
is
an alias for the addFilter
function.
## S4 method for signature 'EnsDb' addFilter(x, filter = AnnotationFilterList()) ## S4 method for signature 'EnsDb' dropFilter(x) ## S4 method for signature 'EnsDb' activeFilter(x) filter(x, filter = AnnotationFilterList())
x |
The |
filter |
The filter as an
|
Adding a filter to an EnsDb
object causes this filter to be
permanently active. The filter will be used for all queries to the
database and is added to all additional filters passed to the methods
such as genes
.
addFilter
and filter
return an EnsDb
object
with the specified filter added.
activeFilter
returns an
AnnotationFilterList
object being the
active global filter or NA
if no filter was added.
dropFilter
returns an EnsDb
object with all eventually
present global filters removed.
Johannes Rainer
Filter-classes
for a list of all supported filters.
library(EnsDb.Hsapiens.v86) edb <- EnsDb.Hsapiens.v86 ## Add a global SeqNameFilter to the database such that all subsequent ## queries will be applied on the filtered database. edb_y <- addFilter(edb, SeqNameFilter("Y")) ## Note: using the filter function is equivalent to a call to addFilter. ## Each call returns now only features encoded on chromosome Y gns <- genes(edb_y) seqlevels(gns) ## Get all lincRNA gene transcripts on chromosome Y transcripts(edb_y, filter = ~ gene_biotype == "lincRNA") ## Get the currently active global filter: activeFilter(edb_y) ## Delete this filter again. edb_y <- dropFilter(edb_y) activeFilter(edb_y)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.