randomizeTx: Get randmized regions over transcriptome

View source: R/randomizeTx.R

randomizeTxR Documentation

Get randmized regions over transcriptome

Description

Pick random regions over specified transcripts.

Usage

randomizeTx(txdb, trans_ids = 'all',
random_num = 100, random_length = 20, type = 'mature', N = 1, ...)

Arguments

txdb

A TxDb object.

trans_ids

The ids of transcripts, which should be a character object. Random regions will be picked from these transcripts. If this argument takes the default value 'all', the scope of picking random regions will be the whole transcriptome.

random_num

The number of regions to be picked.

random_length

The length of regions to be picked.

type

A character object. Default is "mature". It accepts options "mature", "full", "fiveUTR", "CDS" or "threeUTR", with which one can get corresponding types of transcriptome regions.

N

Randomization times.

...

Any additional parameters needed.

Value

A GRangesList object. The name of each element is the id of the transcript where the corresponding range is located.

See Also

randomizeTransByOrder, randomizeFeaturesTx, randomizeFeaturesTxIA

Examples

library(TxDb.Hsapiens.UCSC.hg19.knownGene)
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
trans.ids <- c("170", "782", "974", "1364", "1387")
RS1 <- randomizeTx(txdb, trans.ids, random_num = 100, random_length = 100)

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