Learn R Programming

PWMEnrich (version 4.8.2)

plotTopMotifsGroup,MotifEnrichmentResults-method: Plot the top N enrichment motifs in a group of sequences

Description

Plot the top N enrichment motifs in a group of sequences

Arguments

obj
a MotifEnrichmentResults object
n
the number of top ranked motifs to plot
bg
if to use background corrected P-values to do the ranking (if available)
id
if to show PWM IDs instead of target TF names
...
other parameters passed to plotMultipleMotifs()

Examples

Run this code
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)

   # plot the top 4 motifs in a 2x2 grid
   plotTopMotifsGroup(res, 4)

   # plot top 3 motifs in a single row
   plotTopMotifsGroup(res, 3, row=1, cols=3)
}

Run the code above in your browser using DataLab