[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CVMST3KKK99XKWJ06T502C":3,"skill-same:01M7CVMST3KKK99XKWJ06T502C":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7CVMST3KKK99XKWJ06T502C","bio-phylo-species-trees",null,"Estimates species trees under the multispecies coalescent from per-locus gene trees with the modern ASTER astral binary (ASTRAL-III\u002FwASTRAL\u002FASTRAL-Pro), plus SVDQuartets, BPP, and StarBEAST2. Covers why a species tree is not a gene tree, why each locus has its own genealogy that disagrees by incomplete lineage sorting (ILS) even with zero error, why concatenation is statistically inconsistent and positively misleading in the anomaly zone where more loci converge on the wrong tree with full support, why gene-tree estimation error biases summary methods, that localPP is not bootstrap and ASTRAL branch lengths are coalescent units, and how minority-quartet symmetry separates ILS from introgression. Use when multi-locus discordance, rapid radiations, anomaly-zone risk, concordance-factor interpretation, or concatenation-vs-coalescent choice arise. Routes per-locus gene-tree inference and gCF\u002FsCF to modern-tree-inference, dating to divergence-dating, orthology to comparative-genomics\u002Fortholog-inference.","mrsonord2240\u002Fopenscience-specialists","mrsonord2240","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F76487430?v=4","01M7CTEM40S43GSJZ9A3YCCXZK","Samuel Nord","01M7CTEM4K69JD1GBYNHVJ9ZP4",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-phylo-species-trees\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-phylo-species-trees\ndescription: Estimates species trees under the multispecies coalescent from per-locus gene trees with the modern ASTER astral binary (ASTRAL-III\u002FwASTRAL\u002FASTRAL-Pro), plus SVDQuartets, BPP, and StarBEAST2. Covers why a species tree is not a gene tree, why each locus has its own genealogy that disagrees by incomplete lineage sorting (ILS) even with zero error, why concatenation is statistically inconsistent and positively misleading in the anomaly zone where more loci converge on the wrong tree with full support, why gene-tree estimation error biases summary methods, that localPP is not bootstrap and ASTRAL branch lengths are coalescent units, and how minority-quartet symmetry separates ILS from introgression. Use when multi-locus discordance, rapid radiations, anomaly-zone risk, concordance-factor interpretation, or concatenation-vs-coalescent choice arise. Routes per-locus gene-tree inference and gCF\u002FsCF to modern-tree-inference, dating to divergence-dating, orthology to comparative-genomics\u002Fortholog-inference.\ntool_type: mixed\nprimary_tool: ASTRAL-III\n---\n\n## Version Compatibility\n\nReference examples tested with: ASTER 1.15+ (provides astral\u002FASTRAL-III, wastral, astral-pro), IQ-TREE 2.2+ (concordance factors), PAUP* 4.0a168+ (SVDQuartets), BPP 4+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `astral --version` then `astral --help` to confirm flags\n- CLI: `iqtree3 --version` then `iqtree3 --help` to confirm flags (`iqtree2` on IQ-TREE 2.x)\n- CLI: PAUP* prints its version at startup; BPP reads a control file\n\nIf code throws an error, introspect the installed version and adapt flags rather than retrying.\n\nThe modern binary is `astral` from the ASTER package; input is a file of gene-tree Newick strings, one tree per line. The classic-Java ASTRAL uses `-t` for ANNOTATION level, but the ASTER `astral` uses `-t` for THREADS and `-u` for annotation -- copying a Java `-t 8` (quartet support) into ASTER silently requests 8 threads with only the default localPP annotation (no q1\u002Fq2\u002Fq3). Confirm which interface is installed before scripting.\n\n# Coalescent Species-Tree Estimation -- A Species Tree Is Not a Gene Tree, and Concatenation Is Inconsistent in the Anomaly Zone\n\n**\"Estimate the species tree from my multi-locus phylogenomic data\"** -> Treat the dataset as a distribution of genealogies, not one tree, and estimate the species tree most consistent with that distribution under the multispecies coalescent.\n- CLI: per-locus gene trees (modern-tree-inference) then `astral -i gene_trees.nwk -o species.tre` (ASTER)\n- CLI: gene and site concordance factors via `iqtree3 -t ... --gcf` and `iqtree3 -te ... --scfl` as two calls (shared with modern-tree-inference)\n\nScope: choosing and running a coalescent species-tree method, contracting noisy gene trees, and reading discordance honestly. Per-locus gene-tree inference and model selection -> modern-tree-inference. Computing and plotting gCF\u002FsCF -> modern-tree-inference, tree-visualization. Single-copy vs multi-copy orthology upstream -> comparative-genomics\u002Fortholog-inference. Dated species trees -> divergence-dating. Rooting -> tree-manipulation.\n\n## The Single Most Important Modern Insight\n\nA species tree is not a gene tree. Each locus has its own genealogy, and under the multispecies coalescent (MSC) those genealogies disagree with the species tree -- and with each other -- by incomplete lineage sorting (ILS) alone, with zero estimation error. The disagreement is not noise to average away; it is signal generated by the coalescent running inside the species tree. Three load-bearing facts:\n\n1. **The most probable gene tree can be the wrong species tree.** When two short speciation events occur in quick succession, the single most common gene-tree topology is not the species tree -- this is the anomaly zone (Degnan and Rosenberg 2006), and such gene trees are anomalous gene trees. A plurality vote across loci then converges on the wrong tree.\n2. **Concatenation is statistically inconsistent and positively misleading under ILS.** It pretends all loci share one tree and behaves like a vote dominated by the most-supported site pattern; in the anomaly zone that pattern reflects the anomalous genealogy, so adding loci raises bootstrap support for the wrong topology toward 100% (Kubatko and Degnan 2007; Roch and Steel 2015). More data makes the error more confident, not less. The support is the trap.\n3. **The honest question is the distribution, not the tree.** Coalescent summary methods (ASTRAL family) stay consistent because they ask \"what species tree is most consistent with having generated this gene-tree distribution under the MSC?\" -- and they work at the quartet level, where the matching topology is always the plurality and no anomaly zone exists. Concatenation answers a different, wrong question, and both outputs look identically resolved and supported.\n\n## When Concatenation Fails\n\nConcatenation is consistent and efficient only when ILS is low. It is actively wrong in three coupled regimes, all driven by short internodes measured in coalescent units (generations \u002F 2Ne):\n\n1. **Short internodes plus large ancestral Ne.** A short branch gives lineages little time to coalesce before the next deeper population, so many survive and sort randomly. For a rooted triple, P(gene tree matches) = 1 - (2\u002F3)e^(-tau) in coalescent units tau: at tau = 1 about 25% of gene trees are discordant, at tau = 0.3 about 50%, at tau = 0.1 about 60%. Large Ne shortens tau for the same number of years, inflating ILS.\n2. **The anomaly zone (Degnan and Rosenberg 2006).** With two or more short successive internal branches (both well under ~1, especially under ~0.1-0.2 coalescent units), the most probable gene tree differs from the species tree. The zone grows with taxon number and with shorter, more clustered internodes.\n3. **Rapid radiations.** Successive speciation in quick succession is built from exactly those short internodes, so radiations routinely show a majority of gene trees conflicting with the species tree. This is the canonical case for a coalescent method.\n\n## Method Taxonomy\n\n| Method | Citation | Type \u002F role | When |\n|--------|----------|-------------|------|\n| ASTRAL-III (`astral`) | Zhang 2018 | Summary, quartet-based; consistent under MSC; localPP, polytomy test, q1\u002Fq2\u002Fq3 | Default genome-scale species tree from single-copy gene trees |\n| wASTRAL (`wastral`\u002Fastral-hybrid) | Zhang and Mirarab 2022 | Summary, weighted quartets; down-weights weak gene-tree branches | Current best-accuracy summary method for real (noisy) gene trees |\n| ASTRAL-Pro (`astral-pro`) | Zhang 2020 | Summary, quartet-based on MULTI-COPY gene-family trees | Paralog-rich families; uses families without pre-orthology |\n| SVDQuartets | Chifman and Kubatko 2014 | Site-based quartets from site patterns; NO gene trees | Short loci (RADseq\u002FUCE\u002FSNP); when gene trees are unreliable |\n| BPP | Flouri 2018 | Full-likelihood Bayesian MSC; integrates gene-tree uncertainty | Small high-stakes datasets; species delimitation; introgression (MSci) |\n| StarBEAST2 | Ogilvie 2017 | Full Bayesian co-estimation of species tree, gene trees, dates | Dated species tree with full posterior uncertainty |\n| Concatenation (IQ-TREE\u002FRAxML) | -- | Supermatrix ML; assumes ONE tree | Low ILS \u002F high gCF only; never in or near the anomaly zone |\n\nSummary methods take estimated gene trees as input and assume they are true -- the central caveat (see failure modes). Site-based (SVDQuartets) and full-likelihood (BPP, StarBEAST2) skip that assumption but pay in scale: roughly tens of taxa for the full-likelihood methods. The speed\u002Fscale order (most scalable first) is concatenation \u003C ASTRAL\u002FwASTRAL \u003C SVDQuartets \u003C StarBEAST2 \u003C BPP; model completeness runs the opposite way. Pick the most scalable method whose assumptions the data do not badly violate. Introgression detection (HyDe, Blischak 2018, Syst Biol; QuIBL, Edelman 2019, Science; the D-statistic) lives downstream of the symmetry diagnostic below.\n\n## Concatenation vs Coalescent Decision\n\n| Situation \u002F diagnostic | Recommended |\n|------------------------|-------------|\n| Low ILS: long internodes (>>1 coalescent unit), gCF high (>~70), few discordant gene trees | Concatenation fine; coalescent agrees and adds no advantage |\n| Moderate ILS: gCF ~50-70, some short branches | Run wASTRAL; check gCF\u002FsCF and the polytomy test on short branches |\n| High ILS \u002F rapid radiation: short successive internodes, gCF \u003C50 (esp. \u003C33), q2 ~ q3 | Coalescent REQUIRED; concatenation is anomaly-zone wrong; quartet consistency holds |\n| Low per-locus signal \u002F unreliable gene trees | wASTRAL or contract gene-tree branches \u003C10% support; or SVDQuartets (no gene trees); BPP integrates uncertainty |\n| Paralog-rich gene families | ASTRAL-Pro (no pre-orthology); concatenation cannot use them |\n| Need dated tree or delimitation | StarBEAST2 (dating) or BPP (delimitation); coalescent-unit lengths are not time |\n| Suspected introgression (q2 != q3, D significant) | Model the reticulation (HyDe\u002FQuIBL\u002FBPP-MSci\u002FPhyloNet); a tree masks it |\n\nDo not reflexively coalescent-everything: where ILS is low the two trees agree and concatenation pools weak per-locus signal robustly. The deliverable is concordance, not a single best method -- run both, compute gCF\u002FsCF, and trust the coalescent tree exactly where the two disagree on low-gCF branches.\n\n## Estimate the Species Tree from Gene Trees\n\n**Goal:** Turn per-locus gene trees into a species tree that is consistent under the MSC, after removing gene-tree noise that would bias the quartet counts.\n\n**Approach:** Infer one gene tree per locus with branch support (modern-tree-inference), contract branches below ~10% support to polytomies (which ASTRAL handles correctly), then run wASTRAL as the primary estimate and `astral` for the classic localPP \u002F polytomy-test workflow.\n\n```bash\n# Per-locus gene trees with support live upstream in modern-tree-inference:\n#   iqtree3 -S loci_dir -m MFP -B 1000 -T AUTO --prefix loci   # one tree per locus (iqtree2 on 2.x)\n# Contract gene-tree branches below 10% STANDARD bootstrap (Newick tools \u002F nw_ed) -> polytomies.\n# With UFBoot (-B) labels this is nearly a no-op (UFBoot rarely falls below 10); use wASTRAL instead.\n# Then concatenate into one file, one Newick per line:\n#   cat loci\u002F*.contracted.treefile > gene_trees.nwk\n\n# Primary estimate: wASTRAL weights quartets by gene-tree support+length (noisy gene trees)\nwastral -i gene_trees.nwk -o species_wastral.tre 2> species_wastral.log\n\n# Classic ASTRAL-III for localPP + polytomy test. In ASTER, -t is THREADS, -u is annotation:\nastral -t 8 -i gene_trees.nwk -o species.tre 2> species.log     # -t 8 = 8 threads here\nastral -u 2 -i gene_trees.nwk -o species_annot.tre              # full localPP + q1\u002Fq2\u002Fq3 for all 3 resolutions\nastral --root OUTGROUP -i gene_trees.nwk -o species_rooted.tre  # rooting improves branch-length estimation\n\n# Multi-copy gene families (no pre-orthology) -> ASTRAL-Pro, with a gene->species map:\nastral-pro -a gene2species.txt -i family_trees.nwk -o species_pro.tre\n```\n\n`gene2species.txt` has one line per gene copy, `\u003Cgene name> \u003Cspecies name>` separated by a space or tab (e.g. `Sp_A_1\tSp_A`). Without `-a`, ASTRAL-Pro treats every distinct leaf name as a species: family trees with copies named `Sp_A_1`\u002F`Sp_A_2` return a tree of gene copies, with exit 0 and no warning.\n\nASTRAL returns an UNROOTED tree; root with an outgroup afterward. Branch-length units depend on the binary: ASTER `astral`\u002F`astral-pro` (ASTRAL-IV \u002F ASTRAL-Pro3) default to `--length SULength` (substitutions per site, tip lengths written); use `--length CULength` for coalescent units, or read `CULength` from the `-u 2` labels. `wastral` and classic Java ASTRAL write coalescent units with undefined tip lengths. Coalescent units are not time either. The classic Java `astral.5.7.8.jar` inverts the flags: there `-t` is the annotation level (`-t 2` full, `-t 8` quartet support, `-t 10` polytomy test) and there is no `-u`.\n\n## Compute and Read Concordance Factors\n\n**Goal:** Replace a single bootstrap\u002FlocalPP per branch with how much of the actual data agrees, and read ILS-vs-introgression off the quartet symmetry.\n\n**Approach:** Compute gene and site concordance factors against the species tree, then inspect the two minority quartet frequencies (q2, q3) at each contested branch.\n\n```bash\n# gCF = % of decisive gene trees containing a branch; sCF = % of decisive sites supporting it\n# Two calls: IQ-TREE rejects --gcf together with --scfl (\"Do not specify --scf or --gcf with --scfl\")\niqtree3 -t species.tre --gcf gene_trees.nwk --prefix cf_g                     # gene concordance\niqtree3 -te species.tre -s concat.fasta --scfl 100 --prefix cf_s              # likelihood sCF; -te fixes the topology\n# cf_g.cf.tree \u002F cf_s.cf.tree carry gCF \u002F sCF on node labels; cf_g.cf.stat has per-branch gCF, gDF1, gDF2, gDFP\n# (gene trees supporting the species split, the two alternative NNI resolutions, and paraphyly) -- not q1\u002Fq2\u002Fq3\n```\n\n(`iqtree3` is the IQ-TREE 3 binary bioconda installs; on IQ-TREE 2.x use `iqtree2`. Split commands checked on IQ-TREE 2.4.0.)\n\nThen read each contested branch: under pure ILS the two minority topologies are equally probable (q2 ~ q3); introgression breaks that symmetry by inflating the one matching the direction of gene flow. `astral -u 2` labels give q1\u002Fq2\u002Fq3 but do not say which bipartition q2 and q3 are; `astral -u 3` also writes `freqQuad.csv`, which names the quartet topology behind each frequency. Test the asymmetry on the minority counts, e.g. a binomial test of f2 against f2 + f3 with p = 0.5 (gDF1 vs gDF2 from `cf_g.cf.stat` is the gene-tree-count analogue). A high-bootstrap branch with gCF ~ 25 is a branch where the data are screaming disagreement that the bootstrap hides.\n\n## Interpreting Concordance and Discordance\n\n- **gCF \u002F sCF (Minh 2020) are the honest support.** Bootstrap and localPP saturate near their ceiling at genome scale even when most loci disagree; gCF\u002FsCF report the actual conflict. Report them on every phylogenomic tree.\n- **localPP (Sayyari and Mirarab 2016) is NOT a bootstrap.** It is a coalescent posterior computed from the quartet frequencies around a branch. localPP = 1.0 is common and expected on resolved branches and does not mean \"100 of 100 bootstraps\"; localPP ~ 0.33 means the three quartet resolutions are tied (no resolution).\n- **The polytomy test (Sayyari and Mirarab 2018) is the principled alternative to staring at low support.** It tests the null q1 = q2 = q3 (an effectively simultaneous speciation); failing to reject means a resolved bifurcation cannot be claimed -- collapse the branch.\n- **Quartet symmetry separates ILS from introgression.** Symmetric minority quartets (q2 ~ q3) = ILS; handle with a coalescent tree. Asymmetric (q2 != q3, significant D-statistic \u002F ABBA-BABA, HyDe gamma != 0, or QuIBL favoring the introgression component) = gene flow; a bifurcating tree cannot represent it -- model the reticulation. Confirm the asymmetry before invoking introgression.\n\n## Per-Method Failure Modes\n\n### Gene-Tree Estimation Error Biasing ASTRAL\n**Trigger:** Short, low-information loci (e.g. \u003C500 bp exons) fed to ASTRAL\u002FwASTRAL as if their gene trees were truth.\n**Mechanism:** MSC consistency assumes the input gene trees are correct; estimation error is a non-coalescent noise source that biases quartet counts in finite samples and can make the coalescent tree worse than concatenation.\n**Symptom:** Coalescent tree noisier or worse than concatenation; unstable across locus subsets; low localPP everywhere; gCF far below sCF.\n**Fix:** Contract gene-tree branches below ~10% bootstrap before ASTRAL (they become polytomies that contribute no spurious quartet similarity); better, use wASTRAL (continuous weighting); or drop to SVDQuartets (no gene trees) or BPP (integrates gene-tree uncertainty).\n\n### Treating localPP as Bootstrap Support\n**Trigger:** Reporting ASTRAL branch labels as bootstrap proportions, or demanding \">95% bootstrap\" of an ASTRAL tree.\n**Mechanism:** localPP is a coalescent posterior from quartet frequencies, on a different scale; it saturates at 1.0 on resolved branches.\n**Symptom:** Over-confident reading of localPP = 1.0 as \"100\u002F100 BS\"; ignoring that localPP ~ 0.33 is a near-tie.\n**Fix:** Interpret localPP on its own scale; report gCF\u002FsCF for honest conflict; use the polytomy test to decide whether to collapse a branch.\n\n### Concatenating In or Near the Anomaly Zone\n**Trigger:** Rapid radiation with several short successive internodes, analyzed by supermatrix ML with \"100% bootstrap\" reported as resolution.\n**Mechanism:** Concatenation is inconsistent and positively misleading under high ILS; the plurality genealogy is anomalous, so adding loci converges on the wrong tree with rising support.\n**Symptom:** Rock-solid bootstrap but gCF \u003C 33 on focal branches; concatenated and coalescent trees disagree exactly there.\n**Fix:** Use wASTRAL\u002FASTRAL (quartet-level consistency holds in the anomaly zone); report gCF\u002FsCF; trust the coalescent topology on low-gCF branches; consider a true near-polytomy via the polytomy test. Consistency is asymptotic: deep in the zone (internodes ~0.01 coalescent units) the three quartet frequencies differ by about 1% and ASTRAL can also return the anomalous split even from thousands of error-free gene trees, but with low localPP and a non-rejected polytomy test -- there the deliverable is a supported near-polytomy, not a resolved topology.\n\n### Ignoring Paralogy\n**Trigger:** Discarding all multi-copy families to feed single-copy ASTRAL, or treating paralogs as orthologs.\n**Mechanism:** Standard ASTRAL assumes single-copy gene trees; mis-assigned paralogs inject quartets reflecting the duplication history, not speciation.\n**Symptom:** Massive data loss (most families dropped), or spurious clades \u002F inflated discordance from hidden paralogy.\n**Fix:** Use ASTRAL-Pro on the multi-copy gene-family trees (it models orthology\u002Fparalogy without pre-orthology); audit orthology upstream (comparative-genomics\u002Fortholog-inference).\n\n### Mistaking Introgression for ILS (or Vice Versa)\n**Trigger:** Assuming all discordance is ILS and fitting a tree, OR over-calling gene flow from any discordance.\n**Mechanism:** ILS produces symmetric minority topologies (q2 ~ q3); introgression breaks the symmetry. A bifurcating tree cannot represent reticulate history.\n**Symptom:** Asymmetric q2\u002Fq3 on a discordant branch; significant D-statistic \u002F HyDe gamma; QuIBL favoring the introgression component -- but a tree-only analysis hides it.\n**Fix:** Test minority-quartet symmetry (D-statistic \u002F ABBA-BABA, HyDe, QuIBL, ASTRAL q1\u002Fq2\u002Fq3) before interpreting; if asymmetric, model the reticulation rather than forcing a tree.\n\n## Quantitative Thresholds\n\n| Quantity | Threshold | Meaning \u002F action | Source |\n|----------|-----------|------------------|--------|\n| Internode (coalescent units) | \u003C ~1.0 | >25% of gene trees discordant; ILS material | P(concordant)=1-(2\u002F3)e^(-tau) |\n| Internode (coalescent units) | \u003C ~0.3 | ~50% discordant; coalescent method required | same |\n| Two+ successive internodes | both \u003C ~0.1-0.2 | Anomaly-zone risk; concatenation positively misleading | Degnan and Rosenberg 2006 |\n| Gene-tree branch support to contract before ASTRAL | \u003C ~10% standard bootstrap (not UFBoot; or use wASTRAL) | Collapse to polytomy to cut gene-tree-error bias | ASTRAL practice \u002F Zhang and Mirarab 2022 |\n| gCF | \u003C 50 | Most loci disagree; distrust concatenation here | Minh 2020 |\n| gCF | \u003C 33 | Near the ILS coin-flip floor; effectively unresolved | Minh 2020 |\n| sCF | ~33 | Random-resolution floor (three quartet resolutions); no site signal | Minh 2020 |\n| localPP | ~0.95+ to call \"well-supported\" | Strong coalescent support, NOT a bootstrap | Sayyari and Mirarab 2016 |\n| localPP | ~0.33 | Three quartet resolutions tied; candidate polytomy | Sayyari and Mirarab 2016 |\n| Polytomy test p | fail to reject (e.g. p > 0.05) | Cannot claim a resolved bifurcation; collapse | Sayyari and Mirarab 2018 |\n\nThe gCF\u002FsCF cutoffs of 50\u002F33 are practical heuristics relative to the dataset (a branch at gCF 45 amid branches at 90 is the weak one), not significance tests. The 10% contraction is a widely-used default, not a derived optimum; wASTRAL removes the need to pick it.\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| ASTER `astral` gives localPP but no q1\u002Fq2\u002Fq3 | Used Java `-t 8` (annotation); ASTER `-t` is threads | Use `-u 2` in ASTER; `-t 8` only in classic Java |\n| Coalescent tree worse than concatenation | Noisy gene trees fed in as truth | Contract \u003C10% branches; use wASTRAL; or SVDQuartets |\n| localPP = 1.0 reported as bootstrap | localPP is a coalescent posterior on its own scale | Report gCF\u002FsCF; do not apply a BS cutoff |\n| Substitution-unit branch read as coalescent units, or either read as time | ASTER `astral` defaults to `SULength`; `--length CULength` gives coalescent units | State units; for dates use StarBEAST2 \u002F divergence-dating |\n| `iqtree ... --gcf ... --scfl` exits \"Do not specify --scf or --gcf with --scfl\" | gCF and likelihood sCF cannot share one call | Run `-t ... --gcf` and `-te ... --scfl` as two calls |\n| High bootstrap, low gCF, called resolved | Concatenation in the anomaly zone | Run coalescent; trust it on low-gCF branches; polytomy test |\n| Most gene families dropped | Forced single-copy orthology | Use ASTRAL-Pro on multi-copy family trees |\n| Network claimed from any discordance | ILS also produces discordance | Confirm q2 != q3 (D \u002F HyDe \u002F QuIBL) before invoking gene flow |\n\n## References\n\nDegnan JH, Rosenberg NA. 2006. Discordance of species trees with their most likely gene trees. *PLoS Genetics* 2(5):e68.\nDegnan JH, Rosenberg NA. 2009. Gene tree discordance, phylogenetic inference and the multispecies coalescent. *Trends in Ecology & Evolution* 24(6):332-340.\nKubatko LS, Degnan JH. 2007. Inconsistency of phylogenetic estimates from concatenated data under coalescence. *Systematic Biology* 56(1):17-24.\nRoch S, Steel M. 2015. Likelihood-based tree reconstruction on a concatenation of aligned sequence data sets can be statistically inconsistent. *Theoretical Population Biology* 100:56-62.\nMirarab S, Reaz R, Bayzid MS, Zimmermann T, Swenson MS, Warnow T. 2014. ASTRAL: genome-scale coalescent-based species tree estimation. *Bioinformatics* 30(17):i541-i548.\nZhang C, Rabiee M, Sayyari E, Mirarab S. 2018. ASTRAL-III: polynomial time species tree reconstruction from partially resolved gene trees. *BMC Bioinformatics* 19(Suppl 6):153.\nZhang C, Mirarab S. 2022. Weighting by gene tree uncertainty improves accuracy of quartet-based species trees. *Molecular Biology and Evolution* 39(12):msac215.\nZhang C, Scornavacca C, Molloy EK, Mirarab S. 2020. ASTRAL-Pro: quartet-based species-tree inference despite paralogy. *Molecular Biology and Evolution* 37(11):3292-3307.\nZhang C, Nielsen R, Mirarab S. 2025. ASTER: a package for large-scale phylogenomic reconstructions. *Molecular Biology and Evolution* 42(8):msaf172.\nSayyari E, Mirarab S. 2016. Fast coalescent-based computation of local branch support from quartet frequencies. *Molecular Biology and Evolution* 33(7):1654-1668.\nSayyari E, Mirarab S. 2018. Testing for polytomies in phylogenetic species trees using quartet frequencies. *Genes* 9(3):132.\nChifman J, Kubatko L. 2014. Quartet inference from SNP data under the coalescent model. *Bioinformatics* 30(23):3317-3324.\nFlouri T, Jiao X, Rannala B, Yang Z. 2018. Species tree inference with BPP using genomic sequences and the multispecies coalescent. *Molecular Biology and Evolution* 35(10):2585-2593.\nOgilvie HA, Bouckaert RR, Drummond AJ. 2017. StarBEAST2 brings faster species tree inference and accurate estimates of substitution rates. *Molecular Biology and Evolution* 34(8):2101-2114.\nMinh BQ, Hahn MW, Lanfear R. 2020. New methods to calculate concordance factors for phylogenomic datasets. *Molecular Biology and Evolution* 37(9):2727-2733.\nBlischak PD, Chifman J, Wolfe AD, Kubatko LS. 2018. HyDe: a Python package for genome-scale hybridization detection. *Systematic Biology* 67(5):821-829.\nEdelman NB, Frandsen PB, Miyagi M, et al. 2019. Genomic architecture and introgression shape a butterfly radiation. *Science* 366(6465):594-599.\n\n## Related Skills\n\n- modern-tree-inference - per-locus ML gene trees (ASTRAL input) and gCF\u002FsCF computation\n- bayesian-inference - MCMC convergence and marginal-likelihood checks for full-Bayesian MSC runs (StarBEAST2 itself is not covered there; it is a BEAST2 package, set up via BEAUti)\n- divergence-dating - turning a coalescent-unit species tree into a dated tree\n- tree-io - reading and writing the Newick gene-tree files ASTRAL consumes\n- comparative-genomics\u002Fortholog-inference - single-copy vs multi-copy decision upstream (ASTRAL vs ASTRAL-Pro)\n","## Version Compatibility\n\nReference examples tested with: ASTER 1.15+ (provides astral\u002FASTRAL-III, wastral, astral-pro), IQ-TREE 2.2+ (concordance factors), PAUP* 4.0a168+ (SVDQuartets), BPP 4+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `astral --version` then `astral --help` to confirm flags\n- CLI: `iqtree3 --version` then `iqtree3 --help` to confirm flags (`iqtree2` on IQ-TREE 2.x)\n- CLI: PAUP* prints its version at startup; BPP reads a control file\n\nIf code throws an error, introspect the installed version and adapt flags rather than retrying.\n\nThe modern binary is `astral` from the ASTER package; input is a file of gene-tree Newick strings, one tree per line. The classic-Java ASTRAL uses `-t` for ANNOTATION level, but the ASTER `astral` uses `-t` for THREADS and `-u` for annotation -- copying a Java `-t 8` (quartet support) into ASTER silently requests 8 threads with only the default localPP annotation (no q1\u002Fq2\u002Fq3). Confirm which interface is installed before scripting.\n\n# Coalescent Species-Tree Estimation -- A Species Tree Is Not a Gene Tree, and Concatenation Is Inconsistent in the Anomaly Zone\n\n**\"Estimate the species tree from my multi-locus phylogenomic data\"** -> Treat the dataset as a distribution of genealogies, not one tree, and estimate the species tree most consistent with that distribution under the multispecies coalescent.\n- CLI: per-locus gene trees (modern-tree-inference) then `astral -i gene_trees.nwk -o species.tre` (ASTER)\n- CLI: gene and site concordance factors via `iqtree3 -t ... --gcf` and `iqtree3 -te ... --scfl` as two calls (shared with modern-tree-inference)\n\nScope: choosing and running a coalescent species-tree method, contracting noisy gene trees, and reading discordance honestly. Per-locus gene-tree inference and model selection -> modern-tree-inference. Computing and plotting gCF\u002FsCF -> modern-tree-inference, tree-visualization. Single-copy vs multi-copy orthology upstream -> comparative-genomics\u002Fortholog-inference. Dated species trees -> divergence-dating. Rooting -> tree-manipulation.\n\n## The Single Most Important Modern Insight\n\nA species tree is not a gene tree. Each locus has its own genealogy, and under the multispecies coalescent (MSC) those genealogies disagree with the species tree -- and with each other -- by incomplete lineage sorting (ILS) alone, with zero estimation error. The disagreement is not noise to average away; it is signal generated by the coalescent running inside the species tree. Three load-bearing facts:\n\n1. **The most probable gene tree can be the wrong species tree.** When two short speciation events occur in quick succession, the single most common gene-tree topology is not the species tree -- this is the anomaly zone (Degnan and Rosenberg 2006), and such gene trees are anomalous gene trees. A plurality vote across loci then converges on the wrong tree.\n2. **Concatenation is statistically inconsistent and positively misleading under ILS.** It pretends all loci share one tree and behaves like a vote dominated by the most-supported site pattern; in the anomaly zone that pattern reflects the anomalous genealogy, so adding loci raises bootstrap support for the wrong topology toward 100% (Kubatko and Degnan 2007; Roch and Steel 2015). More data makes the error more confident, not less. The support is the trap.\n3. **The honest question is the distribution, not the tree.** Coalescent summary methods (ASTRAL family) stay consistent because they ask \"what species tree is most consistent with having generated this gene-tree distribution under the MSC?\" -- and they work at the quartet level, where the matching topology is always the plurality and no anomaly zone exists. Concatenation answers a different, wrong question, and both outputs look identically resolved and supported.\n\n## When Concatenation Fails\n\nConcatenation is consistent and efficient only when ILS is low. It is actively wrong in three coupled regimes, all driven by short internodes measured in coalescent units (generations \u002F 2Ne):\n\n1. **Short internodes plus large ancestral Ne.** A short branch gives lineages little time to coalesce before the next deeper population, so many survive and sort randomly. For a rooted triple, P(gene tree matches) = 1 - (2\u002F3)e^(-tau) in coalescent units tau: at tau = 1 about 25% of gene trees are discordant, at tau = 0.3 about 50%, at tau = 0.1 about 60%. Large Ne shortens tau for the same number of years, inflating ILS.\n2. **The anomaly zone (Degnan and Rosenberg 2006).** With two or more short successive internal branches (both well under ~1, especially under ~0.1-0.2 coalescent units), the most probable gene tree differs from the species tree. The zone grows with taxon number and with shorter, more clustered internodes.\n3. **Rapid radiations.** Successive speciation in quick succession is built from exactly those short internodes, so radiations routinely show a majority of gene trees conflicting with the species tree. This is the canonical case for a coalescent method.\n\n## Method Taxonomy\n\n| Method | Citation | Type \u002F role | When |\n|--------|----------|-------------|------|\n| ASTRAL-III (`astral`) | Zhang 2018 | Summary, quartet-based; consistent under MSC; localPP, polytomy test, q1\u002Fq2\u002Fq3 | Default genome-scale species tree from single-copy gene trees |\n| wASTRAL (`wastral`\u002Fastral-hybrid) | Zhang and Mirarab 2022 | Summary, weighted quartets; down-weights weak gene-tree branches | Current best-accuracy summary method for real (noisy) gene trees |\n| ASTRAL-Pro (`astral-pro`) | Zhang 2020 | Summary, quartet-based on MULTI-COPY gene-family trees | Paralog-rich families; uses families without pre-orthology |\n| SVDQuartets | Chifman and Kubatko 2014 | Site-based quartets from site patterns; NO gene trees | Short loci (RADseq\u002FUCE\u002FSNP); when gene trees are unreliable |\n| BPP | Flouri 2018 | Full-likelihood Bayesian MSC; integrates gene-tree uncertainty | Small high-stakes datasets; species delimitation; introgression (MSci) |\n| StarBEAST2 | Ogilvie 2017 | Full Bayesian co-estimation of species tree, gene trees, dates | Dated species tree with full posterior uncertainty |\n| Concatenation (IQ-TREE\u002FRAxML) | -- | Supermatrix ML; assumes ONE tree | Low ILS \u002F high gCF only; never in or near the anomaly zone |\n\nSummary methods take estimated gene trees as input and assume they are true -- the central caveat (see failure modes). Site-based (SVDQuartets) and full-likelihood (BPP, StarBEAST2) skip that assumption but pay in scale: roughly tens of taxa for the full-likelihood methods. The speed\u002Fscale order (most scalable first) is concatenation \u003C ASTRAL\u002FwASTRAL \u003C SVDQuartets \u003C StarBEAST2 \u003C BPP; model completeness runs the opposite way. Pick the most scalable method whose assumptions the data do not badly violate. Introgression detection (HyDe, Blischak 2018, Syst Biol; QuIBL, Edelman 2019, Science; the D-statistic) lives downstream of the symmetry diagnostic below.\n\n## Concatenation vs Coalescent Decision\n\n| Situation \u002F diagnostic | Recommended |\n|------------------------|-------------|\n| Low ILS: long internodes (>>1 coalescent unit), gCF high (>~70), few discordant gene trees | Concatenation fine; coalescent agrees and adds no advantage |\n| Moderate ILS: gCF ~50-70, some short branches | Run wASTRAL; check gCF\u002FsCF and the polytomy test on short branches |\n| High ILS \u002F rapid radiation: short successive internodes, gCF \u003C50 (esp. \u003C33), q2 ~ q3 | Coalescent REQUIRED; concatenation is anomaly-zone wrong; quartet consistency holds |\n| Low per-locus signal \u002F unreliable gene trees | wASTRAL or contract gene-tree branches \u003C10% support; or SVDQuartets (no gene trees); BPP integrates uncertainty |\n| Paralog-rich gene families | ASTRAL-Pro (no pre-orthology); concatenation cannot use them |\n| Need dated tree or delimitation | StarBEAST2 (dating) or BPP (delimitation); coalescent-unit lengths are not time |\n| Suspected introgression (q2 != q3, D significant) | Model the reticulation (HyDe\u002FQuIBL\u002FBPP-MSci\u002FPhyloNet); a tree masks it |\n\nDo not reflexively coalescent-everything: where ILS is low the two trees agree and concatenation pools weak per-locus signal robustly. The deliverable is concordance, not a single best method -- run both, compute gCF\u002FsCF, and trust the coalescent tree exactly where the two disagree on low-gCF branches.\n\n## Estimate the Species Tree from Gene Trees\n\n**Goal:** Turn per-locus gene trees into a species tree that is consistent under the MSC, after removing gene-tree noise that would bias the quartet counts.\n\n**Approach:** Infer one gene tree per locus with branch support (modern-tree-inference), contract branches below ~10% support to polytomies (which ASTRAL handles correctly), then run wASTRAL as the primary estimate and `astral` for the classic localPP \u002F polytomy-test workflow.\n\n```bash\n# Per-locus gene trees with support live upstream in modern-tree-inference:\n#   iqtree3 -S loci_dir -m MFP -B 1000 -T AUTO --prefix loci   # one tree per locus (iqtree2 on 2.x)\n# Contract gene-tree branches below 10% STANDARD bootstrap (Newick tools \u002F nw_ed) -> polytomies.\n# With UFBoot (-B) labels this is nearly a no-op (UFBoot rarely falls below 10); use wASTRAL instead.\n# Then concatenate into one file, one Newick per line:\n#   cat loci\u002F*.contracted.treefile > gene_trees.nwk\n\n# Primary estimate: wASTRAL weights quartets by gene-tree support+length (noisy gene trees)\nwastral -i gene_trees.nwk -o species_wastral.tre 2> species_wastral.log\n\n# Classic ASTRAL-III for localPP + polytomy test. In ASTER, -t is THREADS, -u is annotation:\nastral -t 8 -i gene_trees.nwk -o species.tre 2> species.log     # -t 8 = 8 threads here\nastral -u 2 -i gene_trees.nwk -o species_annot.tre              # full localPP + q1\u002Fq2\u002Fq3 for all 3 resolutions\nastral --root OUTGROUP -i gene_trees.nwk -o species_rooted.tre  # rooting improves branch-length estimation\n\n# Multi-copy gene families (no pre-orthology) -> ASTRAL-Pro, with a gene->species map:\nastral-pro -a gene2species.txt -i family_trees.nwk -o species_pro.tre\n```\n\n`gene2species.txt` has one line per gene copy, `\u003Cgene name> \u003Cspecies name>` separated by a space or tab (e.g. `Sp_A_1\tSp_A`). Without `-a`, ASTRAL-Pro treats every distinct leaf name as a species: family trees with copies named `Sp_A_1`\u002F`Sp_A_2` return a tree of gene copies, with exit 0 and no warning.\n\nASTRAL returns an UNROOTED tree; root with an outgroup afterward. Branch-length units depend on the binary: ASTER `astral`\u002F`astral-pro` (ASTRAL-IV \u002F ASTRAL-Pro3) default to `--length SULength` (substitutions per site, tip lengths written); use `--length CULength` for coalescent units, or read `CULength` from the `-u 2` labels. `wastral` and classic Java ASTRAL write coalescent units with undefined tip lengths. Coalescent units are not time either. The classic Java `astral.5.7.8.jar` inverts the flags: there `-t` is the annotation level (`-t 2` full, `-t 8` quartet support, `-t 10` polytomy test) and there is no `-u`.\n\n## Compute and Read Concordance Factors\n\n**Goal:** Replace a single bootstrap\u002FlocalPP per branch with how much of the actual data agrees, and read ILS-vs-introgression off the quartet symmetry.\n\n**Approach:** Compute gene and site concordance factors against the species tree, then inspect the two minority quartet frequencies (q2, q3) at each contested branch.\n\n```bash\n# gCF = % of decisive gene trees containing a branch; sCF = % of decisive sites supporting it\n# Two calls: IQ-TREE rejects --gcf together with --scfl (\"Do not specify --scf or --gcf with --scfl\")\niqtree3 -t species.tre --gcf gene_trees.nwk --prefix cf_g                     # gene concordance\niqtree3 -te species.tre -s concat.fasta --scfl 100 --prefix cf_s              # likelihood sCF; -te fixes the topology\n# cf_g.cf.tree \u002F cf_s.cf.tree carry gCF \u002F sCF on node labels; cf_g.cf.stat has per-branch gCF, gDF1, gDF2, gDFP\n# (gene trees supporting the species split, the two alternative NNI resolutions, and paraphyly) -- not q1\u002Fq2\u002Fq3\n```\n\n(`iqtree3` is the IQ-TREE 3 binary bioconda installs; on IQ-TREE 2.x use `iqtree2`. Split commands checked on IQ-TREE 2.4.0.)\n\nThen read each contested branch: under pure ILS the two minority topologies are equally probable (q2 ~ q3); introgression breaks that symmetry by inflating the one matching the direction of gene flow. `astral -u 2` labels give q1\u002Fq2\u002Fq3 but do not say which bipartition q2 and q3 are; `astral -u 3` also writes `freqQuad.csv`, which names the quartet topology behind each frequency. Test the asymmetry on the minority counts, e.g. a binomial test of f2 against f2 + f3 with p = 0.5 (gDF1 vs gDF2 from `cf_g.cf.stat` is the gene-tree-count analogue). A high-bootstrap branch with gCF ~ 25 is a branch where the data are screaming disagreement that the bootstrap hides.\n\n## Interpreting Concordance and Discordance\n\n- **gCF \u002F sCF (Minh 2020) are the honest support.** Bootstrap and localPP saturate near their ceiling at genome scale even when most loci disagree; gCF\u002FsCF report the actual conflict. Report them on every phylogenomic tree.\n- **localPP (Sayyari and Mirarab 2016) is NOT a bootstrap.** It is a coalescent posterior computed from the quartet frequencies around a branch. localPP = 1.0 is common and expected on resolved branches and does not mean \"100 of 100 bootstraps\"; localPP ~ 0.33 means the three quartet resolutions are tied (no resolution).\n- **The polytomy test (Sayyari and Mirarab 2018) is the principled alternative to staring at low support.** It tests the null q1 = q2 = q3 (an effectively simultaneous speciation); failing to reject means a resolved bifurcation cannot be claimed -- collapse the branch.\n- **Quartet symmetry separates ILS from introgression.** Symmetric minority quartets (q2 ~ q3) = ILS; handle with a coalescent tree. Asymmetric (q2 != q3, significant D-statistic \u002F ABBA-BABA, HyDe gamma != 0, or QuIBL favoring the introgression component) = gene flow; a bifurcating tree cannot represent it -- model the reticulation. Confirm the asymmetry before invoking introgression.\n\n## Per-Method Failure Modes\n\n### Gene-Tree Estimation Error Biasing ASTRAL\n**Trigger:** Short, low-information loci (e.g. \u003C500 bp exons) fed to ASTRAL\u002FwASTRAL as if their gene trees were truth.\n**Mechanism:** MSC consistency assumes the input gene trees are correct; estimation error is a non-coalescent noise source that biases quartet counts in finite samples and can make the coalescent tree worse than concatenation.\n**Symptom:** Coalescent tree noisier or worse than concatenation; unstable across locus subsets; low localPP everywhere; gCF far below sCF.\n**Fix:** Contract gene-tree branches below ~10% bootstrap before ASTRAL (they become polytomies that contribute no spurious quartet similarity); better, use wASTRAL (continuous weighting); or drop to SVDQuartets (no gene trees) or BPP (integrates gene-tree uncertainty).\n\n### Treating localPP as Bootstrap Support\n**Trigger:** Reporting ASTRAL branch labels as bootstrap proportions, or demanding \">95% bootstrap\" of an ASTRAL tree.\n**Mechanism:** localPP is a coalescent posterior from quartet frequencies, on a different scale; it saturates at 1.0 on resolved branches.\n**Symptom:** Over-confident reading of localPP = 1.0 as \"100\u002F100 BS\"; ignoring that localPP ~ 0.33 is a near-tie.\n**Fix:** Interpret localPP on its own scale; report gCF\u002FsCF for honest conflict; use the polytomy test to decide whether to collapse a branch.\n\n### Concatenating In or Near the Anomaly Zone\n**Trigger:** Rapid radiation with several short successive internodes, analyzed by supermatrix ML with \"100% bootstrap\" reported as resolution.\n**Mechanism:** Concatenation is inconsistent and positively misleading under high ILS; the plurality genealogy is anomalous, so adding loci converges on the wrong tree with rising support.\n**Symptom:** Rock-solid bootstrap but gCF \u003C 33 on focal branches; concatenated and coalescent trees disagree exactly there.\n**Fix:** Use wASTRAL\u002FASTRAL (quartet-level consistency holds in the anomaly zone); report gCF\u002FsCF; trust the coalescent topology on low-gCF branches; consider a true near-polytomy via the polytomy test. Consistency is asymptotic: deep in the zone (internodes ~0.01 coalescent units) the three quartet frequencies differ by about 1% and ASTRAL can also return the anomalous split even from thousands of error-free gene trees, but with low localPP and a non-rejected polytomy test -- there the deliverable is a supported near-polytomy, not a resolved topology.\n\n### Ignoring Paralogy\n**Trigger:** Discarding all multi-copy families to feed single-copy ASTRAL, or treating paralogs as orthologs.\n**Mechanism:** Standard ASTRAL assumes single-copy gene trees; mis-assigned paralogs inject quartets reflecting the duplication history, not speciation.\n**Symptom:** Massive data loss (most families dropped), or spurious clades \u002F inflated discordance from hidden paralogy.\n**Fix:** Use ASTRAL-Pro on the multi-copy gene-family trees (it models orthology\u002Fparalogy without pre-orthology); audit orthology upstream (comparative-genomics\u002Fortholog-inference).\n\n### Mistaking Introgression for ILS (or Vice Versa)\n**Trigger:** Assuming all discordance is ILS and fitting a tree, OR over-calling gene flow from any discordance.\n**Mechanism:** ILS produces symmetric minority topologies (q2 ~ q3); introgression breaks the symmetry. A bifurcating tree cannot represent reticulate history.\n**Symptom:** Asymmetric q2\u002Fq3 on a discordant branch; significant D-statistic \u002F HyDe gamma; QuIBL favoring the introgression component -- but a tree-only analysis hides it.\n**Fix:** Test minority-quartet symmetry (D-statistic \u002F ABBA-BABA, HyDe, QuIBL, ASTRAL q1\u002Fq2\u002Fq3) before interpreting; if asymmetric, model the reticulation rather than forcing a tree.\n\n## Quantitative Thresholds\n\n| Quantity | Threshold | Meaning \u002F action | Source |\n|----------|-----------|------------------|--------|\n| Internode (coalescent units) | \u003C ~1.0 | >25% of gene trees discordant; ILS material | P(concordant)=1-(2\u002F3)e^(-tau) |\n| Internode (coalescent units) | \u003C ~0.3 | ~50% discordant; coalescent method required | same |\n| Two+ successive internodes | both \u003C ~0.1-0.2 | Anomaly-zone risk; concatenation positively misleading | Degnan and Rosenberg 2006 |\n| Gene-tree branch support to contract before ASTRAL | \u003C ~10% standard bootstrap (not UFBoot; or use wASTRAL) | Collapse to polytomy to cut gene-tree-error bias | ASTRAL practice \u002F Zhang and Mirarab 2022 |\n| gCF | \u003C 50 | Most loci disagree; distrust concatenation here | Minh 2020 |\n| gCF | \u003C 33 | Near the ILS coin-flip floor; effectively unresolved | Minh 2020 |\n| sCF | ~33 | Random-resolution floor (three quartet resolutions); no site signal | Minh 2020 |\n| localPP | ~0.95+ to call \"well-supported\" | Strong coalescent support, NOT a bootstrap | Sayyari and Mirarab 2016 |\n| localPP | ~0.33 | Three quartet resolutions tied; candidate polytomy | Sayyari and Mirarab 2016 |\n| Polytomy test p | fail to reject (e.g. p > 0.05) | Cannot claim a resolved bifurcation; collapse | Sayyari and Mirarab 2018 |\n\nThe gCF\u002FsCF cutoffs of 50\u002F33 are practical heuristics relative to the dataset (a branch at gCF 45 amid branches at 90 is the weak one), not significance tests. The 10% contraction is a widely-used default, not a derived optimum; wASTRAL removes the need to pick it.\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| ASTER `astral` gives localPP but no q1\u002Fq2\u002Fq3 | Used Java `-t 8` (annotation); ASTER `-t` is threads | Use `-u 2` in ASTER; `-t 8` only in classic Java |\n| Coalescent tree worse than concatenation | Noisy gene trees fed in as truth | Contract \u003C10% branches; use wASTRAL; or SVDQuartets |\n| localPP = 1.0 reported as bootstrap | localPP is a coalescent posterior on its own scale | Report gCF\u002FsCF; do not apply a BS cutoff |\n| Substitution-unit branch read as coalescent units, or either read as time | ASTER `astral` defaults to `SULength`; `--length CULength` gives coalescent units | State units; for dates use StarBEAST2 \u002F divergence-dating |\n| `iqtree ... --gcf ... --scfl` exits \"Do not specify --scf or --gcf with --scfl\" | gCF and likelihood sCF cannot share one call | Run `-t ... --gcf` and `-te ... --scfl` as two calls |\n| High bootstrap, low gCF, called resolved | Concatenation in the anomaly zone | Run coalescent; trust it on low-gCF branches; polytomy test |\n| Most gene families dropped | Forced single-copy orthology | Use ASTRAL-Pro on multi-copy family trees |\n| Network claimed from any discordance | ILS also produces discordance | Confirm q2 != q3 (D \u002F HyDe \u002F QuIBL) before invoking gene flow |\n\n## References\n\nDegnan JH, Rosenberg NA. 2006. Discordance of species trees with their most likely gene trees. *PLoS Genetics* 2(5):e68.\nDegnan JH, Rosenberg NA. 2009. Gene tree discordance, phylogenetic inference and the multispecies coalescent. *Trends in Ecology & Evolution* 24(6):332-340.\nKubatko LS, Degnan JH. 2007. Inconsistency of phylogenetic estimates from concatenated data under coalescence. *Systematic Biology* 56(1):17-24.\nRoch S, Steel M. 2015. Likelihood-based tree reconstruction on a concatenation of aligned sequence data sets can be statistically inconsistent. *Theoretical Population Biology* 100:56-62.\nMirarab S, Reaz R, Bayzid MS, Zimmermann T, Swenson MS, Warnow T. 2014. ASTRAL: genome-scale coalescent-based species tree estimation. *Bioinformatics* 30(17):i541-i548.\nZhang C, Rabiee M, Sayyari E, Mirarab S. 2018. ASTRAL-III: polynomial time species tree reconstruction from partially resolved gene trees. *BMC Bioinformatics* 19(Suppl 6):153.\nZhang C, Mirarab S. 2022. Weighting by gene tree uncertainty improves accuracy of quartet-based species trees. *Molecular Biology and Evolution* 39(12):msac215.\nZhang C, Scornavacca C, Molloy EK, Mirarab S. 2020. ASTRAL-Pro: quartet-based species-tree inference despite paralogy. *Molecular Biology and Evolution* 37(11):3292-3307.\nZhang C, Nielsen R, Mirarab S. 2025. ASTER: a package for large-scale phylogenomic reconstructions. *Molecular Biology and Evolution* 42(8):msaf172.\nSayyari E, Mirarab S. 2016. Fast coalescent-based computation of local branch support from quartet frequencies. *Molecular Biology and Evolution* 33(7):1654-1668.\nSayyari E, Mirarab S. 2018. Testing for polytomies in phylogenetic species trees using quartet frequencies. *Genes* 9(3):132.\nChifman J, Kubatko L. 2014. Quartet inference from SNP data under the coalescent model. *Bioinformatics* 30(23):3317-3324.\nFlouri T, Jiao X, Rannala B, Yang Z. 2018. Species tree inference with BPP using genomic sequences and the multispecies coalescent. *Molecular Biology and Evolution* 35(10):2585-2593.\nOgilvie HA, Bouckaert RR, Drummond AJ. 2017. StarBEAST2 brings faster species tree inference and accurate estimates of substitution rates. *Molecular Biology and Evolution* 34(8):2101-2114.\nMinh BQ, Hahn MW, Lanfear R. 2020. New methods to calculate concordance factors for phylogenomic datasets. *Molecular Biology and Evolution* 37(9):2727-2733.\nBlischak PD, Chifman J, Wolfe AD, Kubatko LS. 2018. HyDe: a Python package for genome-scale hybridization detection. *Systematic Biology* 67(5):821-829.\nEdelman NB, Frandsen PB, Miyagi M, et al. 2019. Genomic architecture and introgression shape a butterfly radiation. *Science* 366(6465):594-599.\n\n## Related Skills\n\n- modern-tree-inference - per-locus ML gene trees (ASTRAL input) and gCF\u002FsCF computation\n- bayesian-inference - MCMC convergence and marginal-likelihood checks for full-Bayesian MSC runs (StarBEAST2 itself is not covered there; it is a BEAST2 package, set up via BEAUti)\n- divergence-dating - turning a coalescent-unit species tree into a dated tree\n- tree-io - reading and writing the Newick gene-tree files ASTRAL consumes\n- comparative-genomics\u002Fortholog-inference - single-copy vs multi-copy decision upstream (ASTRAL vs ASTRAL-Pro)\n",{"name":5,"tool_type":24,"description":7,"primary_tool":25},"mixed","ASTRAL-III","main","e0956dc9606356ab78468936b502e55a365282e2","specialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-phylo-species-trees",0,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists","https:\u002F\u002Fgithub.com\u002Fmrsonord2240","2026-10-12 03:19:04",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add mrsonord2240\u002Fopenscience-specialists --skill bio-phylo-species-trees",{"tool":39,"command":40},"bunx","bunx skills add mrsonord2240\u002Fopenscience-specialists --skill bio-phylo-species-trees",{"tool":42,"command":43},"pnpm","pnpm dlx skills add mrsonord2240\u002Fopenscience-specialists --skill bio-phylo-species-trees","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-phylo-species-trees\u002FSKILL.md",true,[47,53],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"examples\u002Fastral_pipeline.sh","SCRIPT","脚本",3966,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-phylo-species-trees\u002Fexamples\u002Fastral_pipeline.sh",{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"usage-guide.md","REFERENCE","参考文档",6939,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fmolecular-phylogenetics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-phylo-species-trees\u002Fusage-guide.md",[60,67,74,81,88,95],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7CW36A6QAGWFE2C008M1XPG","bio-workflows-metabolomics-pipeline","Orchestrates the untargeted LC-MS metabolomics pipeline end-to-end (xcms 4.x feature extraction, QC\u002Fdrift\u002Fnormalization, confidence-stratified annotation, permutation-validated statistics, background-aware pathway mapping), naming what each stage decides and where it silently fails. Use when running a full LC-MS metabolomics study from raw mzML to enriched pathways and needing the honest handoffs between stages. Each stage defers to its component skill for parameters and traps; for stable-isotope flux (a separate branch, not this untargeted flow) see metabolomics\u002Fisotope-tracing.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-workflows-metabolomics-pipeline\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7CW2Y18623NA2S1Y30FRQW1","bio-metabolomics-xcms-preprocessing","Programmatic untargeted LC-MS feature extraction in R with the modern xcms 4.x MsExperiment\u002FXcmsExperiment API, taking raw mzML to a feature table via CentWave peak detection, retention-time alignment, peak-density correspondence, gap-filling, CAMERA redundancy collapse, and built-in QC feature filtering. Use when converting centroided LC-MS runs into a features-by-samples matrix and deciding centWave\u002Fgrouping\u002Falignment parameters. For drift correction and QC\u002FCV filtering execution see metabolomics\u002Fnormalization-qc; for metabolite identification see metabolomics\u002Fmetabolite-annotation; for the MS-DIAL GUI alternative with MS2Dec deconvolution see metabolomics\u002Fmsdial-preprocessing; for downstream statistics see metabolomics\u002Fstatistical-analysis.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-xcms-preprocessing\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7CW2M364HVWPNQEKE2WP4PP","bio-metabolomics-statistical-analysis","Decision-grade statistical analysis for metabolomics intensity tables. Covers transformation and scaling (Pareto vs unit-variance as a hidden hypothesis), unsupervised structure (PCA\u002FHCA for QC), permutation-validated PLS-DA\u002FOPLS-DA (R2 vs Q2, double CV, VIP as heuristic), univariate testing (Welch\u002FMann-Whitney\u002FANOVA\u002FLMM with covariate adjustment), and dependence-aware multiple testing. Use when testing which metabolites differ, building or validating a discriminant model, choosing a scaling, or correcting many correlated tests. For sample-wise normalization\u002Fdrift correction see metabolomics\u002Fnormalization-qc; for ML classifiers and selection-inside-CV leakage see machine-learning\u002Fbiomarker-discovery and machine-learning\u002Fmodel-validation; for pathway interpretation see metabolomics\u002Fpathway-mapping; for design\u002Fpower\u002Fmultiplicity regime see experimental-design\u002Fmultiple-testing.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-statistical-analysis\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7CW2BCBF851WYE03Z8XPEDQ","bio-metabolomics-pathway-mapping","Maps metabolomics results to biological pathways via over-representation (ORA), metabolite-set enrichment (MSEA\u002FQEA), mummichog\u002FPSEA on raw m\u002Fz peaks, and network-diffusion enrichment (FELLA), with correct background-set construction and honest interpretive ceilings. Use when interpreting differential metabolites or an untargeted LC-MS feature table in pathway context, choosing ORA vs MSEA vs mummichog vs topology, or setting the reference\u002Fbackground set. For annotation confidence levels feeding ORA see metabolomics\u002Fmetabolite-annotation; for gene-set concepts see pathway-analysis\u002Fgo-enrichment and pathway-analysis\u002Fgsea; for joint gene+metabolite pathways see multi-omics-integration\u002Fmofa-integration.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-pathway-mapping\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7CW21NSZMCPMF7D9CHJM718","bio-metabolomics-normalization-qc","Designs QC, corrects signal drift, removes batch effects, filters features, normalizes samples, and imputes missing values for untargeted LC-MS\u002FGC-MS metabolomics, framing each step as a measurement model that can create or erase biological signal. Use when processing a peak\u002Ffeature table before statistical analysis, choosing a drift-correction or sample-normalization method, deciding QC RSD vs D-ratio filtering, or handling left-censored missing values. The feature table is produced by metabolomics\u002Fxcms-preprocessing or metabolomics\u002Fmsdial-preprocessing; transformation\u002Fscaling for modeling defers to metabolomics\u002Fstatistical-analysis; cross-study design issues link to experimental-design\u002Fbatch-design.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-normalization-qc\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M7CW1SWVM0NYHVE6Q7MA3G7R","bio-metabolomics-msdial-preprocessing","Runs the MS-DIAL preprocessing workflow (peak picking, MS2Dec spectral deconvolution, alignment, gap-filling) and imports the alignment-result table into R or Python with honest filtering. Use when preprocessing LC-MS DDA\u002FDIA (SWATH) or GC-MS raw data with MS-DIAL, deciding MS-DIAL vs XCMS, configuring the MSDIALCUI console run, or parsing an MS-DIAL export into a clean feature matrix. For programmatic R peak detection and the feature-table-as-artifact framing see metabolomics\u002Fxcms-preprocessing; for lipid annotation mode see metabolomics\u002Flipidomics; for MSI-level confidence honesty see metabolomics\u002Fmetabolite-annotation; for drift correction and QC see metabolomics\u002Fnormalization-qc.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-msdial-preprocessing\u002FSKILL.md",[],[]]