contains: determine if one set of GRanges fully contains any of another...

Description Usage Arguments Details Value Author(s) Examples

Description

determine if one set of GRanges fully contains any of another set of GRanges

Usage

1
contains(transcripts, cds)

Arguments

transcripts

GRangesList object (assume for now that it represents transcripts)

cds

GRangesList object (assume for now that it represents sets of coding sequences)

Details

If gown is a ballgown object, transcripts can be structure(gown)$trans (or any subset).

Value

vector with length equal to length(transcripts), where each entry is TRUE if the corresponding transcript contains a coding sequence (i.e., is a superset of at least one entry of cds).

Author(s)

Alyssa Frazee

Examples

1
2
3
4
5
6
7
## pretend this annotation is coding sequence:
gtfPath = system.file('extdata', 'annot.gtf.gz', package='ballgown')
annot = gffReadGR(gtfPath, splitByTranscript=TRUE)
data(bg)
results = contains(structure(bg)$trans, annot)
# results is a boolean vector
sum(results) #61

alyssafrazee/ballgown-release documentation built on May 12, 2019, 1:40 a.m.