TaxAM Grouper is a module of tools of the project TaxAM created to group samples by the matrices generated by TaxAM. In this module, we have the following tools:
-
Used to group samples by the matrices generated by TaxAM.
-
Used to visualize the groups generated by TaxAM Grouper.
It uses some algortihms to group samples. The first one is the K-means algorithm. The second one is the Hierarchical Clustering algorithm.
- Install all the dependencies in the requirements.txt file.
pip install -r requirements.txt
- Run grouper script.
python grouper <algorithm_name> <flag_1> <value_1> <flag_2> <value_2> ...
-
Global flags:
-fp
or--file_path
: Matrix to group.-on
or--output_name
: Name for the taxam grouper file. Default "TaxAM_grouper".-h
or--help
: Show help message and exit.
-
K-means flags:
-n
or--number_of_clusters
: Set the number of clusters that Kmeans will use to group samples. Default 2.-ni
orn_init
: Number of times that k-means algorithm will be run with different centroid seeds. The final results will be the best output of n_init consecutive runs in terms of inertia. Default 10-mi
ormax_iter
: Maximum number of iterations of the k-means algorithm for a single run. Default 300.
python grouper kmeans -fp "matrix.txt" -on "TaxAM_grouper" -n 3
It is a GUI that allows you to visualize the groups generated by TaxAM Grouper.
-
Open the index.html file in the folder of the TaxAM Grouper GUI.
-
Select the matrix that you want to visualize.
-
Click on the button "Visualizar".
-
Then you can see the groups.