Phylogenetic imputation

Impute missing trait values using phylogenetic relationships

Command identity

Canonical command:

phylo_impute

Handler:

phylo_impute

Aliases:

impute, phylo_imp

Standalone executables:

pk_phylo_impute, pk_impute, pk_phylo_imp

Categories:

Trait evolution

Runtime interface

Synopsis

phykit phylo_impute --tree <tree> --trait-data <trait_data> --output <output> [--gene-trees <gene_trees>] [--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

-d, --trait-data

true

str

required

any

-o, --output

true

str

required

any

-g, --gene-trees

false

str

none

any

--json

false

boolean

false

any

Output and errors

--json provides the command's structured JSON representation. Output-file options: --output. Invalid command syntax exits with status 2. Input validation and scientific limitations are described in the guidance below.

Guidance, interpretation, and examples

Impute missing continuous trait values using phylogenetic relationships and between-trait correlations under Brownian motion. Missing values (NA, ?, or empty) in a multi-trait TSV are predicted from:

  1. Phylogenetic neighbors: closely related species with observed values contribute more to the imputation via the phylogenetic VCV

  2. Trait correlations: if a taxon has observed values for other traits, between-trait covariance improves the prediction

Reports imputed values with standard errors and 95% confidence intervals. The output TSV is a drop-in replacement for the input with all missing values filled in.

phykit phylo_impute -t <tree> -d <trait_data> -o <output> [--json]
phykit phylo_impute -t <tree> -d <trait_data> -o <output> -g <gene_trees>

Options:
-t/--tree: tree file in Newick format (required)
-d/--trait-data: multi-trait TSV with header; missing values as NA, ?, or empty (required)
-o/--output: output TSV file with imputed values (required)
-g/--gene-trees: gene trees for discordance-aware VCV
--json: optional argument to print results as JSON

R validation: Validated against Rphylopars in R (see tests/r_validation/validate_phylo_impute.R).