trimGRanges | R Documentation |
trim to get the first or last bases from GRanges.
trimGRanges(x, width = 100, start = TRUE)
x |
A |
width |
|
start |
|
Image we have exons from the same transcript in the x
.
We want to fetch 100 bases of CDS from 5' end or 3' end.
A GRanges
object.
Ge Tan
gr <- GRanges(seqnames="chr1",
ranges=IRanges(start=c(2,10,20),
end=c(5, 15, 23)),
strand="+")
trimGRanges(gr, width=3, start=TRUE)
trimGRanges(gr, width=4, start=TRUE)
trimGRanges(gr, width=11, start=TRUE)
trimGRanges(gr, width=11, start=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.