Genomic-Extractors: Extract genomic features from src_organism objects

Description Usage Arguments Value Author(s) See Also Examples

Description

Generic functions to extract genomic features from an object. This page documents the methods for src_organism objects only.

These are the main functions for extracting transcript information from a src_organism object, inherited from transcripts in GenomicFeatures package. Two versions of results are provided: tibble (transcripts_tbl()) and GRanges or GRangesList (transcripts()).

Usage

 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
cds(x, ...)
 exons(x, ...)
 genes(x, ...)
 transcripts(x, ...)
 cds_tbl(x, filter=NULL, columns=NULL)
 exons_tbl(x, filter=NULL, columns=NULL)
 genes_tbl(x, filter=NULL, columns=NULL)
 transcripts_tbl(x, filter=NULL, columns=NULL)
 cdsBy(x, by=c("tx", "gene"), ...)
 exonsBy(x, by=c("tx", "gene"), ...)
 transcriptsBy(x, by=c("gene", "exon", "cds"), ...)
 cdsBy_tbl(x, by=c("tx", "gene"), filter=NULL, columns=NULL)
 exonsBy_tbl(x, by=c("tx", "gene"), filter=NULL, columns=NULL)
 transcriptsBy_tbl(x, by=c("gene", "exon", "cds"), filter=NULL, columns=NULL)
 promoters_tbl(x, upstream, downstream, filter=NULL, columns=NULL)
 intronsByTranscript_tbl(x, filter=NULL, columns=NULL)
 fiveUTRsByTranscript(x, ...)
 fiveUTRsByTranscript_tbl(x, filter=NULL, columns=NULL)
 threeUTRsByTranscript(x, ...)
 threeUTRsByTranscript_tbl(x, filter=NULL, columns=NULL)

## S4 method for signature 'src_organism'
promoters(x, upstream, downstream, filter = NULL, columns = NULL)

## S4 method for signature 'src_organism'
intronsByTranscript(x, filter = NULL, columns = NULL)

Arguments

x

A src_organism object

upstream

For promoters(): An integer(1) value indicating the number of bases upstream from the transcription start site.

downstream

For promoters(): An integer(1) value indicating the number of bases downstream from the transcription start site.

filter

Either NULL, AnnotationFilter, or AnnotationFilterList to be used to restrict the output. Filters consists of AnnotationFilters and can be a GRanges object using "GRangesFilter" (see examples).

columns

A character vector indicating columns to be included in output GRanges object or tbl.

by

One of "gene", "exon", "cds" or "tx". Determines the grouping.

...

Additional arguments to S4methods. In this case, the same as filter.

Value

functions with _tbl return a tibble object, other methods return a GRanges or GRangesList object.

Author(s)

Yubo Cheng.

See Also

src_organism for creating a src_organism object.

Examples

 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
## Not run: src <- src_ucsc("human")
src <- src_organism(dbpath=hg38light())

## transcript coordinates with filter in tibble format
filters <- AnnotationFilter(~symbol == c("A1BG", "CDH2"))
transcripts_tbl(src, filters)

transcripts_tbl(src, AnnotationFilter(~symbol %startsWith% "SNORD"))
transcripts_tbl(src, AnnotationFilter(~go == "GO:0005615"))
transcripts_tbl(src, filter=AnnotationFilter(
     ~symbol %startsWith% "SNORD" & tx_start < 25070000))

## transcript coordinates with filter in granges format
filters <- GRangesFilter(GenomicRanges::GRanges("chr15:1-25070000"))
transcripts(src, filters)

## promoters
promoters(src, upstream=100, downstream=50,
          filter = SymbolFilter("ADA"))

## transcriptsBy
transcriptsBy(src, by = "exon", filter = SymbolFilter("ADA"))

## exonsBy
exonsBy(src, filter = SymbolFilter("ADA"))

## intronsByTranscript
intronsByTranscript(src, filter = SymbolFilter("ADA"))

Organism.dplyr documentation built on Nov. 8, 2020, 5:45 p.m.