A new representation of DNA motif logo via ggplot2.

Manual

  1. data
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))
  1. Type 1 plotting: as a canonical motif logo representation
# require(devtools)
# load_all("../")
library(motiflogo)
motiflogo(pwm)
  1. Type 2 plotting: as a SNP-specific motif logo representation
#the length of xlabel should same as the the number of columns in 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)

Bug Report

https://github.com/zhilongjia/motiflogo/issues

Other Information

System info

sessionInfo()

The END



zhilongjia/motiflogo documentation built on May 4, 2019, 11:22 p.m.