dba.plotHeatmap {DiffBind} | R Documentation |
Draws a binding site heatmap
dba.plotHeatmap(DBA, attributes=DBA$attributes, maxSites=1000, minval, maxval, contrast, method=DBA$config$AnalysisMethod, th=DBA$config$th, bUsePval=DBA$config$bUsePval, report, score, bLog=TRUE, mask, sites, sortFun=sd, correlations=TRUE, olPlot=DBA_COR, ColAttributes,RowAttributes, colSideCols, rowSideCols=colSideCols, margin=10, colScheme="Greens", distMethod="pearson", ...)
DBA |
DBA object. |
attributes |
attribute or vector of attributes to use for column labels: |
maxSites |
maximum number of binding sites to use in heatmap.
Only used when not drawing a correlation heatmap ( |
minval |
Set all scores less than this to minval |
maxval |
Set all scores greater than this to maxval |
contrast |
number of contrast to report on; if present, draws a heatmap based on a differential binding affinity analysis
(see |
method |
analysis method (used in conjunction with contrast): |
th |
significance threshold; all sites with FDR (or p-values, see b |
bUsePval |
logical indicating whether to use FDR ( |
report |
report (obtained from |
score |
Score to use for count data. Only used when plotting the global binding matrix (no contrast specified). One of: |
bLog |
Logical indicating that log2 values should be used. Only applicable with read count scores (not peak scores). |
mask |
mask indicating a subset of peaksets to use when using global binding matrix scores.
If a |
sites |
logical vector indicating which sites to include; first |
sortFun |
function taking a vector of scores and returning a single value.
Only relevant when using global binding matrix ( |
correlations |
logical indicating that a correlation heatmap should be plotted ( |
olPlot |
if correlations is specified as a dataframe returned by |
ColAttributes |
Attribute or vector of attributes to plot for column color bars.
If missing, all attributes with two or more unique non-NA values will be plotted.
(For correlation heatmaps, |
RowAttributes |
Attribute or vector of attributes for row color bars.
Row color bars are only allowed for correlation heatmaps.
Same values as for |
rowSideCols |
Vector of colors to use in row color bars. Uses default colors if missing. Can also be a list of color vectors. |
colSideCols |
Vector of colors to use in column color bars. Uses default colors if missing. Can also be a list of color vectors. |
margin |
margin size of plot |
colScheme |
Color scheme; see |
distMethod |
distance method for clustering; see |
... |
passed on to |
MODE: Correlation Heatmap plot using statistics for global binding matrix:
dba.plotHeatmap(DBA, attributes=DBA$attributes, minval, maxval,
correlations, olPlot,
colScheme="Greens", distMethod="pearson", ...)
MODE: Correlation Heatmap plot using statistics for significantly differentially bound sites:
dba.plotHeatmap(DBA, attributes=DBA$attributes, minval, maxval,
contrast, method=DBA_DESEQ2, th=0.05, bUsePval=F, mask,
overlaps, olPlot=DBA_COR,
colScheme="Greens", distMethod="pearson", ...)
MODE: Binding heatmap plot using significantly differentially bound sites:
dba.plotHeatmap(DBA, attributes, maxSites, minval, maxval,
contrast, method, th, bUsePval, correlations=FALSE,
colScheme, distMethod, ...)
MODE: Binding heatmap plot using the global binding matrix:
dba.plotHeatmap(DBA, attributes, maxSites, minval, maxval,
mask, sites, correlations=FALSE, sortFun,
colScheme, distMethod, ...)
if correlations is not FALSE
, the overlap/correlation matrix is returned.
if correlations is FALSE
, the sites used in the heatmap are returned in a
GRanges
object,
in the row order they appear (top to bottom).
The metadata contains a column for
each sample (also in the order they are appear in the clustering plot),
with the values being the actual plotted values.
Rory Stark
data(tamoxifen_peaks) # peak overlap correlation heatmap dba.plotHeatmap(tamoxifen) data(tamoxifen_counts) # counts correlation heatmap dba.plotHeatmap(tamoxifen) data(tamoxifen_analysis) #correlation heatmap based on all normalized data dba.plotHeatmap(tamoxifen,contrast=1,th=1) #correlation heatmap based on DB sites only dba.plotHeatmap(tamoxifen,contrast=1) #binding heatmap based on DB sites dba.plotHeatmap(tamoxifen,contrast=1,correlations=FALSE) #binding heatmap based on 1,000 sites with highest variance sites <- dba.plotHeatmap(tamoxifen,contrast=1,th=1, correlations=FALSE,sortFun=var) sites data(tamoxifen_counts) #Examples of heatmaps using DB sites with different subsets of samples #exclude T47D tamoxifen <- dba.contrast(tamoxifen,design=FALSE, group1=tamoxifen$masks$Resistant, group2=c(3:5,10:11)) tamoxifen <- dba.analyze(tamoxifen) # regular heatmaps with samples from two contrast groups only dba.plotHeatmap(tamoxifen, contrast=1) #also include the T47D samples dba.plotHeatmap(tamoxifen,contrast=1,mask=tamoxifen$masks$All) #correlation heatmap without MCF7 plot(tamoxifen,contrast=1,mask=!tamoxifen$masks$MCF7) # binding heatmap using only the MCF7 samples dba.plotHeatmap(tamoxifen,contrast=1,mask=tamoxifen$masks$MCF7,correlations=FALSE)