plotTopMotifsSequence-MotifEnrichmentResults-method: Plot the top N enrichment motifs in a single sequence

Description Usage Arguments Examples

Description

Plot the top N enrichment motifs in a single sequence

Usage

1
2
## S4 method for signature 'MotifEnrichmentResults'
plotTopMotifsSequence(obj, seq.id, n, bg = TRUE, id = FALSE, ...)

Arguments

obj

a MotifEnrichmentResults object

seq.id

either the sequence number or sequence name

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
if(requireNamespace("PWMEnrich.Dmelanogaster.background")){
   ###
   # load the pre-compiled lognormal background
   data(PWMLogn.dm3.MotifDb.Dmel, package = "PWMEnrich.Dmelanogaster.background")

   # 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
   plotTopMotifsSequence(res, 1, 4)

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

PWMEnrich documentation built on Nov. 8, 2020, 7:45 p.m.