[Biopython-dev] [Biopython - Bug #3333] (Closed) PhyloXML writer fails to include is_aligned attribute with mol_seq elements
redmine at redmine.open-bio.org
redmine at redmine.open-bio.org
Wed Apr 18 01:52:03 UTC 2012
Issue #3333 has been updated by Eric Talevich.
Status changed from New to Closed
% Done changed from 0 to 100
----------------------------------------
Bug #3333: PhyloXML writer fails to include is_aligned attribute with mol_seq elements
https://redmine.open-bio.org/issues/3333
Author: Eric Talevich
Status: Closed
Priority: Normal
Assignee: Biopython Dev Mailing List
Category: Main Distribution
Target version:
URL:
First reported here:
http://lists.open-bio.org/pipermail/biopython/2012-March/007847.html
Steps to reproduce:
1. Load a tree, convert to PhyloXML
<pre>
from Bio import Phylo
from StringIO import StringIO
tree = Phylo.read(StringIO('(a,(b,c));'), 'newick').as_phyloxml()
</pre>
2. Add a sequence
<pre>
from Bio.Phylo import PhyloXML as PX
tree.clade[0].sequences = [PX.Sequence(type='dna', mol_seq=PX.MolSeq('AAA', is_aligned=False))]
</pre>
3. Verify that the sequence information has been set -- mol_seq has is_aligned set
<pre>
print tree
</pre>
<pre>
Clade(branch_length=1.0, name='a')
Sequence(type='dna')
MolSeq(value='AAA', is_aligned=False)
</pre>
4. View the PhyloXML representation -- mol_seq is missing the is_aligned attribute!
<pre>
print tree.format('phyloxml')
</pre>
<pre>
...
<phy:clade>
<phy:name>c</phy:name>
<phy:branch_length>1.0</phy:branch_length>
<phy:sequence type="dna">
<phy:mol_seq>AAA</phy:mol_seq>
</phy:sequence>
</phy:clade>
...
</pre>
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here and login: http://redmine.open-bio.org
More information about the Biopython-dev
mailing list