Hybridization analysis

Estimate reticulation events and localize hybridization on a species tree

Command identity

Canonical command:

hybridization

Handler:

hybridization

Aliases:

hybrid, reticulation

Standalone executables:

pk_hybridization, pk_hybrid, pk_reticulation

Categories:

Introgression & gene flow

Runtime interface

Synopsis

phykit hybridization --tree <tree> --gene-trees <gene_trees> [--support <support>] [--alpha <alpha>] [--plot <plot_output>] [--fig-width <fig_width>] [--fig-height <fig_height>] [--dpi <dpi>] [--no-title] [--title <title>] [--legend-position <legend_position>] [--ylabel-fontsize <ylabel_fontsize>] [--xlabel-fontsize <xlabel_fontsize>] [--title-fontsize <title_fontsize>] [--axis-fontsize <axis_fontsize>] [--colors <colors>] [--ladderize] [--cladogram] [--circular] [--color-file <color_file>] [--json]

Arguments

This table is generated from the live command parser. It is the authoritative source for accepted spellings, required arguments, types, defaults, and choices.

Argument

Required

Type

Default

Choices

-t, --tree

true

str

required

any

-g, --gene-trees

true

str

required

any

--support

false

float

none

any

--alpha

false

float

0.05

any

--plot

false

str

none

any

--fig-width

false

float

none

any

--fig-height

false

float

none

any

--dpi

false

int

300

any

--no-title

false

boolean

false

any

--title

false

str

none

any

--legend-position

false

str

none

any

--ylabel-fontsize

false

float

none

any

--xlabel-fontsize

false

float

none

any

--title-fontsize

false

float

none

any

--axis-fontsize

false

float

none

any

--colors

false

str

none

any

--ladderize

false

boolean

false

any

--cladogram

false

boolean

false

any

--circular

false

boolean

false

any

--color-file

false

str

none

any

--json

false

boolean

false

any

Output and errors

--json provides the command's structured JSON representation. Unless the guidance below states otherwise, results are emitted as command output. Invalid command syntax exits with status 2. Input validation and scientific limitations are described in the guidance below.

Guidance, interpretation, and examples

Estimate the minimum number of reticulation events and localize where hybridization likely occurred on a species tree. For each internal branch, tests whether the two discordant NNI topologies are significantly asymmetric (binomial test with FDR correction). Asymmetric discordance suggests introgression/gene flow rather than ILS.

Each branch receives:

  • p-value: binomial test of gDF1 vs gDF2 equality (H0: ILS alone)

  • FDR-corrected p-value: Benjamini-Hochberg correction across all branches

  • Hybridization score: asymmetry ratio (0.5 = no signal, 1.0 = strong signal) for significant branches; 0 for non-significant

  • Favored alternative: which NNI topology is in excess, identifying which pair of lineages likely exchanged genes (but not the direction of gene flow)

The estimated reticulation count is the number of branches with significant asymmetric discordance. Gene tree uncertainty can be accounted for with --support to collapse low-support branches before topology determination.

phykit hybridization -t <species_tree> -g <gene_trees>
    [--support <float>] [--alpha 0.05] [--plot <output>] [--json]
    [--fig-width <float>] [--fig-height <float>] [--dpi <int>]
    [--ladderize] [--cladogram] [--circular] [--ylabel-fontsize <float>]

Options:
-t/--tree: species tree file (required)
-g/--gene-trees: gene trees file, one Newick per line (required)
--support: collapse gene tree branches below this support value before analysis
--alpha: FDR significance threshold (default: 0.05)
--plot: output hybridization score phylogram (branches colored by score, stars at significant nodes)
--json: optional argument to print results as JSON