shiftTx | R Documentation |
Calculate positional shifting over transcript regions.
shiftTx(regions, start, width, direction, strand)
regions |
A feature set following the format indicated in vignette section 3. Either to be |
start |
Starting positions. Each value represents a starting position in each input feature. |
width |
Widths. Each value represents a width of each region to be picked from each feature. |
direction |
Either to be character "left" or "right", which means the direction to which the starting position is shifting. The former means moving to the direction of 5' while the latter means moving to 3'. |
strand |
The strand type of the transcripts. It receives "+" or "-". |
A Granges
object.
# Take five transcripts.
# Extract the last 200 nt regions from their CDS part.
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
trans.id.pstv <- c("170", "782", "974", "1364", "1387")
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
# download the CDS part of all transcriptome
cds.tx0 <- cdsBy(txdb, use.names = FALSE)
# pick the CDS part of these five transcripts
cds.p <- cds.tx0[trans.id.pstv]
width <- 200
start <- as.numeric(max(end(cds.p)))
R.cds.last200 <- shiftTx(cds.p, start = start, width = width, direction = 'left', strand = "+")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.