[Pipet Devel] Tree Data Structure

Thomas.Sicheritz at molbio.uu.se Thomas.Sicheritz at molbio.uu.se
Tue Mar 23 10:10:25 EST 1999


Hej,

What is the best way to implement a tree data structure in pyhton ?
The example tree (in newick format) looks like:
(chlamydia:100.000000,((PARDE:100.000000,RECAM:100.000000,RICKY:100.000000,(PORPU:100.000000,CHOCR:100.000000):100.000000):100.000000,(ECOLI:100.000000,COXBU:100.000000):100.000000):100.000000,MYCTUB:100.000000);

drawn as an unrooted tree:
/--------------------------------------------------- chlamydia(1)
|						   
|                           /----------------------- PARDE(2)
|                           |			   
|                           +----------------------- RECAM(3)
|                           |			   
|           /------100------+----------------------- RICKY(6)
|           |               |			   
|           |               |                /------ PORPU(7)
|           |               \------100-------+	   
+--100------+                                \------ CHOCR(9)
|           |					   
|           |                                /------ ECOLI(4)
|           \--------------100---------------+	   
|                                            \------ COXBU(5)
|						   
\--------------------------------------------------- MYCTUB(8)

Should we choose nested lists, NL parser or available tree modules ?
I am not fluent in python yet - so I could need help with the basic
structure and parsing classes.

Suggestions ?

thx
-thomas
-- 
Sicheritz Ponten Thomas E.  Department of Molecular Biology
blippblopp at linux.nu         BMC, Uppsala University
BMC:  +46 18 4714214        BOX 590 S-751 24 UPPSALA Sweden
Fax   +46 18  557723        http://evolution.bmc.uu.se/~thomas
Molecular Tcl:   http://evolution.bmc.uu.se/~thomas/tcl
Molecular Linux: http://evolution.bmc.uu.se/~thomas/mol_linux

	De Chelonian Mobile ... The Turtle Moves ...



More information about the Pipet-Devel mailing list