Given calcDinuclFreq or calcDinuclFreqRef results, this function generates a violin plot of dinucleotide frequency

plotDinuclFreq(DNFDataTable)

Arguments

DNFDataTable

A data.table, data.frame, or a list of dinucleotide counts - results from calcDinuclFreq or calcDinuclFreqRef

Value

A ggplot object plotting distribution of dinucleotide content in query regions

Examples


DNFDataTable = data.table::data.table(GC = rnorm(400, mean=0.5, sd=0.1), 
CG = rnorm(400, mean=0.5, sd=0.5), 
AT = rnorm(400, mean=0.5, sd=1), 
TA = rnorm(400, mean=0.5, sd=1.5))
DNFPlot =  plotDinuclFreq(DNFDataTable)

if (FALSE) {
query = system.file("extdata", "vistaEnhancers.bed.gz", package="GenomicDistributions")
GRquery = rtracklayer::import(query)
refAssembly = 'hg19'
DNF = calcDinuclFreqRef(GRquery, refAssembly)
DNFPlot2 =  plotDinuclFreq(DNF)
}