You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

IQ-TREE基因一致性因子分析:如何确定gDF1与gDF2支持的近邻交换拓扑结构

Understanding gDF1/gDF2 Corresponding Topologies in IQ-TREE

Great question—this is a common point of confusion when working with gene concordance factors in IQ-TREE. Let’s break this down step by step, so you can pinpoint exactly which NNI topologies gDF1 and gDF2 correspond to, and how to reconstruct those alternative trees.

First: What gDF1 and gDF2 Actually Represent

For every internal branch in your reference rooted tree, IQ-TREE calculates three key values related to topological support:

  • gCF: The proportion of gene trees that support the reference tree’s branch (splitting the tree into two monophyletic groups, let’s call them Clade A and Clade B).
  • gDF1: The proportion of gene trees that support the most common nearest-neighbor interchange (NNI) alternative topology for that branch. This is the first alternative you’d get by swapping one nearest-neighbor clade from A with one from B.
  • gDF2: The proportion of gene trees that support the second most common NNI alternative topology for the same branch (the other possible NNI swap for that split).
  • gDFp: The proportion of gene trees that support all other non-NNI alternative topologies.

How to Find the Exact gDF1/gDF2 Topologies

IQ-TREE actually outputs these alternative trees directly when you run the gCF calculation—you just need to know which files to look for:

  • Locate the .gCF.alt.trees file: This is a NEXUS-formatted file generated alongside your stats output. It contains two alternative trees for every branch in your reference tree, named with a suffix matching the branch ID from your stats file (e.g., Branch_42_DF1 and Branch_42_DF2).
  • Match branch IDs to your stats file: Open your gCF stats file (usually named [prefix].gCF.stats). Each row corresponds to a branch in your reference tree, with a unique ID (often tied to bootstrap values or node labels from your reference tree). Use this ID to find the corresponding _DF1 and _DF2 trees in the .gCF.alt.trees file.
  • Visualize the alternative trees: Load the .gCF.alt.trees file into a tree viewer like FigTree, iTOL, or Dendroscope. You’ll be able to see exactly how the NNI swap alters the reference tree’s topology for that branch.

Reconstructing the Tree with a gDF1/gDF2 Branch

If you want to replace the reference tree’s branch with the topology supported by gDF1 or gDF2, you have two easy options:

  • Use the pre-generated alternative tree: The .gCF.alt.trees file already contains full trees with the NNI swap applied. Just extract the _DF1 or _DF2 tree you need and use that as your new tree.
  • Manually modify the reference tree: If you prefer to edit the original reference tree, use the visualized alternative tree as a guide to adjust the clade relationships for the target branch in your tree editor of choice.

Quick Check to Ensure You Have the Right Files

Make sure your original IQ-TREE command included the necessary parameters to generate these files. For example, if you’re using pre-computed gene trees to calculate gCF, your command might look like this:

iqtree -s concatenated_aln.phy -t reference_tree.tre -gcf gene_trees.tre -pre my_phylogeny

The -gcf flag triggers the concordance factor calculation, and the -pre sets the prefix for all output files (including the .gCF.alt.trees and .gCF.stats files).

内容的提问来源于stack exchange,提问作者Sophie Leitch

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.27 12:27:28