dba.plotProfile {DiffBind} | R Documentation |
Generates profiles and makes heatmap plots.
dba.plotProfile(Object, samples, sites, scores, labels, normalize=TRUE, merge=DBA_REPLICATE, maxSites=1000, absScores=TRUE, doPlot=is(Object,"profileplyr"), ...)
Object |
Either a |
samples |
Sample mask. A vector of If absent, all samples will be included;
if Some groups of samples may be merged as indicated
in the |
sites |
If |
scores |
These can be any of the If |
labels |
Either a vector of sample label names (one for each sample in the plot), or a set of attributes to include (positive values) or exclude (negative values). Attributes include: |
normalize |
Can also be a vector of normalization factors, once for each sample. All counts for a sample will be divided by the normalization factor for that sample. |
merge |
Set of attributes to be used to determine which samples should be merged. All samples that share the same values for all other attributes except those specified will be merged by taking their mean count score (after normalizing, if specified), and included as a single sample column. Can also be specified as a list of vectors of sample numbers (relative to their
order in |
maxSites |
Maximum number of sites to include in a heatmap group. The top-scoring sites will be retained. |
absScores |
If |
doPlot |
|
... |
additional parameters passed on to |
This function enables the computation of peakset profiles and
the plotting of complex heatmaps.
It serves as a front-end to enable experiments analyzed using
DiffBind
to more easily use the
profiling and plotting functionality provided by the profileplyr
package
written by Tom Carroll and Doug Barrows.
Processing proceeds in two phases.
In the first phase, specific peaksets are extracted from a
DiffBind
DBA
object,
and profiles are calculated for these peaks for set of samples
in the DiffBind
experiment.
Profiles are calculated by counting the number of overlapping reads
in a series of bins upstream and downstream of each peak center.
In the second phase, the derived profiles are plotted in a series of complex heatmaps showing the relative intensity of overlapping peaks in each bin for each peak in each sample, along with summary plots showing the average profile across the sites for each sample.
Due to the computational cost of this function,
it is advised that the calculation of profiles
and the plotting of heatmaps be separated into two calls,
so that the profiles do not need to be re-generated if something goes wrong
in the plotting.
By default, when a DBA
object is passed in to generate profiles,
plotting is turned off and a profileplyr
object is returned.
When dba.plotProfile
is called with a profileplyr
object,
a plot is generated by default.
More detailed documentation is included in a markdown demonstration script
included with the DiffBind
package. This can be located as
follows:
system.file('extra/plotProfileDemo.Rmd',package='DiffBind')
An HTML version of the demonstration notebook can be accessed online at https://content.cruk.cam.ac.uk/bioinformatics/software/DiffBind/plotProfileDemo.html
silently returns a profileplyr-class
object.
Rory Stark
Carroll T, Barrows D (2020). profileplyr: Visualization and annotation of read signal over genomic ranges with profileplyr. DOI: 10.18129/B9.bioc.profileplyr
profileplyr::profileplyr-class
profileplyr::BamBigwig_to_chipProfile
profileplyr::generateEnrichedHeatmap
profileplyr::profileplyr
(Vignette)
# See plotProfileDemo notebook: # system.file('extra/plotProfileDemo.Rmd',package='DiffBind') data(tamoxifen_analysis) # default Profile plot ## Not run: dba.plotProfile(tamoxifen)