@@ -931,7 +931,6 @@ void write_newhampshire_Tree( FILE *handle, struct Tree *thetree,
931
931
if (thetree -> child [0 ] != NULL ) {
932
932
if (thetree -> child [1 ] == NULL ) {
933
933
/* draw rooted tree */
934
-
935
934
if (thetree -> child [0 ]-> left != NULL && thetree -> child [0 ]-> right != NULL ) {
936
935
fprintf ( handle , "(\n" );
937
936
write_newhampshire_Tnode ( handle , thetree -> child [0 ]-> left , show_bootstraps );
@@ -944,26 +943,18 @@ void write_newhampshire_Tree( FILE *handle, struct Tree *thetree,
944
943
or a cluser of sequences. If this leaf contains a single sequence,
945
944
then we have a tree of one sequence, in which case we print an
946
945
error, because trees of one sequence do not make sense */
947
-
948
946
if (thetree -> child [0 ]-> clust -> clustersize == 1 )
949
947
fatal_util ( "Cannot build a tree with a single sequence %s" ,
950
948
thetree -> child [0 ]-> clust -> members [0 ]-> name );
951
949
else {
952
- unsigned int i ;
953
-
954
- for (i = 0 ; i < thetree -> child [0 ]-> clust -> clustersize - 1 ; i ++ )
955
- fprintf ( handle , "(\n%s:%.5f,\n" , thetree -> child [0 ]-> clust -> members [i ]-> name , 0.0 );
956
-
957
- fprintf ( handle , "%s:%.5f" , thetree -> child [0 ]-> clust -> members [i ]-> name , 0.0 );
958
-
959
- for (i = 0 ; i < thetree -> child [0 ]-> clust -> clustersize - 2 ; i ++ )
960
- fprintf ( handle , ")\n:%.5f)\n" , 0.0 );
961
-
950
+ fprintf ( handle , "(\n" );
951
+ write_newhampshire_Cluster ( handle , thetree -> child [0 ]-> clust , 0 , thetree -> child [0 ]-> clust -> clustersize - 1 );
962
952
fprintf ( handle , ");\n" );
963
953
}
964
954
}
965
955
}
966
956
else {
957
+
967
958
fprintf ( handle , "(\n" );
968
959
write_newhampshire_Tnode ( handle , thetree -> child [0 ], show_bootstraps );
969
960
fprintf ( handle , ",\n" );
0 commit comments