This function constructs an object of class pwm from a matrix. It checks that the matrix has correct dimensions and that columns add up to 1.0.
makePWM(pwm, alphabet = "DNA")
matrix. Numerical matrix representing the position weight matrix.
character. The alphabet making up the sequence. Currently, only 'DNA' and 'RNA' is supported.
An object of class pwm.
mFile <- system.file("extdata/pwm1", package = "seqLogo")
m <- read.table(mFile)
pwm <- makePWM(m)