Tutorial 3: Evaluating gene-gene covariation

Objectives

Fit branch lengths on matching gene-tree topologies, root the trees consistently, and compare evolutionary rates for two genes.

Prerequisites and working directory

Install PhyKIT. Install IQ-TREE 2 for the branch-length estimation step. Download the sample archive into an empty working directory. Unpack it and run the remaining commands inside the extracted directory.

tar -xzf gene_gene_covariation_tutorial.tar.gz
cd gene_gene_covariation_tutorial

Workflow

CovER divides each gene-tree branch length by the corresponding species-tree branch length, then correlates the two vectors of relative rates. The two gene trees and the reference must share a rooted topology after pruning to their common taxa. This worked example compares NUF2 and NDC80 from the bundled dataset, originally analyzed by Shen et al. (2020). The archive includes the reference tree and guide topologies pruned to match each alignment.

Step 1: Estimate gene tree branch lengths

Fit branch lengths on each supplied guide topology with IQ-TREE 2. The -te flag fixes the topology. The example uses the substitution models from the original analysis and fixes the seed for reproducibility.

iqtree2 -s Shen_etal_SciAdv_2020_NDC80.fa \
    -te Shen_etal_SciAdv_2020_NDC80.constrained.tre \
    -pre Shen_etal_SciAdv_2020_NDC80 -m JTT+G4+F -keep-ident -nt 1 -seed 42
iqtree2 -s Shen_etal_SciAdv_2020_NUF2.fa \
    -te Shen_etal_SciAdv_2020_NUF2.constrained.tre \
    -pre Shen_etal_SciAdv_2020_NUF2 -m LG+G4 -keep-ident -nt 1 -seed 42

Step 2: Root constrained trees

Root each fitted tree using the supplied outgroup list, with one taxon name per line. The outgroups correspond to the same root in the reference while accounting for the taxa present in each gene.

phykit root Shen_etal_SciAdv_2020_NUF2.treefile \
    -r Shen_etal_SciAdv_2020_NUF2_taxa_for_rooting.txt \
    -o Shen_etal_SciAdv_2020_NUF2.treefile.rooted
phykit root Shen_etal_SciAdv_2020_NDC80.treefile \
    -r Shen_etal_SciAdv_2020_NDC80_taxa_for_rooting.txt \
    -o Shen_etal_SciAdv_2020_NDC80.treefile.rooted

Step 3: Evaluate gene-gene covariation

Use 0.5 as an illustrative effect-size cutoff for the correlation coefficient. Evaluate statistical evidence separately, and account for multiple comparisons when screening many gene pairs.

phykit cover Shen_etal_SciAdv_2020_NUF2.treefile.rooted \
    Shen_etal_SciAdv_2020_NDC80.treefile.rooted \
    -r Shen_etal_SciAdv_2020_species_tree.tre
0.6693   0.0

The first column is the correlation coefficient and the second is the p-value at the command's display precision. Here the coefficient exceeds the illustrative 0.5 cutoff. The correlation is compatible with the two proteins' membership in the NDC80 complex. A correlation alone leaves other explanations open.

When topologies differ

The archive also includes SEC7. The supplied SEC7 outgroup and guide combination gives a rooted-topology mismatch for the strict CovER comparison with NUF2. If you see that error in your own data, compare the shared taxa and roots before refitting branch lengths.

For gene trees inferred without a constraint, the experimental projected-rate analysis projects gene-tree distances onto the reference edge basis. Evaluate both projection errors alongside the correlation. The experimental episodic scan can then examine localized rate covariation. Use the adjusted p-values and document the seed and permutation count for that scan.

Expected artifacts

IQ-TREE produces two .treefile files. PhyKIT writes two rooted trees. The CovER command prints a correlation coefficient and a p-value.

Troubleshooting

  • Run phykit <command> --help to compare an invocation with the live interface.

  • Confirm that downloaded files are in the current working directory and retain the filenames shown in the tutorial.

  • For parsing errors, compare taxon names exactly across alignments, trees, and trait tables, including capitalization and underscores.

  • See Troubleshooting for installation, format, and error-reporting guidance.