Position Weight Matrix in R or Python
2
2
Entering edit mode
10.4 years ago
esantosh10 ▴ 30

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?

PWM Peptide Matrix • 15k views
ADD COMMENT
5
Entering edit mode
9.1 years ago
kamil_cygan ▴ 50

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)
ADD COMMENT
2
Entering edit mode
10.4 years ago
madk00k ▴ 360

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.

ADD COMMENT

Login before adding your answer.

Traffic: 2303 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6