View source: R/trimTranscripts.R
trimTranscripts | R Documentation |
Resize 5' and 3' ends of a transcript GenomicRanges
trimTranscripts(x, start = 0, end = 0)
x |
GRanges or GRangesList object containing exon coordinates for each transcript |
start |
Number of bases to trim from the start of transcript. Providing a negative value will extend the transcript instead. If 'x' is a GRanges object, 'start' is a single integer. If 'x' is a GRangesList, 'start' can be a single integer or a list of integers of the same length as 'x' |
end |
Number of bases to trim from the end of transcript. Providing a negative value will extend the transcript instead. If 'x' is a GRanges object, 'end' is a single integer. If 'x' is a GRangesList, 'end' can be a single integer or a list of integers of the same length as 'x' |
Trimmed GenomicRanges object
Fursham Hamid
library(GenomicRanges)
gr1 <- GRanges(
seqnames = "chr1", strand = c("+", "+", "+"),
ranges = IRanges(
start = c(1, 500, 1000),
end = c(100, 600, 1100)
)
)
trimTranscripts(gr1, 20, 80)
trimTranscripts(gr1, 110, 150)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.