ParBLiSS / FastANI

Fast Whole-Genome Similarity (ANI) Estimation
Apache License 2.0
374 stars 67 forks source link

Programs for computing a tree from .matrix file? #61

Closed raw937 closed 4 years ago

raw937 commented 4 years ago

Just curious if you now of a good program to do it?

many thanks Rick

cjain7 commented 4 years ago

Does this well documented utility from @rrwick help?

https://github.com/rrwick/Bacsort#step-4-build-tree

raw937 commented 4 years ago

Thanks. I couldn't get it to work directly from the .matrix file.

limin321 commented 4 years ago

Thanks. I couldn't get it to work directly from the .matrix file.

We need to use output.txt file to create the tree, not the .matrix file.

First, convert output.txt to output.phylip $ python3 pairwise_identities_to_distance_matrix.py --max_dist 0.2 output.txt > output.phylip

Second, build the tree. Rscript bionj_tree.R output.phylip ./output.newick

Then you can work this tree the same way as working on other trees.

cjain7 commented 4 years ago

Thanks @limin321 Just for completeness, can you also put the link to script pairwise_identities_to_distance_matrix.py , e.g., is it part of a tool you're using?

limin321 commented 4 years ago

Thanks @limin321 Just for completeness, can you also put the link to script pairwise_identities_to_distance_matrix.py , e.g., is it part of a tool you're using?

@cjain7 Yes, it is in the same link you share(https://github.com/rrwick/Bacsort), but in step3: distance matrix, option 2:FastANI. Here is the link for download the raw script. https://github.com/rrwick/Bacsort/blob/master/scripts/pairwise_identities_to_distance_matrix.py

Best, Limin

cjain7 commented 4 years ago

Perfect!