Learn R Programming

ballgown (version 2.4.2)

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

Description

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

Usage

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)

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).

Details

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

Examples

Run this code
## 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

Run the code above in your browser using DataLab