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)

Arguments

query

A GRanges object with query sets

ref

Reference genome BSgenome object

rawCounts

a logical indicating whether the raw numbers should be displayed, rather than percentages (optional).

Value

A data.table with counts of dinucleotides across the GRanges object

Examples

if (FALSE) { 
bsg = loadBSgenome('hg19')
DNF = calcDinuclFreq(vistaEnhancers, bsg)
}