This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Negative branch length when using clustalw through Python and unable to see bootstrap values

enter image description here

The puma branch length is negative when I checked the file.

clustalw_cline = ClustalwCommandline(clustalw_exe,
                                     infile="related_data_set_renamed.fasta",
                                     outfile="related_data_set_aligned.fasta",
                                     output='fasta',
                                     bootlabels='NODE',
                                     bootstrap=1000)
assert os.path.isfile(clustalw_exe), "Clustal W executable missing"
stdout, stderr = clustalw_cline()

tree = Phylo.read("related_data_set_renamed.dnd", "newick")
tree.root_at_midpoint()
tree.ladderize(reverse=True)
Phylo.draw(tree)

I would like to fix the negative branch length through code but I am not sure what to do. In addition, I would like to add bootstrap values to the node points but I am unable to see them. I am thinking about using Bio.Phylo.TreeConstruction and use DistanceCalculator and DistanceTreeCalculator to instead make bootstrap values but would like to know if the ClustalWCommandline can can do it.

clustalw phylogeny bootstrap python tree

0 answers

No answers yet.

Log in to answer this question.