Hello, I am using your R package these days, and I got the results of .dba.report () function. I want to how to sort the results ? For example, I ran the code: bptH3K27AcPeak.DB<-dba.report(bptH3K27AcPeak_a, th=0.05, bUsePval=TRUE, fold=2) And I got the bptH3K27AcPeak.DB Then I want to use sorted bptH3K27AcPeak.DB files, for example, sorted by P-value. And do the dba.plotHeatmap function using top 1000 peaks. Thank you very much !
The returned report should already be sorted by p-value (lowest to highest).
You can change how the report is sorted based on any of the metadata columns. For example, to sort by absolute value of the fold change (greatest absolute fold change to lowest):
To control what sites are used in
dba.plotHeatmap(), you can specify
bptH3K27AcPeak.DB. You can set the value for maxSites to the number of sites in the report (and make sure the report has the sites you want to plot). For example, to plot the 100 sites in the report with the highest absolute fold changes:
> highestAbsFold <- bptH3K27AcPeak.DB[order(abs(bptH3K27AcPeak.DB$Fold), decreasing=TRUE),][1:100,] > dba.plotHeatmap(bptH3K27AcPeak_a, correlations=FALSE, report=highestAbsFold, maxSites=100)