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

Description Usage Arguments Details Value Author(s) Examples

View source: R/contains.R

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 documentation built on Sept. 3, 2021, 7:15 p.m.