shawnlaffan / biodiverse

A tool for the spatial analysis of diversity
http://shawnlaffan.github.io/biodiverse/
GNU General Public License v3.0
75 stars 19 forks source link

Tree exported in newick format is missing trailing semicolon #800

Closed joelnitta closed 3 years ago

joelnitta commented 3 years ago

Using the example project data, when I export the tree in newick format, it lacks a semicolon at the end and can't be read in by some programs (in my case, the package ape in R).

((((((((((('Genus:sp19':0.6,'Genus:sp5':0.6)'0___':0.077662337662338,('Genus:sp15':0.578947368421053,'Genus:sp1':0.578947368421053)'1___':0.098714969241285)'2___':0.106700478344225,'Genus:sp10':0.784362816006563)'3___':0.05703610742759,('Genus:sp26':0.5,'Genus:sp20':0.5)'4___':0.341398923434153)'5___':0.03299436960061,((((('Genus:sp23':0.434782608695652,'Genus:sp30':0.434782608695652)'6___':0.051317777404734,'Genus:sp11':0.486100386100386)'7___':0.11249075347436,'Genus:sp29':0.598591139574746)'8___':0.0272381982058111,'Genus:sp12':0.625829337780557)'9___':0.172696292660468,('Genus:sp21':0.454545454545455,'Genus:sp18':0.454545454545455)'10___':0.34398017589557)'11___':0.075867662593738)'12___':0.057495084175743,(('Genus:sp28':0,'Genus:sp31':0)'13___':0.666666666666667,'Genus:sp27':0.666666666666667)'14___':0.265221710543839)'15___':0.026396763298318,(('Genus:sp9':0.789473684210526,'Genus:sp8':0.789473684210526)'16___':0.111319966583125,('Genus:sp14':0.6,'Genus:sp16':0.6)'17___':0.300793650793651)'18___':0.0574914897151729)'19___':0.020427284632173,'Genus:sp17':0.978712425140997)'20___':0.00121523842637206,('Genus:sp24':0.25,'Genus:sp25':0.25)'21___':0.729927663567369)'22___':0.00291112550535999,(((('Genus:sp2':0.461538461538462,'Genus:sp3':0.461538461538462)'23___':0.160310277957336,('Genus:sp6':0.166666666666667,'Genus:sp7':0.166666666666667)'24___':0.455182072829131)'25___':0.075519681556834,'Genus:sp4':0.697368421052632)'26___':0.258187134502923,'Genus:sp13':0.955555555555555)'27___':0.027283233517174)'28___':0.00993044169650192,'Genus:sp22':0.992769230769231)'29___':0

Biodiverse v 3.1 on a mac

shawnlaffan commented 3 years ago

Thanks for the report. Should be an easy fix to implement.