View source: R/ranges_helpers.R
asTX | 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 grl as a subset of ranges. Example: cds is grl and mrna 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. This gives a large speedup, but also requires all objects must be named.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.