GRangesList2GRanges: Convert a GRangesList object to a GRanges object

View source: R/GRangesList2GRanges.R

GRangesList2GRangesR Documentation

Convert a GRangesList object to a GRanges object

Description

Convert a GRangesList object to a GRanges object. The output region set follows the format required by the RgnTX permutation test functions, which should have metadata columns 'group' and 'transcriptsHits'.

Usage

GRangesList2GRanges(A = NULL)

Arguments

A

A GRangesList object.

Value

A GRanges object. Its transcript ids (if available) should be contained in a metadata column named “transcriptsHits”, which are provided by the names of input GRangesList object.

See Also

GRanges2GRangesList

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)

RS1 <- GRangesList2GRanges(RS1)

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