Last active
April 11, 2021 23:58
-
-
Save tgirke/df6fe20c2e42e71a7ade04941d4a05e9 to your computer and use it in GitHub Desktop.
Motif enrichment for ChIP-Seq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################### | |
## PWM matching in sequences ## | |
############################### | |
## Date: May 22, 2020 | |
## Starter code for ChIP-Seq1 project | |
library(MotifDb) | |
as.list(query(MotifDb, 'athaliana')) | |
as.list(query(MotifDb, 'hsapiens')) | |
chr <- DNAStringSet(c(seq1="AAAGCTAAAGGTAAAGCAAAACGCCGCCG", seq2="CGCCGCCG")) | |
pwm <- as.list(query(MotifDb, 'athaliana'))[[1]] | |
sapply(chr, function(x) matchPWM(pwm, x, min.score="90%")) | |
########################## | |
## Matches among motifs ## | |
########################## | |
library(MotIV) | |
?motifMatch | |
egr1.motif <- MotifDb[egr1.mouse.jaspar.rows] | |
ts <- motifMatch(as.list (pwm), as.list (pwm), top=11) | |
##################################### | |
## Motif enrichment with PWMEnrich ## | |
##################################### | |
## see here: http://bioconductor.org/packages/release/bioc/vignettes/PWMEnrich/inst/doc/PWMEnrich.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment