Learn R Programming

PWMEnrich (version 4.8.2)

plot: Plotting for the PWM class

Description

This function produces a sequence logo (via package seqLogo).

Plots a graphical version of the motif enrichment report. Note that all values are plotted, if you want to plot only a subset of a report, first select this subset (see examples).

Arguments

x
the PWM object
y
unused
...
other parameters to pass to seqLogo's plot function
x
a MotifEnrichmentReport object
y
unused
fontsize
font size to use in the plot
header.fontsize
font size of the header
widths
the relative widths of columns
...
unused if(require("PWMEnrich.Dmelanogaster.background")) ### # load the pre-compiled lognormal background data(PWMLogn.dm3.MotifDb.Dmel)

# scan two sequences for motif enrichment sequences = list(DNAString("GAAGTATCAAGTGACCAGTAAGTCCCAGATGA"), DNAString("AGGTAGATAGAACAGTAGGCAATGAAGCCGATG"))

res = motifEnrichment(sequences, PWMLogn.dm3.MotifDb.Dmel)

# produce a report for all sequences taken together r = groupReport(res)

# plot the top 10 most enriched motifs plot(r[1:10])

Examples

Run this code
if(require("PWMEnrich.Dmelanogaster.background")){
  data(MotifDb.Dmel)

  # plot the tinman motif from MotifDb
  plot(MotifDb.Dmel[["tin"]])
}

Run the code above in your browser using DataLab