condense_granges: Condense GRanges

View source: R/condense_granges.R

condense_grangesR Documentation

Condense GRanges

Description

Condense a GRanges object by taking the min/max position per chromosome. This helps to reduce the total number of queries, which can cause memory allocation problems due to repeated calls to the underlying C libraries.

Usage

condense_granges(gr, split_chromosomes = FALSE)

Arguments

gr

A GRanges object.

split_chromosomes

Split into a named list by chromosome.

Value

GRanges

Examples

gr <- unlist(
    GenomicRanges::GRangesList(
        "gr1"=GenomicRanges::GRanges("4:1-100"),
        "gr2"=GenomicRanges::GRanges("4:300-500"),
        "gr3"=GenomicRanges::GRanges("8:40-10000"))
)
gr2 <- condense_granges(gr = gr)                

neurogenomics/PeakyFinders documentation built on March 24, 2024, 4:28 p.m.