Usage

PhyKIT provides 100+ functions for processing and analyzing multiple sequence alignments and phylogenies. Functions span alignment quality assessment, tree manipulation, phylogenetic comparative methods, trait evolution modeling, introgression detection, and more.

Some help messages indicate that summary statistics are reported (e.g., bipartition_support_stats). Summary statistics include mean, median, 25th percentile, 75th percentile, minimum, maximum, standard deviation, and variance. These functions typically have a verbose option that allows users to get the underlying data used to calculate summary statistics.


Quick start

Here is a typical workflow showing a few common PhyKIT operations:

# Check alignment quality
phykit pis alignment.fa                  # count parsimony informative sites
phykit aot alignment.fa --json           # flag outlier taxa

# Summarize tree properties
phykit treeness species.tre              # treeness (internal/total branch length)
phykit dvmc species.tre                  # degree of violation of a molecular clock

# Phylogenetic comparative methods
phykit pgls -t species.tre -d traits.tsv \
    --response brain_size --predictor body_mass   # PGLS regression
phykit panova -t species.tre \
    --traits traits.tsv --pairwise                # phylogenetic ANOVA

# Visualize gene tree concordance
phykit qpie -t species.tre -g gene_trees.nwk \
    -o concordance.png --branch-labels            # quartet pie chart

General usage

Calling functions

phykit <command> [optional command arguments]

Command specific help messages can be viewed by adding a -h/--help argument after the command. For example, to see the help message for the command 'treeness', execute:

phykit treeness -h
# or
phykit treeness --help

Function aliases

Each function comes with aliases to save the user some key strokes. For example, to get the help message for the 'treeness' function, you can type:

phykit tness -h

Command line interfaces

As of version 1.2.0, all functions (including aliases) can be executed using a command line interface that starts with pk_. For example, instead of typing the previous command to get the help message of the treeness function, you can type:

pk_treeness -h
# or
pk_tness -h

All possible function names are specified at the top of each function section.


Command reference

The complete reference is organized by task on the command reference page.

Legacy command anchors

These links preserve the command fragments used by earlier versions of the documentation.