Skip to content

Typical workflow

Kenji Fukushima edited this page Aug 31, 2026 · 1 revision

Typical workflow

This PGK example uses an empty working directory and the default output layout. Install CSUBST first using the installation guide.

# 1) Prepare a toy dataset
csubst dataset --name PGK

# 2) Validate inputs and inferred IQ-TREE paths
csubst doctor \
  --alignment_file alignment.fa.gz \
  --rooted_tree_file tree.nwk \
  --foreground foreground.txt

# 3) Run convergence analysis
csubst search \
  --alignment_file alignment.fa.gz \
  --rooted_tree_file tree.nwk \
  --foreground foreground.txt

# 4) Scan foreground recurrent substitutions directly
csubst scan \
  --alignment_file alignment.fa.gz \
  --rooted_tree_file tree.nwk \
  --foreground foreground.txt \
  --scan_unit_mode clade \
  --scan_other_scope all \
  --scan_rate_event_mode posterior_sum \
  --scan_rate_exposure q_weighted \
  --scan_pvalue_calibration full_scan \
  --scan_n_permutations 1000 \
  --threads 8

# 5) Inspect site-wise convergence for a branch pair
csubst sites \
  --alignment_file alignment.fa.gz \
  --rooted_tree_file tree.nwk \
  --branch_id 23,51 \
  --outdir csubst_sites \
  --output_prefix csubst

All analysis subcommands accept --outdir, --output_prefix, and --log_file. The sites command creates one branch-selection directory under --outdir for each requested branch set.

The scan settings above request a calibrated foreground-vs-control analysis; see csubst scan for its statistical assumptions and historical examples. For model-assisted scoring, see VESM-35M variant-effect scoring.

Clone this wiki locally