Description Usage Arguments Value Note See Also Examples
View source: R/AnnotationFilterList.R
The AnnotationFilterList
allows to combine
filter objects extending the AnnotationFilter
class to construct more complex queries. Consecutive filter
objects in the AnnotationFilterList
can be combined by a
logical and (&
) or or (|
). The
AnnotationFilterList
extends list
, individual
elements can thus be accessed with [[
.
value()
get a list
with the
AnnotationFilter
objects. Use [[
to access
individual filters.
logicOp()
gets the logical operators separating
successive AnnotationFilter
.
not()
gets the logical operators separating
successive AnnotationFilter
.
Converts an AnnotationFilterList
object to a
character(1)
giving an equation that can be used as input to
a dplyr
filter.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | AnnotationFilterList(..., logicOp = character(), logOp = character(),
not = FALSE, .groupingFlag = FALSE)
## S4 method for signature 'AnnotationFilterList'
value(object)
## S4 method for signature 'AnnotationFilterList'
logicOp(object)
## S4 method for signature 'AnnotationFilterList'
not(object)
## S4 method for signature 'AnnotationFilterList'
distributeNegation(object,
.prior_negation = FALSE)
## S4 method for signature 'AnnotationFilterList,missing'
convertFilter(object)
## S4 method for signature 'AnnotationFilterList'
show(object)
|
... |
individual |
logicOp |
|
logOp |
Deprecated; use |
not |
|
.groupingFlag |
Flag desginated for internal use only. |
object |
An object of class |
.prior_negation |
|
AnnotationFilterList
returns an AnnotationFilterList
.
value()
returns a list
with AnnotationFilter
objects.
logicOp()
returns a character()
vector of
“&” or “|” symbols.
not()
returns a character()
vector of
“&” or “|” symbols.
AnnotationFilterList
object with DeMorgan's law applied to
it such that it is equal to the original AnnotationFilterList
object but all !
's are distributed out of the
AnnotationFilterList
object and to the nested
AnnotationFilter
objects.
character(1)
that can be used as input to a dplyr
filter.
The AnnotationFilterList
does not support containing empty
elements, hence all elements of length == 0
are removed in
the constructor function.
supportedFilters
for available
AnnotationFilter
objects
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ## Create some AnnotationFilters
gf <- GeneNameFilter(c("BCL2", "BCL2L11"))
tbtf <- TxBiotypeFilter("protein_coding", condition = "!=")
## Combine both to an AnnotationFilterList. By default elements are combined
## using a logical "and" operator. The filter list represents thus a query
## like: get all features where the gene name is either ("BCL2" or "BCL2L11")
## and the transcript biotype is not "protein_coding".
afl <- AnnotationFilterList(gf, tbtf)
afl
## Access individual filters.
afl[[1]]
## Create a filter in the form of: get all features where the gene name is
## either ("BCL2" or "BCL2L11") and the transcript biotype is not
## "protein_coding" or the seq_name is "Y". Hence, this will get all feature
## also found by the previous AnnotationFilterList and returns also all
## features on chromosome Y.
afl <- AnnotationFilterList(gf, tbtf, SeqNameFilter("Y"),
logicOp = c("&", "|"))
afl
afl <- AnnotationFilter(~!(symbol == 'ADA' | symbol %startsWith% 'SNORD'))
afl <- distributeNegation(afl)
afl
afl <- AnnotationFilter(~symbol=="ADA" & tx_start > "400000")
result <- convertFilter(afl)
result
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.