ranges2annot {CAGEr} | R Documentation |
Assigns region types such as promoter
, exon
or unknown
to CTSSes.
ranges2annot(ranges, annot)
ranges |
A |
annot |
A |
Only the biotypes that are likely to have a pol II promoter will be
filtered in. This is currently hardcoded in the function; see its source
code. Example of biotypes without a pol II promoter: VDJ segments, miRNA,
but also snoRNA, etc. Thus, the Intergenic category displayed in output of
the plotAnnot
may include counts overlaping with real exons of discarded
transcribed regions: be careful that large percentages do not necessarly
suggest abundance of novel promoters.
A Run-length-encoded (Rle
) factor of same length as the CTSS
object, indicating if the interval is promoter
, exon
, intron
or
unknown
, or just promoter
, gene
, unknown
if the type
metadata is absent.
Charles Plessy
CTSScoordinatesGR
, exampleZv9_annot
Other CAGEr annotation functions: annotateCTSS
,
plotAnnot
, ranges2genes
,
ranges2names
CAGEr:::ranges2annot(CTSScoordinatesGR(exampleCAGEexp), exampleZv9_annot) ctss <- GenomicRanges::GRanges("chr1", IRanges::IPos(c(1,100,200,1500)), "+") ctss <- GenomicRanges::GPos(ctss) ctss <- CAGEr:::.CTSS(ctss) gr1 <- GenomicRanges::GRanges( "chr1" , IRanges::IRanges(c(650, 650, 1400), 2000), "+") CAGEr:::ranges2annot(ctss, gr1) gr2 <- gr1 gr2$type <- c("transcript", "exon", "transcript") gr2$transcript_type <- c("protein_coding", "protein_coding", "miRNA") CAGEr:::ranges2annot(ctss, gr2)