IW branch support manual
The goal of this work was to develop a tool that uses the implied weighting (IW) tool from TNT (by Goloboff) to build a consensus tree with branch support values.
Scripts are run by python and command-line TNT, values of k for IW in TNT are determined with logarithmic scale based on the minimum and maximum k values that are required to run the script. Output consists of a tree with branch support values calculated as (number of k values supporting this branch)/(total number of k values used).
This project works on Windows only (due to TNT command-live version limitations). It can be run by Python3.6 or higher and requires BioPython 1.73.
Actual version of command-line TNT can be found on TNT website.
Both script files need to be stored in the same folder. If TNT command line executable is not in the same folder. please use --tnt option (see option list below).
Simple usage:
python IW.py kmin kmax -i 'Input file' -o 'Output file'Input file will be interpreted as TNT matrix file, number of k values will be determined based of (kmax - kmin) but not less than 10.
Additional arguments are:
--N- set number of k values for calculation.-f,--fasta- handle input as a fasta file. (Default: False)-t,--tnt- set path to command-line TNT executable.--format- change output format. Possible formats are: newick, nexus, phyloxml, nexml, cdao. (Default: newick)-c,--clean- delete all files generated by TNT. (Default: False)-d,--draw- create a png file with generated consensus tree. (Default: False)
python IW.py 3 50 -i test_matix.txt -o test_output.txt -d --N 30This command calculates consensus tree for matrix from test_matrix.tnt based on 30 k values between 3 and 50 and create a png file with resulted tree.
python IW.py 10 40 -i input.fasta -o results.nex --fasta --format NexusThis command calculates consensus tree for data, stored in fasta file input.fasta. Number of k values will be determined by script. Consensus tree will be saved in Nexus format.