flatGrl: Transform GRangesList to GRanges

Description Usage Arguments Details Value Author(s) Examples

View source: R/utils.R

Description

Transform GRangesList to GRanges.

Usage

1
flatGrl(object, indName = "grl_name")

Arguments

object

a GRangesList object.

indName

column named by 'indName' that groups the records by their original element in 'object'.

Details

This method is different from default stack, it integrate elementMetadata of GRangesList to the final coerced GRanges.

Value

A GRanges object.

Author(s)

Tengfei Yin

Examples

1
2
3
4
5
6
7
library(GenomicRanges)
gr1 <- GRanges("chr1", IRanges(1:10, width = 5))
gr2 <- GRanges("chr2", IRanges(1:10, width = 5))
obj <- GRangesList(gr1, gr2)
values(obj) <- data.frame(a = 1:2, b = letters[1:2])
stack(obj)
flatGrl(obj)

lawremi/biovizBase documentation built on Dec. 21, 2021, 9:42 a.m.