Learn R Programming

MMDiff (version 1.8.0)

plotPeak: plot read enrichment profiles at a specific peak for all specified samples.

Description

plot read enrichment profiles at a specific peak for all specified samples.

Usage

plotPeak(DBA, Peak.id, Sample.ids = NULL, NormMethod = 'DESeq', plot.input = TRUE, fieldname = "PeakRawHists", save2file = FALSE, fn.pics)

Arguments

DBA
DBA object, after running getPeakProfiles Specifically, it uses the element MD, which should contain an element called according to fieldname.
Peak.id
integer specifying the index of the peak to be drawn.
Sample.ids
sample ids (as in Cfp1$samples$SampleID)
NormMethod
specify which normalization method should be used, currently only the 'DESeq' method [3] is implemented. Note, that unless NormMethod=NULL, getNormFactors has to be called first.
plot.input
TRUE, if the input (control) should be included on the plot
fieldname
name of list element in DBA$MD that is used for plotting of peak. (e.g. PeakRawHists)
save2file
if TRUE plot is saved to pdf file
fn.pics
name of pdf file, to which the plot will be saved to.

See Also

getPeakProfiles, getNormFactors, plotHistDists

Examples

Run this code

# load DBA objects with peak profiles 
data(Cfp1Profiles)
plotPeak(Cfp1Profiles, Peak.id=20, NormMethod=NULL)

# plot normalized profiles of WT.AB2 and Resc.AB2 samples,  don't plot
# the input:

Cfp1Norm <- getNormFactors(Cfp1Profiles)
Sample.ids <- c("WT.AB2", "Resc.AB2")
plotPeak(Cfp1Norm, Peak.id=20, Sample.ids=Sample.ids,
      NormMethod='DESeq', plot.input = FALSE)

Run the code above in your browser using DataLab