GRanges2GRangesList: Convert a GRanges object to a GRangesList object

View source: R/GRanges2GRangesList.R

GRanges2GRangesListR Documentation

Convert a GRanges object to a GRangesList object

Description

Convert a GRanges object to a GRangesList object. The output region set follows the format required by the main permutation test functions.

Usage

GRanges2GRangesList(A = NULL)

Arguments

A

A GRanges object.

Details

If input GRanges object has a metadata named as "group", ranges having the same group number represent a region. If not, a range is a region. A region in the input set will be outputted as a list element IN returned GRangesList object.

Value

A GRangesList object.

See Also

GRanges2GRangesList

Examples

library(GenomicRanges)
GRanges.object <- GRanges(
    Rle(c("chr2", "chr2", "chr1", "chr3")),
    IRanges(1:4, width = 5)
)
# Assign the first and the second ranges to the same element.
GRanges.object$group <- c(1, 1, 2, 3)
GRangesList.object <- GRanges2GRangesList(GRanges.object)

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