randomizeTransByOrder: Randomize features into transcriptome

View source: R/randomizeTransByOrder.R

randomizeTransByOrderR Documentation

Randomize features into transcriptome

Description

This function receives a GRangesList object and picks a random region within each list element of this object. The length of the region to be picked is decided by the input random_length argument.

Usage

randomizeTransByOrder(regions_A, random_length = 20)

Arguments

regions_A

A GRangesList object. The name of each list element should be the corresponding transcript id.

random_length

A numeric object.

Value

A GRangesList object. The name of each list element should be the corresponding transcript id.

See Also

randomizeTx, randomizeFeaturesTx, randomizeFeaturesTxIA

Examples

library(TxDb.Hsapiens.UCSC.hg19.knownGene)
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
exons.tx0 <- exonsBy(txdb)
trans.ids <- sample(names(exons.tx0), 3)
regions.A <- exons.tx0[trans.ids]
RS <- randomizeTransByOrder(regions.A, random_length = 200)

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