Position Weight Matrix in R or Python
Hello All,
I would like to create a position weight matrix in R or Python for some peptide sequences . I found that there are packages in R to create a position weight matrix for gene sequences(ATGC) like Biostrings but was difficult to find them for proteins/peptides. Any suggestions?
• 16,559 views
•
link
2 answers
Actually, you can create PSSM for amino acids in a similar manner as for DNA/RNA sequences.
library(Biostrings)
sequences <- c("ERLRELETKIGSLQEDLC","CERLRELETKIGSLQEDL","ERLRECLETKIGSLQEDL")
string_set <- AAStringSet(sequences)
PSSM <- consensusMatrix(string_set, as.prob = TRUE)
• 0 views
•
link
Biopython allows to create Position Weight Matrices using motifs module:
http://biopython.org/DIST/docs/tutorial/Tutorial.html#sec244
As far as I know, there are know constrains for the alphabet, so it could polypeptide.
• 0 views
•
link
Log in to answer this question.