R/compute_consensus_peaks_consensusseeker.R

Defines functions compute_consensus_peaks_consensusseeker

compute_consensus_peaks_consensusseeker <- function(grlist,
                                                    genome_build,
                                                    ...){ 
    bsgen <- check_genome_build(genome_build = genome_build,
                                type = "bsgen")
    chrInfo <- GenomicRanges::seqinfo(bsgen)[
        GenomeInfoDb::seqlevelsInUse(grlist)
    ]  
    consensus_peaks <- consensusSeekeR::findConsensusPeakRegions( 
        peaks = unlist(grlist),
        chrInfo = chrInfo, 
        ...
    )$consensusRanges
    return(consensus_peaks)
}
neurogenomics/EpiCompare documentation built on Oct. 18, 2024, 11:04 p.m.