[Biopython] Nexus.Tree fails to import nexus tree file

Peter biopython at maubp.freeserve.co.uk
Tue Sep 29 18:44:07 UTC 2009


On Sat, Sep 26, 2009 at 11:23 AM, Peter <biopython at maubp.freeserve.co.uk> wrote:
> On Sat, Sep 26, 2009 at 4:17 AM, Thomas Keller
> <thomas.e.keller at gmail.com> wrote:
>> I apologize if this has been addressed, I looked online and it does
>> not seem to be a general issue. I have several programs that generate
>> nexus files consisting entirely of trees; there is no sequence
>> information.  Can the Nexus parser not read this type of nexus file?
>> When I try to open the a file with:
>>
>> from Bio.Nexus import Trees
>> tree_string=open('Analysis_tree_1a.tre').read()
>> tree=Trees.Tree(tree_string)
>
> Use the above code if tree_string is JUST a Newick tree.
> In your case, from the example you have a full NEXUS
> file, so use the Bio.Nexus.Nexus parser.

Did you get Bio.Nexus to parse the tree for you?

Also, would you mind telling us where you got the tree from
(what software package) and if we could use it for a test
case within Biopthon?

Thanks,

Peter




More information about the Biopython mailing list