library(Biostrings)
library(JASPAR2016)
## Example matrix from JASPAR database
profileMatrix <- matrix(as.integer(
c(13, 13, 3, 1, 54, 1, 1, 1, 0, 3, 2, 5,
13, 39, 5, 53, 0, 1, 50, 1, 0, 37, 0, 17,
17, 2, 37, 0, 0, 52, 3, 0, 53, 8, 37, 12,
11, 0, 9, 0, 0, 0, 0, 52, 1, 6, 15, 20)),
nrow=4, byrow=TRUE, dimnames=list(DNA_BASES))
pfmQuery <- PFMatrix(profileMatrix=profileMatrix)
pfmSubjects <- getMatrixSet(JASPAR2016,
opts=list(ID=c("MA0500", "MA0499", "MA0521",
"MA0697", "MA0048", "MA0751",
"MA0832")))
PFMSimilarity(pfmSubjects, pfmQuery)
Run the code above in your browser using DataLab