orfRelativePos {RiboProfiling} | R Documentation |
Relative position of the start and stop codon along the transcript
orfRelativePos(cdsTransc, exonGRanges)
cdsTransc |
a GRangesList. It contains the CDS coordinates grouped by transcript. |
exonGRanges |
a GRangesList. It contains the exon coordinates grouped by transcript. |
a list. A list of relative positions of the start and end of ORFs.
#make a txdb object containing the annotations for the specified species. #In this case hg19. txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene::TxDb.Hsapiens.UCSC.hg19.knownGene #get all CDSs by transcript cds <- GenomicFeatures::cdsBy(txdb, by="tx", use.names=TRUE) #get all exons by transcript exonGRanges <- GenomicFeatures::exonsBy(txdb, by="tx", use.names=TRUE) #retrieve the positions of start and end codons relative to the transcript cdsPosTransc <- orfRelativePos(cds, exonGRanges)