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
plotTopMotifsSequence(res, 1, 4)
# plot top 3 motifs in a single row
plotTopMotifsSequence(res, 1, 3, row=1, cols=3)
}
Run the code above in your browser using DataLab