anvi-matrix-to-newick
Takes a distance matrix, returns a newick tree.
🔙 To the main page of anvi’o programs and artifacts.
Authors
Requires
view-data 
Provides
dendrogram 
Usage
You can send any matrix file to this program to get a dendrogram from it.
An example run would look like this:
anvi-matrix-to-newick TAB_DELIMITED_DATA.txt \
dendrogram
By default, anvi-matrix-to-newick will cluster rows. With the flag --transpose, it will cluster columns.
See here a list of distance metrics you can use, and here a list of linkage methods you can use.
anvi-matrix-to-newick can handle missing data, but in that case the program will not normalize your data and will assume that it is already normalized.
Edit this file to update this information.
Command line interface
The following is the list of parameters and their descriptions in the latest version of anvi-matrix-to-newick.
The code that generates this web page ensures that this information is the latest available in 9-dev (eunice). Which means, in some cases the information in this section (generated automatically) might be more comprehensive or up-to-date compared to the descriptions above (written by humans).
Command line usage
anvi-matrix-to-newick [-h] [-o FILE_PATH] [--items-order-file FILE PATH] [--distance-matrix FILE PATH] [--transpose] [--distance DISTANCE_METRIC] [--linkage LINKAGE_METHOD] [--pad-input-with-zeros] PATH
Parameters and their descriptions
-o, --output-file FILE_PATH
- File path to store results.
--items-order-file FILE PATH
- In addition to a newick formatted output file, you can ask anvi'o to report the order of items in the resulting tree in a separate file. The content of this file will be a single-column item names the way they are ordered in the output newick dendrogram.
--distance-matrix FILE PATH
- In addition to a newick formatted output file, you can ask anvi'o to also report a distance matrix computed from the same data that leads to the generation.
--transpose
- Transpose the input matrix file before clustering.
--distance DISTANCE_METRIC
- The distance metric for the hierarchical clustering. The default distance metric is 'euclidean'. You can find the full list of distance metrics either by making a mistake (such as entering a non-existent distance metric and making anvi'o upset), or by taking a look at the help menu of the hierarchy.distance.pdist function in the scipy.cluster module. Default:
euclidean
--linkage LINKAGE_METHOD
- The linkage method for the hierarchical clustering. The default linkage method is 'ward', because that is the best one. It really is. We talked to a lot of people and they were all like 'this is the best one available' and it is just all out there. Honestly it is so good that we will build a wall around it and make other linkage methods pay for it. But if you want to see a full list of available ones you can check the hierarchy.linkage function in the scipy.cluster module. Up to you really. But then you can't use ward anymore, and you would have to leave anvi'o right now. Default:
ward
--pad-input-with-zeros
- Do you want your vectors in the input file to be 'padded' by some zero values so even hideous matrix files that contain entires with all empty values can be processed with this program? Well, this flag will try to make things work for you. But you must know that this is one of those cases where 'if you have to use this then you have not one but two problems.
Additional Resources
Are you aware of resources that may help users better understand the utility of this program? Please feel free to edit this file on GitHub. If you are not sure how to do that, find the __resources__ tag in this file to see an example.