if(require("PWMEnrich.Dmelanogaster.background")){
# load the background file for drosophila and lognormal correction
data(PWMLogn.dm3.MotifDb.Dmel)
# get the differential enrichment
diff = motifDiffEnrichment(DNAString("TGCATCAAGTGTGTAGTGTGAGATTAGT"), DNAString("TGAACGAGTAGGACGATGAGAGATTGATG"), PWMLogn.dm3.MotifDb.Dmel, verbose=FALSE)
# motifs differentially enriched in the first sequence (with lognormal background correction)
head(sort(diff$group.bg, decreasing=TRUE))
# motifs differentially enriched in the second sequence (with lognormal background correction)
head(sort(diff$group.bg))
}
Run the code above in your browser using DataLab