New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[patch] Adding *GF* information from a Stockholm alignment #768
Comments
Good point. See also #357 for recording the per-column annotations. I don't like the discarding of the line split information, although with some entries like There's a note in the code wondering if we should check To match the |
To be honest, I went through the code quickly to understand why that information was not there. There are a few more points to check, for sure. I haven't used the an alignment in the Stockholm format in a long time, tough.
I could try and make more changes, was there a unitest for this parser? |
|
Pull request #769 |
The new alignment parser in >>> from Bio import Align
>>> alignment = Align.read("example.sth", "stockholm")
>>> alignment.annotations['identifier']
'HAT'
>>> alignment.annotations['accession']
'PF02184.18'
>>> alignment.annotations['definition']
'HAT (Half-A-TPR) repeat' |
Hi,
I needed to parse the Pfam seed alignment. Because I needed to filter by ID/ACC, which is part of the GF set of features, I noticed that the per-file annotations are not saved. Since the new MultipleSeqAlignment class supports per alignment annotation, via its constructor and the lines are kept in a gf dictionary in the parser, I just needed to change the line that creates the alignment instance.
Since the other information is stored in different attributes, I put the gf dictionary as the sole per-alignment annotations. Since a feature can span multiple lines, I also joined the those by a space.
The change is really just one line, that follows.
The text was updated successfully, but these errors were encountered: