I need #GC pp_cons which is per column pp for all sequences and not #GR pp which is per residue pp for each sequence
python posterior probability in stockholm file
I want to parse a multiple sequence alignment stockholm file by columns.
Is there any library or package in python to parse a multiple sequence alignment stockholm file and especially get the columns posterior probabilities??
P.s I went through AlignIo object from biopython, I couldn't find a way to get the posterior probability
• 3,712 views
•
link
1 answer
These are present in the Stockholm file as per-colum annotation on each sequence, thus:
from Bio import AlignIO
align = AlignIO.read("alignment.sto", "stockholm")
for record in align:
print(record.id)
print(record.seq)
print(record.letter_annotations["posterior_probability"])
Update: See https://github.com/biopython/biopython/issues/357 on not recording the per-column information in Stockholm files.
• 0 views
•
link
• 0 views
•
link
This will be supported in Biopython 1.66
• 0 views
•
link
Log in to answer this question.
Can you post an example alignment file (here or using something like gist.github.com) which contains the per-column posterior probability numbers you want?
@Peter http://www.2shared.com/file/JF5ARLjA/alignment.html