asTX {ORFik} | R Documentation |
Map range coordinates between features in the genome and transcriptome (reference) space.
asTX( grl, reference, ignore.strand = FALSE, x.is.sorted = TRUE, tx.is.sorted = TRUE )
grl |
a |
reference |
a GrangesList of ranges that include and are bigger or equal to grl ig. cds is grl and gene can be reference |
ignore.strand |
When ignore.strand is TRUE, strand is ignored in
overlaps operations (i.e., all strands are considered "+") and the
strand in the output is '*'. |
x.is.sorted |
if x is a GRangesList object, are "-" strand groups pre-sorted in decreasing order within group, default: TRUE |
tx.is.sorted |
if transcripts is a GRangesList object, are "-" strand groups pre-sorted in decreasing order within group, default: TRUE |
Similar to GenomicFeatures' pmapToTranscripts, but in this version the grl ranges are compared to reference ranges with same name, not by index. And it has a security fix.
a GRangesList in transcript coordinates
Other ExtendGenomicRanges:
coveragePerTiling()
,
extendLeaders()
,
extendTrailers()
,
reduceKeepAttr()
,
tile1()
,
txSeqsFromFa()
,
windowPerGroup()
seqname <- c("tx1", "tx2", "tx3") seqs <- c("ATGGGTATTTATA", "AAAAA", "ATGGGTAATA") grIn1 <- GRanges(seqnames = "1", ranges = IRanges(start = c(21, 10), end = c(23, 19)), strand = "-") grIn2 <- GRanges(seqnames = "1", ranges = IRanges(start = c(1), end = c(5)), strand = "-") grIn3 <- GRanges(seqnames = "1", ranges = IRanges(start = c(1010), end = c(1019)), strand = "-") grl <- GRangesList(grIn1, grIn2, grIn3) names(grl) <- seqname # Find ORFs test_ranges <- findMapORFs(grl, seqs, "ATG|TGG|GGG", "TAA|AAT|ATA", longestORF = FALSE, minimumLength = 0) # Genomic coordinates ORFs test_ranges # Transcript coordinate ORFs asTX(test_ranges, reference = grl) # seqnames will here be index of transcript it came from