if(require("PWMEnrich.Dmelanogaster.background")){
data(MotifDb.Dmel)
affinity = motifScores(DNAString("CGTAGGATAAAGTAACTAGTTGATGATGAAAG"), MotifDb.Dmel) # affinity scores
counts = motifScores(DNAString("CGTAGGATAAAGTAACTAGTTGATGATGAAAG"), MotifDb.Dmel, cutoff=log2(exp(4))) # motif hit count with Patser score of 4
print(affinity)
print(counts)
# scanning multiple sequences
sequences = list(DNAString("CGTAGGATAAAGTAACTAGTTGATGATGAAAG"), DNAString("TGAGACGAAGGGGATGAGATGCGGAAGAGTGAAA"))
affinity2 = motifScores(sequences, MotifDb.Dmel)
print(affinity2)
}
Run the code above in your browser using DataLab