Given a reference genome (BSgenome object) and ranges on the reference, this function returns a data.table with counts of dinucleotides within the GRanges object.
calcDinuclFreq(query, ref, rawCounts = FALSE)
A GRanges object with query sets
Reference genome BSgenome object
a logical indicating whether the raw numbers should be displayed, rather than percentages (optional).
A data.table with counts of dinucleotides across the GRanges object
if (FALSE) {
bsg = loadBSgenome('hg19')
DNF = calcDinuclFreq(vistaEnhancers, bsg)
}