Question: python posterior probability in stockholm file
0
gravatar for MAK
5.2 years ago by
MAK10
Paris
MAK10 wrote:

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

ADD COMMENTlink modified 5 months ago by Biostar ♦♦ 20 • written 5.2 years ago by MAK10

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?

ADD REPLYlink written 5.2 years ago by Peter5.8k

@Peter  http://www.2shared.com/file/JF5ARLjA/alignment.html

ADD REPLYlink modified 5.2 years ago • written 5.2 years ago by MAK10
2
gravatar for Peter
5.2 years ago by
Peter5.8k
Scotland, UK
Peter5.8k wrote:

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.

ADD COMMENTlink modified 5.1 years ago • written 5.2 years ago by Peter5.8k

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

ADD REPLYlink written 5.1 years ago by MAK10

This will be supported in Biopython 1.66

ADD REPLYlink written 5.1 years ago by Peter5.8k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1137 users visited in the last hour