ensembldb (version 1.4.7)

SeqendFilter: Constructor functions for filter objects

Description

These functions allow to create filter objects that can be used to retrieve specific elements from the annotation database.

Usage

EntrezidFilter(value, condition = "=")
GeneidFilter(value, condition = "=")
GenenameFilter(value, condition = "=")
GenebiotypeFilter(value, condition = "=")
GRangesFilter(value, condition="within", feature="gene")
TxidFilter(value, condition = "=")
TxbiotypeFilter(value, condition = "=")
ExonidFilter(value, condition = "=")
ExonrankFilter(value, condition = "=")
SeqnameFilter(value, condition = "=")
SeqstrandFilter(value, condition = "=")
SeqstartFilter(value, condition = "=", feature = "gene")
SeqendFilter(value, condition = "=", feature = "gene")

Arguments

value
The filter value, e.g., for GeneidFilter the id of the gene for which the data should be retrieved. For character values (all filters except SeqstartFilter and SeqendFilter) also a character vector of values is allowed. Allowed values for SeqstrandFilter are: "+", "-", "1" or "-1".

For GRangeFilter this has to be a GRanges object.

condition
The condition to be used in the comparison. For character values "=", "in" and "like" are allowed, for numeric values (SeqstartFilter and SeqendFilter) "=", ">", ">=", "<"< code=""> and "<="< code="">. Note that for "like" value should be a SQL pattern (e.g. "ENS%").

For GRangesFilter, "within" and "overlapping" are allowed. See below for details.

feature
For SeqstartFilter and SeqendFilter: the chromosomal position of which features should be used in the filter (either "gene", "transcript" or "exon").

For GRangesFilter: the submitted value is overwritten internally depending on the called method, i.e. calling genes will set feature to "gene", transcripts to "tx" and exons to "exon".

Value

Depending on the function called an instance of: EntrezidFilter, GeneidFilter, GenenameFilter, GenebiotypeFilter, GRangesFilter, TxidFilter, TxbiotypeFilter, ExonidFilter, ExonrankFilter, SeqnameFilter, SeqstrandFilter, SeqstartFilter, SeqendFilter

Details

EntrezidFilter
Filter results based on the NCBI Entrezgene ID of the genes.

GeneidFilter
Filter results based on Ensembl gene IDs.

GenenameFilter
Filter results based on gene names (gene symbols).

GenebiotypeFilter
Filter results based on the biotype of the genes. For a complete list of available gene biotypes use the listGenebiotypes method.

GRangesFilter
Allows to fetch features within or overlapping the specified genomic region(s)/range(s). This filter takes a GRanges object as input and, if condition="within" (the default) will restrict results to features (genes, transcripts or exons) that are completely within the region. Alternatively, by specifying condition="overlapping" it will return all features that are partially overlapping with the region, i.e. which start coordinate is smaller than the end coordinate of the region and which end coordinate is larger than the start coordinate of the region. Thus, genes and transcripts that have an intron overlapping the region will also be returned.

Note: if the specified GRanges object defines multiple region, all features within (or overlapping) any of these regions are returned.

See GRangesFilter for more details.

TxidFilter
Filter results based on the Ensembl transcript IDs.

TxbiotypeFilter
Filter results based on the biotype of the transcripts. For a complete list of available transcript biotypes use the listTxbiotypes method.

ExonidFilter
Filter based on the Ensembl exon ID.

ExonrankFilter
Filter results based on exon ranks (indices) of exons within transcripts.

SeqnameFilter
Filter results based on the name of the sequence the features are encoded.

SeqstrandFilter
Filter results based on the strand on which the features are encoded.

SeqstartFilter
Filter results based on the (chromosomal) start coordinate of the features (exons, genes or transcripts).

SeqendFilter
Filter results based on the (chromosomal) end coordinates.

See Also

EntrezidFilter, GeneidFilter, GenenameFilter, GenebiotypeFilter, GRangesFilter, TxidFilter, TxbiotypeFilter, ExonidFilter, ExonrankFilter, SeqnameFilter, SeqstrandFilter, SeqstartFilter, SeqendFilter

Examples

Run this code

## create a filter that could be used to retrieve all informations for
## the respective gene.
Gif <- GeneidFilter("ENSG00000012817")
Gif
## returns the where where of the SQL querys
where(Gif)

## create a filter for a chromosomal end position of a gene
Sef <- SeqendFilter(100000, condition="<", "gene")
Sef

## To find genes within a certain chromosomal position filters should be
## combined:
Ssf <- SeqstartFilter(10000, condition=">", "gene")
Snf <- SeqnameFilter("2")
## combine the filters
Filter <- list(Ssf, Sef, Snf)

Filter

## generate the where SQL call for these filters:
where(Filter)


## Create a GRangesFilter
GRangesFilter(GRanges("X", IRanges(123, 5454)))

## Create a GRangesFilter with multiple ranges
grf <- GRangesFilter(GRanges(c("X", "Y"),
                             IRanges(start=c(123, 900),
                                     end=c(5454, 910))))
## Evaluate the "where" SQL where that would be applied.
where(grf)
## Change the "condition" of the filter and evaluate the
## where condition again.
condition(grf) <- "overlapping"
where(grf)

Run the code above in your browser using DataLab