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)
# reports for the two sequences
r1 = sequenceReport(res, 1)
r2 = sequenceReport(res, 2)
# view the results
r1
r2
# plot the top 10 most enriched motifs in the first, and then second sequence
plot(r1[1:10])
plot(r2[1:10])
}
Run the code above in your browser using DataLab