flatGrl {biovizBase} | R Documentation

## Transform GRangesList to GRanges

### Description

Transform GRangesList to GRanges.

### Usage

    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

    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)

[Package biovizBase version 1.28.2 Index]