ContentMine / phylotree

A repository for ami-phylotree development
0 stars 0 forks source link

"Valid" Newick problems #52

Closed petermr closed 8 years ago

petermr commented 8 years ago

In trying to test the Newick output I have used http://etetoolkit.org/treeview/ and http://www.trex.uqam.ca/ . Some strings display in some and not the other. Treeview sometimes generates distance-dependent displays and sometimes not. Here's an input, please comment on likely problems:

(((((EU379932,EU840722)NT1_25:135.0,EU840723)NT1_17:301.0,(NC_O00853,NC_000918)NT1_15:364.0)NT1_5:106.0,(NC_0O9525,NC_0O4307)NT1_19:333.0)NT1_2:158.0,((NC_010571,(((Desulfo,((((Es,U32697)NT1_28:164.0,NC_OO2516)NT1_22:165.0,(NC_0O2929,NC_002946)NT1_26:185.0)NT1_21:55.0,(NC_0O9667,NC_0O2696)NT1_23:194.0)NT1_14:105.0)NT1_10:56.0,(NC_O01218,UNKNOWN)NT1_16:302.0)NT1_8:107.0,((AEO15924,NC_OO3228)NT1_27:191.0,NC_OO2932)NT1_12:343.0)NT1_6:55.0,NC_005027)NT1_3:497.0,((NC_0O6576,(AJ307978,AJ307974)NT1_24:167.0)NT1_7:205.0,(NC_00O912,((M94261,NC_010376)NT1_13:320.0,((Lactoba,NC_OO9785)NT1_20:181.0,NC_00964)NT1_18:152.0)NT1_11:91.0)NT1_9:22.0)NT1_4:32.0)NT1_1:11.0)NT1_60:9.0;
petermr commented 8 years ago

Distances: In Treeview decimalpoints destroy distance display:

(((((EU379932,EU840722)NT1_25:135.0,EU840723)NT1_17:301.0,(NC_O00853,NC_000918)NT1_15:364.0)NT1_5:106.0,(NC_0O9525,NC_0O4307)NT1_19:333.0)NT1_2:158.0,((NC_010571,(((Desulfo,((((Es,U32697)NT1_28:164.0,NC_OO2516)NT1_22:165.0,(NC_0O2929,NC_002946)NT1_26:185.0)NT1_21:55.0,(NC_0O9667,NC_0O2696)NT1_23:194.0)NT1_14:105.0)NT1_10:56.0,(NC_O01218,UNKNOWN)NT1_16:302.0)NT1_8:107.0,((AEO15924,NC_OO3228)NT1_27:191.0,NC_OO2932)NT1_12:343.0)NT1_6:55.0,NC_005027)NT1_3:497.0,((NC_0O6576,(AJ307978,AJ307974)NT1_24:167.0)NT1_7:205.0,(NC_00O912,((M94261,NC_010376)NT1_13:320.0,((Lactoba,NC_OO9785)NT1_20:181.0,NC_00964)NT1_18:152.0)NT1_11:91.0)NT1_9:22.0)NT1_4:32.0)NT1_1:11.0)NT1_60:9.0;

No distances used, but in

(((((EU379932,EU840722)NT1_25:135,EU840723)NT1_17:301,(NC_O00853,NC_000918)NT1_15:364)NT1_5:106,(NC_0O9525,NC_0O4307)NT1_19:333)NT1_2:158,((NC_010571,(((Desulfo,((((Es,U32697)NT1_28:164,NC_OO2516)NT1_22:165,(NC_0O2929,NC_002946)NT1_26:185)NT1_21:55,(NC_0O9667,NC_0O2696)NT1_23:194)NT1_14:105)NT1_10:56,(NC_O01218,UNKNOWN)NT1_16:302)NT1_8:107,((AEO15924,NC_OO3228)NT1_27:191,NC_OO2932)NT1_12:343)NT1_6:55,NC_005027)NT1_3:497,((NC_0O6576,(AJ307978,AJ307974)NT1_24:167)NT1_7:205,(NC_00O912,((M94261,NC_010376)NT1_13:320,((Lactoba,NC_OO9785)NT1_20:181,NC_00964)NT1_18:152)NT1_11:91)NT1_9:22)NT1_4:32)NT1_1:11)NT1_60:9;

Treeview uses the distances.

petermr commented 8 years ago

But why doesn't this display distances?:

(((((EU379932,EU840722)NT1_25:135,EU840723)NT1_17:301,(NC_O00853,NC_000918)NT1_15:364)NT1_5:106,(NC_0O9525,NC_0O4307)NT1_19:333)NT1_2:158,((NC_010571,(((Desulfo,((((Es,U32697)NT1_28:164,NC_OO2516)NT1_22:165,(NC_0O2929,NC_002946)NT1_26:185)NT1_21:55,(NC_0O9667,NC_0O2696)NT1_23:194)NT1_14:105)NT1_10:56,(NC_O01218,UNKNOWN)NT1_16:302)NT1_8:107,((AEO15924,NC_OO3228)NT1_27:191,NC_OO2932)NT1_12:343)NT1_6:55,NC_005027)NT1_3:497,((NC_0O6576,(AJ307978,AJ307974)NT1_24:167)NT1_7:205,(NC_00O912,((M94261,NC_010376)NT1_13:320,((Lactoba,NC_OO9785)NT1_20:181,NC_00964)NT1_18:152)NT1_11:91)NT1_9:22)NT1_4:32)NT1_1:11)NT1_60:9;
petermr commented 8 years ago

But this, where the branch nodes are anonymous, displays distances:

(((((EU379932,EU840722):135,EU840723):301,(NC_O00853,NC_000918):364):106,(NC_0O9525,NC_0O4307):333):158,((NC_010571,(((Desulfo,((((Es,U32697):164,NC_OO2516):165,(NC_0O2929,NC_002946):185):55,(NC_0O9667,NC_0O2696):194):105):56,(NC_O01218,UNKNOWN):302):107,((AEO15924,NC_OO3228):191,NC_OO2932):343):55,NC_005027):497,((NC_0O6576,(AJ307978,AJ307974):167):205,(NC_00O912,((M94261,NC_010376):320,((Lactoba,NC_OO9785):181,NC_00964):152):91):22):32):11):9;
rossmounce commented 8 years ago

All of the above Newick strings worked in this tree viewer for me: http://www.unc.edu/~bdmorris/treelib-js/demo.html

FWIW, having named internal nodes is rarerly done, so I'm not surprised it trips up some viewing software. The 'anonymous' branch nodes as you call it are fine - that is the most typical style.

petermr commented 8 years ago

I may have got the distances in the wrong place. Yes, I think I did.

(((((EU379932:195,EU840722:135):86,EU840723:301):131,(NC_O00853:251,NC_000918:364):106):12,(NC_0O9525:223,NC_0O4307:333):158):10,((NC_010571:441,(((Desulfo:295,((((Es:140,U32697:164):63,NC_OO2516:165):24,(NC_0O2929:183,NC_002946:185):55):78,(NC_0O9667:186,NC_0O2696:194):105):56):21,(NC_O01218:279,UNKNOWN:302):107):8,((AEO15924:189,NC_OO3228:191):187,NC_OO2932:343):55):11,NC_005027:497):6,((NC_0O6576:348,(AJ307978:124,AJ307974:167):205):12,(NC_00O912:484,((M94261:260,NC_010376:320):33,
((Lactoba:157,NC_OO9785:181):21,NC_00964:152):91):22):32):11):9);

is correct.

petermr commented 8 years ago

I made an error on the branch lengths so I think this is now roughly correct. Will see if I have managed to delete bad nodes.

On Sun, Aug 23, 2015 at 4:20 PM, Ross Mounce notifications@github.com wrote:

All of the above Newick strings worked in this tree viewer for me: http://www.unc.edu/~bdmorris/treelib-js/demo.html

FWIW, having named internal nodes is rarerly done, so I'm not surprised it trips up some viewing software. The 'anonymous' branch nodes as you call it are fine - that is the most typical style.

— Reply to this email directly or view it on GitHub https://github.com/ContentMine/phylotree/issues/52#issuecomment-133862149 .

Peter Murray-Rust Reader in Molecular Informatics Unilever Centre, Dep. Of Chemistry University of Cambridge CB2 1EW, UK +44-1223-763069

petermr commented 8 years ago

Can also delete nodes correctly I think