Description Usage Arguments Author(s) Examples
A new representation of DNA motif logo via ggplot2. Besides, the xlabel could be DNA or SNP.
1 2 |
pwm |
position weight matrix |
xlabel |
text of label in x-axis |
ylabel |
The default is Bits |
tit |
The default is Motif |
addpoint |
add point to the position of nt. The default is FALSE |
scaleSize |
the scale size of nt. ref |
Zhilong Jia
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | library(motiflogo)
pfm <- matrix(data=c(5, 3, 16, 1, 0, 17, 17, 0, 0, 16, 12, 8,
6, 9, 1, 1, 18, 1, 0, 0, 18, 1, 0, 2,
2,3, 1, 0, 0, 0, 0, 1, 0, 0, 1, 2,
5, 3, 0, 16, 0, 0, 1, 17, 0, 1, 5, 6),
byrow=TRUE,nrow=4,dimnames=list(c('A','C','G','T')))
pwm <- apply(pfm, 2, function(x) x/sum(x))
motiflogo(pwm)
xlabel <- c("T", "G", "A", "T", "C", "A\nC", "A", "A", "C","A", "A", "T")
motiflogo(pwm, xlabel=xlabel)
motiflogo(pwm, xlabel=xlabel, addpoint=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.