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)
}
serachoi1230/EpiCompare documentation built on Jan. 30, 2024, 11:37 a.m.