shiftExonTx: Shift regions over transcripts

View source: R/shiftExonTx.R

shiftExonTxR Documentation

Shift regions over transcripts

Description

Shift regions over transcripts (exons).

Usage

shiftExonTx(regions, start, width)

Arguments

regions

A region set either to be GRanges or GRangesList, following the format indicated in vignette section 3.

start

Starting positions. The function will return a region set shifting from these starting positions.

width

Widths. The widths of returned regions. It should be positive/negative if users would like to move the starting positions to the right (3')/left (5').

Value

A GRangesList object.

Examples

library(TxDb.Hsapiens.UCSC.hg19.knownGene)
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
exons.tx0 <- exonsBy(txdb)
#Shift regions over the following transcripts
trans.ids <- c("170", "1387", "4113", "10715")
regions <- exons.tx0[trans.ids]
start <- c(3624255, 55158197, 881641, 15694195)
width <- c(200, -200, 200, -200)
shifted_regions <- shiftExonTx(regions, start, width)

yue-wang-biomath/RgnTX documentation built on Aug. 24, 2023, 1:12 p.m.