[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EC7VGS9CWVFB6F48GRQVXJ":3,"skill-same:01M7EC7VGS9CWVFB6F48GRQVXJ":62},{"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":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7EC7VGS9CWVFB6F48GRQVXJ","bio-comparative-genomics-gene-tree-species-tree-reconciliation",null,"Reconcile gene trees against a species tree under probabilistic models of duplication, transfer, and loss (DTL) using ALE (Szöllősi 2013 amalgamated likelihood), GeneRax (Morel 2020 ML reconciliation), AleRax (Morel 2024 co-estimation), Whale.jl (Bayesian DL+WGD), RANGER-DTL 2 parsimony, NOTUNG, ecceTERA, and Treerecs. Use when inferring ancestral gene-family content, distinguishing duplication from horizontal transfer from differential loss, rooting deep species trees from gene-content signals (STRIDE \u002F Williams 2017 ALE-rooting), counting DTL events per branch, refining noisy gene trees against a species tree, modeling WGD events jointly with DTL, or producing publication-grade gene-family histories for phylogenomic \u002F comparative analyses.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-comparative-genomics-gene-tree-species-tree-reconciliation\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-comparative-genomics-gene-tree-species-tree-reconciliation\ndescription: Reconcile gene trees against a species tree under probabilistic models of duplication, transfer, and loss (DTL) using ALE (Szöllősi 2013 amalgamated likelihood), GeneRax (Morel 2020 ML reconciliation), AleRax (Morel 2024 co-estimation), Whale.jl (Bayesian DL+WGD), RANGER-DTL 2 parsimony, NOTUNG, ecceTERA, and Treerecs. Use when inferring ancestral gene-family content, distinguishing duplication from horizontal transfer from differential loss, rooting deep species trees from gene-content signals (STRIDE \u002F Williams 2017 ALE-rooting), counting DTL events per branch, refining noisy gene trees against a species tree, modeling WGD events jointly with DTL, or producing publication-grade gene-family histories for phylogenomic \u002F comparative analyses.\ntool_type: cli\nprimary_tool: ALE\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"comparative-genomics\u002Fgene-tree-species-tree-reconciliation\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference examples tested with: ALE 1.0+ (ssolo\u002FALE github), GeneRax 2.1.3+ (BenoitMorel\u002FGeneRax), AleRax 1.2.0+ (BenoitMorel\u002FAleRax; Morel 2024 Bioinformatics 40:btae162), Whale.jl 2.0+ (arzwa\u002FWhale.jl), RANGER-DTL 2.0+ (Bansal lab; Bansal 2018 Bioinformatics 34:3214), NOTUNG 2.9.1.5+ (Stolzer 2012; Chen 2000), ecceTERA 1.2.5+, Treerecs 1.2+, IQ-TREE 2.3.6+, MrBayes 3.2.7+, BUSCO 5.7+, ete4 4.1.0+, BioPython 1.84+. Open Tree of Life and NCBI Taxonomy reference databases at 2024-Q3 minimum for species-tree-aware inference.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `ALEml_undated --help`, `ALEml --help` (dated), `generax --help`, `alerax --help`\n- Julia: `using Whale; Whale.WhaleProblem`; `]status` for package versions\n- Python: `pip show ete4`; `ete4 --help`\n\nIf code throws `species tree mismatch`, `gene tree taxa not in species tree`, or `MPI process pool failure`, these reconciliation tools share strict label-consistency requirements: species labels must match exactly across the species tree and gene trees (case-sensitive, no whitespace), and gene IDs typically encode species via prefix (`species|gene_id` separator convention). Use `sed` \u002F `awk` normalization scripts before reconciliation.\n\n# Gene Tree Species Tree Reconciliation\n\n**\"Where did this gene family come from, and what events shaped its history?\"** -> Reconcile gene trees against species trees under explicit probabilistic models of duplication (D), horizontal transfer (T), and loss (L). The reconciliation framework converts gene-tree-species-tree discordance into a quantitative history of evolutionary events. Modern probabilistic methods (ALE, GeneRax, AleRax) **distinguish gene-tree-error-driven discordance from biological discordance** by integrating over gene-tree uncertainty -- a critical advance over parsimony reconciliation (NOTUNG, RANGER) which treats input gene trees as fixed and inflates duplication\u002Floss counts from gene-tree noise (Boussau 2013 Genome Res 23:323; Morel 2020 MBE 37:2763).\n\n- CLI: `ALEobserve` + `ALEml_undated` -- Bayesian DTL on a sample of gene trees (amalgamated likelihood)\n- CLI: `generax` -- ML reconciliation; refines gene trees jointly with reconciliation\n- CLI: `alerax` -- co-estimation of gene and species trees + DTL rates (Morel 2024)\n- Julia: `using Whale` -- Bayesian DL + WGD modeling\n- CLI: `ranger-dtl` -- parsimony DTL with cost weights\n- CLI: `notung` -- duplication-loss only (DL); user-friendly GUI; legacy\n\n## Algorithmic Taxonomy\n\n| Tool | Approach | Events modeled | Inference | Strength | Fails when |\n|------|----------|----------------|-----------|----------|------------|\n| ALE undated (Szöllősi 2013 Syst Biol 62:901) | Amalgamated likelihood over gene-tree distribution; species-tree-aware | D, T, L | Bayesian | Posterior over D\u002FT\u002FL events at every species-tree branch; integrates over gene-tree uncertainty | Requires gene-tree posterior sample (>= 100 bootstrap\u002FUFBoot trees); slow for many families |\n| ALE dated | Same as undated but uses time-calibrated species tree | D, T, L | Bayesian | Time-aware; better donor inference | Requires dated species tree (BEAST2 \u002F RevBayes calibration) |\n| GeneRax (Morel 2020 MBE 37:2763) | ML reconciliation + joint gene-tree refinement | D, T, L | ML | Faster than ALE; refines noisy gene trees; species-tree-aware | Less uncertainty quantification than ALE |\n| AleRax (Morel 2024 Bioinformatics 40:btae162) | Co-estimation of gene tree, species tree, and DTL rates | D, T, L | Bayesian \u002F ML hybrid | Gold standard 2024; corrects gene-tree-error feedback into species tree | Computationally heaviest; needs >= 20 species |\n| Whale.jl (Zwaenepoel & Van de Peer 2019 MBE 36:1384) | Bayesian DL + WGD via amalgamated likelihood | D, L, WGD | Bayesian (Turing.jl) | Native WGD modeling; modern Bayesian framework | Julia ecosystem dependency |\n| RANGER-DTL 2.0 (Bansal 2018 Bioinformatics 34:3214) | Parsimony DTL with user cost weights (D-cost, T-cost, L-cost) | D, T, L | Parsimony | Fast; deterministic; many gene families per minute | Cost weights are user choices; results sensitive to costs |\n| NOTUNG (Chen 2000 JCB 7:429; Stolzer 2012 Bioinformatics 28:i409) | Parsimony DL; HGT extension | D, L (optional T) | Parsimony | User-friendly GUI; widely used | DL-only by default; HGT extension less rigorous than ALE |\n| ecceTERA (Jacox 2016 Bioinformatics 32:2056) | DTL on input set of trees; sampled + unsampled (\"dead\") lineages | D, T, L | Parsimony \u002F DP | Transfers from extinct\u002Funsampled lineages; cost-sweep mode | No ILS model; less popular than ALE; smaller community |\n| Treerecs (Comte 2020 Bioinformatics 36:4822) | Gene-tree correction\u002Frooting against a fixed species tree | D, L | ML | Refines gene trees by species-tree constraint | No HGT; eukaryote-focused |\n| DLCpar (Wu 2014 GR 24:475) | DLC parsimony for DL + coalescence (ILS) | D, L, C | Parsimony | Models ILS explicitly | No HGT; older |\n| GraphDTL (Tofigh 2011) | Graph algorithm for DTL | D, T, L | Parsimony | Fast on small instances | Less used today |\n| Phyldog (Boussau 2013 GR 23:323) | Joint species-tree-gene-tree DL with site-rate variation | D, L | ML | Joint inference; refines gene trees | Bacteria-unfriendly; eukaryote-only |\n\nMethodology evolves; verify the AleRax \u002F ALE documentation before locking on a single approach. The probabilistic ALE \u002F GeneRax \u002F AleRax tools have largely superseded parsimony reconciliation for serious phylogenomic work; parsimony is fine for screening but not for publication-grade DTL inference.\n\n## Decision Tree by Experimental Scenario\n\n| Scenario | Recommended approach | Why |\n|----------|------------------------|-----|\n| Bacterial \u002F archaeal phylogenomics, 50-500 genomes | GeneRax (refinement) -> ALE undated (posterior) | Two-stage: GeneRax refines, ALE provides posterior |\n| Eukaryote DL inference, no HGT expected | NOTUNG (legacy) or Treerecs | DL is the dominant signal; HGT rare in animals |\n| Mixed prokaryote\u002Feukaryote with HGT | ALE undated | Probabilistic D\u002FT\u002FL; ALE-rooting (Williams 2017) for deep questions |\n| Plant comparative genomics with WGD | Whale.jl | Native WGD modeling; Bayesian |\n| Need uncertainty quantification | ALE or AleRax | Posteriors on every branch; ML methods give point estimates only |\n| Need fastest possible per-family analysis | RANGER-DTL parsimony | Deterministic; multi-gene parallel |\n| Co-estimate species tree from many gene families | AleRax | Modern gold-standard; corrects gene-tree-error |\n| Root a deep species tree from DTL signal | ALE undated rooting (Williams 2017 method) | Root inference from D\u002FT\u002FL event distribution |\n| Detect ancient HGT in archaea \u002F bacteria | ALE undated | Probabilistic T detection at each branch; donor inferred |\n| Identify ancestral gene family content | ALE; report origination events per branch | Posterior over presence\u002Fabsence at internal nodes |\n| Test specific HGT hypothesis (e.g. plant -> nematode) | ALE on filtered OG set; manual gene tree inspection | Quantitative T posterior |\n| Distinguish HGT from differential gene loss | ALE event posteriors (T vs L on candidate branch) | Probabilistic ratio between alternatives |\n| WGD detection alongside DTL | Whale.jl explicit WGD modeling | Joint inference; replaces post hoc Ks plotting |\n| Refine noisy gene trees against species tree | GeneRax `--strategy SPR` | Species-tree-aware gene-tree refinement |\n| Gene family birth-death modeling | See [[gene-family-evolution]] (CAFE5) | Reconciliation is per-family; CAFE5 is across families |\n| Single gene of interest, single species | Manual gene-tree placement; ALE not needed | Reconciliation framework is genome-scale |\n\n## Per-Tool Failure Modes\n\n### Gene-tree-error feedback inflating duplications\n\n**Trigger:** Using GeneRax or ALE with poorly-supported gene trees (low bootstrap, short alignments).\n\n**Mechanism:** Noisy gene trees show spurious topology that, when reconciled, produces apparent duplications-followed-by-losses or transfers. The reconciliation framework cannot distinguish gene-tree noise from real DTL events; the output is biased toward more events (Boussau 2013).\n\n**Symptom:** D + T + L event counts exceed reasonable rates (e.g. > 5 events per gene per Myr in eukaryotes); per-branch event posteriors are diffuse; ALE convergence (in `_uTs` files) is slow.\n\n**Fix:** Use ALE (which integrates over gene-tree posterior sample) rather than GeneRax (which uses a single ML tree). For GeneRax users, provide UFBoot trees with high (`-B 1000`) bootstraps, and refine via `--strategy SPR`. AleRax (Morel 2024) co-estimates gene trees + species tree + DTL rates, addressing this feedback directly.\n\n### Species labels and gene IDs mismatch\n\n**Trigger:** Different naming conventions across gene trees, species tree, and orthology files.\n\n**Mechanism:** Reconciliation tools require species labels in the species tree to match a defined prefix or suffix in each gene ID. Inconsistencies cause silent failures or partial reconciliation.\n\n**Symptom:** ALE fails with \"taxon not in species tree\"; or runs but produces zero reconciliation events; or reconciliation matrix is sparse.\n\n**Fix:** Strict normalization before reconciliation. ALE convention: gene IDs as `species|gene_id` (pipe separator); species labels match the species tree leaf names exactly. Pre-process all gene trees with:\n```bash\nfor tree in gene_trees\u002F*.nwk; do\n    sed -i 's\u002F_gene_\u002F|\u002Fg' \"$tree\"   # adjust separator\ndone\n```\nVerify with `nw_labels -I species_tree.nwk` vs `nw_labels -I gene_trees\u002FOG0000001.nwk` -- both species sets must be subsets of the species tree leaves.\n\n### Cost-weight sensitivity in parsimony reconciliation (RANGER)\n\n**Trigger:** Running RANGER-DTL with default costs (D=2, T=3, L=1).\n\n**Mechanism:** Parsimony reconciliation minimizes total cost; the inferred D \u002F T \u002F L event count depends linearly on these costs. Default costs are biased toward favoring duplication-loss explanations over transfer.\n\n**Symptom:** RANGER reports fewer transfers than ALE\u002FGeneRax on the same data; sensitivity-analysis varies event counts dramatically with cost changes.\n\n**Fix:** Run RANGER with cost sensitivity sweep: D in {1, 2, 3, 4}, T in {1, 2, 3, 4, 5}, L = 1. Report consensus events appearing in all cost combinations. Or move to probabilistic ALE\u002FGeneRax which infers rates from data, not user costs. ecceTERA also allows cost-sweep mode.\n\n### Root sensitivity in ALE undated\n\n**Trigger:** ALE on a species tree with poorly-supported root.\n\n**Mechanism:** ALE undated treats the species tree root as fixed; event posteriors at deepest branches depend on the root location. Wrong root flips D vs T inference at deep nodes.\n\n**Symptom:** Running ALE under multiple candidate rootings (STRIDE, MAD, outgroup) produces qualitatively different event histories at deep branches.\n\n**Fix:** Run ALE under multiple rootings; report only robust events. For deep phylogenomic questions, use ALE-rooting (Williams 2017 PNAS 114:E4602): run ALE under all possible rootings, choose the root maximizing the joint likelihood. AleRax can co-estimate the root, removing this issue.\n\n### WGD events misattributed as duplications\n\n**Trigger:** Reconciliation on a clade with known WGD (vertebrates 2R, fish 3R, salmonids Ss4R, plant lineages).\n\n**Mechanism:** Standard DTL models (ALE, GeneRax) treat WGD as a series of individual duplications; the posterior at the WGD branch is dominated by D events but the joint event is whole-genome.\n\n**Symptom:** D events at the WGD branch are 10-100x higher than other branches; many \"duplications\" cluster temporally.\n\n**Fix:** Use Whale.jl which natively models WGD as a single event with a flexible retention parameter (Zwaenepoel 2019 MBE 36:1384). Otherwise, post hoc identify clusters of synchronized duplications and label as WGD.\n\n### Saturation at deep timescales\n\n**Trigger:** Reconciliation on extremely deep clades (>1 Gyr divergence in bacteria; >500 Myr in eukaryotes).\n\n**Mechanism:** Gene families have undergone many cycles of D, T, L; the observed pattern is consistent with many DTL histories. Parameter identifiability is lost.\n\n**Symptom:** ALE convergence requires hundreds of cycles; posterior on D\u002FT\u002FL rates is uninformative; branch event posteriors are diffuse.\n\n**Fix:** Restrict to subclades with more recent divergence for quantitative DTL claims; for deep questions, qualitative event-class identification only (e.g. \"transfers occurred along this branch\" without precise count). Williams 2017 PNAS 114:E4602 demonstrates how ALE on deep archaeal phylogeny still resolves event class.\n\n### MPI parallelization failures in GeneRax\n\n**Trigger:** Running GeneRax on cluster with many gene families.\n\n**Mechanism:** GeneRax uses MPI to parallelize per-family analysis; misconfigured MPI environment (wrong `srun`\u002F`mpirun`\u002F`mpiexec`, wrong allocator) silently runs serial or hangs.\n\n**Symptom:** GeneRax progresses through few families per hour; cluster CPU usage shows only 1 core per node.\n\n**Fix:** Verify MPI: `mpirun -n 8 hostname` should show 8 different hostnames or threads. Use `--per-family-rates` and proper MPI launch: `mpirun -n $SLURM_NTASKS generax ...`. Reduce `--threads` to 1 per family (let MPI handle parallelism). AleRax uses the same convention.\n\n### ILS misattributed as transfers\n\n**Trigger:** Reconciliation on rapidly radiated clade (incomplete lineage sorting expected).\n\n**Mechanism:** ILS produces gene-tree-species-tree discordance indistinguishable from HGT at short internodes. ALE \u002F GeneRax cannot separate them.\n\n**Symptom:** Many \"transfers\" at short internal branches; transfer rate per branch correlates with branch length (more transfers at short branches).\n\n**Fix:** Use DLCpar, which models deep coalescence (ILS) jointly with duplication and loss; or pre-screen for ILS-likely loci via Dsuite ABBA-BABA (see [[introgression-detection]]); restrict ALE to gene families where ILS unlikely (long internodes). For phylogenomic-scale ILS, use an ASTRAL-Pro2 coalescent species tree as the fixed input to reconciliation.\n\n### Multifurcations in the species tree\n\n**Trigger:** Using a species tree with polytomies (unresolved nodes).\n\n**Mechanism:** ALE \u002F GeneRax \u002F AleRax assume strictly bifurcating species trees; multifurcations break the inference.\n\n**Symptom:** Tool fails with \"polytomy detected\" or runs but produces nonsensical results at multifurcating nodes.\n\n**Fix:** Resolve polytomies before reconciliation via `ape::multi2di()` (random resolution) or with an outgroup-informed resolution (RAxML \u002F ASTRAL-Pro2 on more data). Document the resolution.\n\n## Quantitative Thresholds\n\n| Quantity | Threshold | Source \u002F Rationale |\n|----------|-----------|-------------------|\n| ALE gene-tree sample size | >= 100 bootstrap or UFBoot trees per family | ALE documentation; below this, posterior poorly resolved |\n| Bacterial transfer rate (per gene per branch) | typically 0.001-0.05 in ALE inferences | Szöllősi 2013; varies clade |\n| Eukaryote duplication rate | typically 0.0001-0.005 | eukaryote-specific convention; calibrate per clade |\n| Branch-wise DTL event posterior | > 0.5 for \"called\" event | ssolo\u002FALE convention |\n| Minimum gene families for AleRax | >= 100 families; >= 20 species | Morel 2024 |\n| Minimum species for species-tree rooting via ALE | >= 30 species across the clade | Williams 2017 |\n| GeneRax `--strategy` choices | EVAL only (no refinement), SPR (refinement), HYBRID (random + SPR) | GeneRax docs |\n| RANGER cost weights default | D=2, T=3, L=1 (Bansal 2018) | Sensitivity sweep recommended |\n| Whale.jl MCMC burn-in | >= 1000 samples; convergence by ESS >= 200 | Whale.jl docs |\n| Reasonable runtime per family (ALE) | 1-30 minutes | Modern CPU; varies with gene-tree count |\n| Reasonable runtime per family (GeneRax) | 0.1-5 minutes | Modern CPU; SPR is slower than EVAL |\n| Maximum families per AleRax run | \u003C 5000 (computational) | Above this, partition |\n| Species labels case-sensitivity | strict; case mismatch = silent failure | Universal convention |\n| Gene-ID separator | ALE \u002F GeneRax accept a single-character separator via `separators=\"X\"` (commonly `|` or `_`); Whale.jl uses a mapping file. Verify per-tool. | Tool-specific |\n| Transfer branch detection minimum support | branch posterior > 0.5 + AU test on alternative placement | Conservative publication-grade |\n| Distinguish T from L | T posterior - L posterior on candidate branch | Subtraction approach; ALE outputs both |\n\n## ALE Standard Workflow\n\n**Goal:** Quantify D\u002FT\u002FL events per branch of a species tree, integrating gene-tree uncertainty.\n\n**Approach:** Build UFBoot gene trees per orthogroup -> `ALEobserve` to encode tree samples -> `ALEml_undated` for reconciliation -> aggregate per-branch event posteriors.\n\n```bash\n# 1. Build UFBoot gene trees per orthogroup\nmkdir -p gene_trees\nfor og in orthogroups\u002F*.fa; do\n    base=$(basename $og .fa)\n    iqtree2 -s $og -m TEST -B 1000 -nt 2 --prefix gene_trees\u002F$base\ndone\n\n# 2. Encode for ALE\nfor ufb in gene_trees\u002F*.ufboot; do\n    ALEobserve $ufb\ndone\n# Produces gene_trees\u002F*.ale files\n\n# 3. Reconcile against species tree\nmkdir -p reconciled\nfor ale in gene_trees\u002F*.ale; do\n    ALEml_undated species_tree.nwk $ale \\\n        separators=\"|\" \\\n        sample=100 \\\n        output_format=newick\n    mv ${ale%.*}_*.uml ${ale%.*}.uml\n    mv ${ale%.*}_*.uTs ${ale%.*}.uTs\ndone\n\n# 4. Aggregate branch-wise events\npython aggregate_ale_events.py reconciled\u002F > branch_events.tsv\n```\n\n```python\n'''Aggregate ALE outputs per species-tree branch.'''\nimport glob\nfrom collections import defaultdict\nimport pandas as pd\n\n\ndef parse_uts(path):\n    '''ALE _uTs format: branch  duplications  transfers  losses  originations  speciations.'''\n    rows = []\n    with open(path) as fh:\n        for ln in fh:\n            if ln.startswith('#') or not ln.strip():\n                continue\n            parts = ln.split()\n            if len(parts) >= 5:\n                rows.append({\n                    'branch_id': parts[0],\n                    'duplications': float(parts[1]),\n                    'transfers': float(parts[2]),\n                    'losses': float(parts[3]),\n                    'originations': float(parts[4]),\n                })\n    return pd.DataFrame(rows)\n\n\ndef aggregate(reconciled_dir):\n    agg = defaultdict(lambda: defaultdict(float))\n    for uts in glob.glob(f'{reconciled_dir}\u002F*.uTs'):\n        df = parse_uts(uts)\n        family = uts.split('\u002F')[-1].split('.')[0]\n        for _, row in df.iterrows():\n            for event in ('duplications', 'transfers', 'losses', 'originations'):\n                agg[row['branch_id']][event] += row[event]\n    return pd.DataFrame(agg).T.fillna(0)\n\n\nbranch_events = aggregate('reconciled')\nprint(branch_events.sort_values('transfers', ascending=False).head(20))\n```\n\n## GeneRax for ML Reconciliation with Refinement\n\n**Goal:** Reconcile gene trees against a species tree while jointly refining noisy gene trees.\n\n**Approach:** Provide gene trees + alignments + species tree -> GeneRax SPR strategy refines each gene tree -> reconciliation produces D\u002FT\u002FL history.\n\n```bash\n# Prepare families file (one line per family with paths)\ncat > families.txt \u003C\u003C 'EOF'\n[FAMILIES]\n- OG0000001\nstarting_gene_tree = gene_trees\u002FOG0000001.nwk\nalignment = alignments\u002FOG0000001.fa\nmapping = mapping.txt\nsubst_model = GTR+G\n- OG0000002\nstarting_gene_tree = gene_trees\u002FOG0000002.nwk\nalignment = alignments\u002FOG0000002.fa\nmapping = mapping.txt\nsubst_model = GTR+G\nEOF\n\n# Mapping file: gene_id  species_label\n# One line per gene\ngenerate_mapping.py orthogroups.tsv > mapping.txt\n\n# Run GeneRax with SPR refinement\nmpirun -n 16 generax \\\n    --families families.txt \\\n    --species-tree species_tree.nwk \\\n    --rec-model UndatedDTL \\\n    --strategy SPR \\\n    --prefix generax_run \\\n    --per-family-rates \\\n    --max-spr-radius 5\n\n# Output:\n#   generax_run\u002Fresults\u002F\u003Cfamily>\u002FinferredGeneTree.newick  refined gene tree\n#   generax_run\u002Fresults\u002F\u003Cfamily>\u002Freconciliation.nhx       reconciliation in NHX format\n#   generax_run\u002Fspecies_trees\u002Fspecies_tree.newick         species tree (with optional re-rooting)\n#   generax_run\u002Ffamilies.txt                              refined families\n```\n\n## AleRax Co-Estimation\n\n**Goal:** Co-estimate gene trees, species tree, and DTL rates from gene-family alignments.\n\n**Approach:** Provide alignments + initial species tree -> AleRax runs joint Bayesian \u002F ML co-estimation.\n\n```bash\n# Prepare AleRax families file (similar to GeneRax but with bootstrap trees)\ncat > families.txt \u003C\u003C 'EOF'\n[FAMILIES]\n- OG0000001\nstarting_gene_tree = gene_trees\u002FOG0000001.ufboot\nalignment = alignments\u002FOG0000001.fa\nmapping = mapping.txt\nsubst_model = GTR+G\nEOF\n\nmpirun -n 32 alerax \\\n    --families families.txt \\\n    --species-tree initial_species_tree.nwk \\\n    --rec-model UndatedDTL \\\n    --output alerax_run \\\n    --gene-tree-samples 100 \\\n    --species-tree-samples 1\n```\n\nAleRax outputs include `alerax_run\u002Finferred_species_tree.nwk` (possibly re-rooted; D\u002FT\u002FL-aware) and per-family reconciled gene trees.\n\n## Whale.jl Bayesian DL + WGD\n\n**Goal:** Bayesian DTL inference with explicit WGD modeling.\n\n**Approach:** Define species tree with WGD nodes -> Whale.jl posterior over D\u002FL + WGD retention.\n\n```julia\n# IMPORTANT: Whale.jl public API evolves; verify against current docs at\n# https:\u002F\u002Fgithub.com\u002Farzwa\u002FWhale.jl before scripting. The sketch below is\n# illustrative; introspect via `?WhaleModel`, `?WhaleProblem`, `?read_ale`.\nusing Whale, NewickTree, Distributions, DynamicHMC\n\n# Read species tree (Whale uses readnw or SlicedTree)\nspecies_tree = readnw(read(\"species_with_wgd.nwk\", String))\n\n# Define rates model and WGD retention parameters\n# Whale parameterization: λ (duplication), μ (loss), q (WGD retention per WGD node), ρ (sampling)\n# The exact constructor signature is package-version-dependent; see ?WhaleModel\nrates = ConstantDLWGD(λ=0.1, μ=0.1, q=Dict(1=>0.3), η=0.66)\n\n# Read amalgamated gene-tree distributions (a directory of .ale files)\nale_dir = \"families\u002F\"\nale_data = read_ale(ale_dir, species_tree)\n\n# Build problem and sample with DynamicHMC (verify with current Whale.jl examples)\nproblem = WhaleProblem(ale_data, species_tree, rates)\nresults = mcmc(problem, n=1000)\n```\n\n**Operational note:** the Whale.jl 2.x DSL has moved between releases; do NOT copy-paste this without verifying with `?` on the actual installed version. Reference examples live in the upstream `examples\u002F` directory.\n\n## Reconciliation: When Methods Disagree\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| ALE high transfer posterior, RANGER low | Cost weights in RANGER bias against T | Trust ALE; sensitivity-sweep RANGER costs |\n| GeneRax fewer events than ALE | GeneRax uses ML on single tree; ALE integrates over tree distribution | Trust ALE; GeneRax may have underestimated due to gene-tree uncertainty |\n| AleRax revises species tree from initial guess | Gene-tree-error feedback was biasing initial estimate | Trust AleRax (co-estimation corrects feedback) |\n| Whale.jl WGD posterior high; ALE shows duplication burst | Same event; Whale models as WGD with retention parameter | Whale.jl interpretation is more biological for clades with known WGD |\n| NOTUNG DL reconciliation contradicts ALE | NOTUNG ignores T; ALE includes T | Trust ALE for HGT-affected clades |\n| Same family: D in one tool, T in another | Boundary case; both events possible | Report both with explicit caveats; or use AleRax for joint co-estimation |\n| Many \"transfers\" at short internal branches | ILS confounded with T | Switch to DLCpar (or an ASTRAL-Pro2 coalescent species tree) for ILS-aware inference |\n| ALE posterior diffuse across branches | Saturated; very ancient family or short tree | Restrict to subclade; or report event class only |\n| GeneRax fails on 1% of families | Specific orthology \u002F alignment issue | Inspect failed families manually; often related to species-label mismatch |\n\n**Operational rule for publication:** ALE with 100+ bootstrap gene trees + Bayesian event posteriors > 0.5 + multiple-rooting robustness + biological corroboration (e.g. HGT predictions cross-checked with composition \u002F [[hgt-detection]]) = publication-grade DTL inference. Single parsimony reconciliation (RANGER, NOTUNG) is appropriate for screening but should be backed by ALE for published claims.\n\n## Cohort Gotchas\n\n- **Bacterial clades with rampant HGT (e.g. Enterobacteriaceae, Streptomyces):** ALE transfer posteriors will dominate; calibrate expected per-branch transfer rate against published values (Szöllősi 2013; Williams 2017)\n- **Endosymbionts with genome reduction (Buchnera, Wolbachia):** rampant gene loss; loss rates may exceed all other events; calibrate against known biology\n- **Salmonid 4R Ss4R WGD:** add WGD node to species tree before reconciliation; use Whale.jl with native WGD parameter; treating Ss4R as duplication burst inflates DL counts\n- **Plant tetraploids:** subgenome assignment first ([[whole-genome-duplication]]); reconcile each subgenome lineage separately\n- **Rapid radiations (cichlids, Drosophila species groups, hominoids):** ILS confounded with transfers; use ASTRAL-Pro2 coalescent species tree as input; or apply DLCpar for explicit duplication-loss-coalescence reconciliation\n- **Polyploid lineages with WGD-derived \"extra\" genes:** appear as duplications in DTL methods; AleRax with WGD node specification handles this; Whale.jl native\n\n## Anticipated Reviewer Pushback\n\n| Pushback | Standard response |\n|----------|-------------------|\n| \"Gene-tree uncertainty?\" | ALE integrates over 100+ UFBoot trees per family; AleRax co-estimates |\n| \"Species tree rooting?\" | ALE-rooting (Williams 2017) under multiple candidate rooting hypotheses; events robust across rootings reported |\n| \"ILS vs HGT?\" | Tested via ABBA-BABA \u002F Dsuite; or used DLCpar for joint duplication-loss-coalescence inference |\n| \"WGD vs DL?\" | Whale.jl native WGD modeling for known-WGD lineages; otherwise WGD node added explicitly |\n| \"Why ALE over RANGER?\" | RANGER is cost-sensitive parsimony; ALE provides posterior probabilities |\n| \"Why AleRax over ALE?\" | AleRax co-estimates gene tree + species tree + DTL rates, correcting gene-tree-error feedback; preferred for publication-grade work since 2024 |\n| \"ILS at rapid radiation?\" | ILS-aware reconciliation (DLCpar); or restrict to gene families with long internodes |\n| \"Cost weight sensitivity (RANGER)?\" | If RANGER used, sensitivity sweep across cost weights performed; consensus events reported |\n| \"Contamination?\" | Pre-filtered with FCS-GX \u002F BlobTools (cross-ref [[hgt-detection]]) |\n| \"Gene-tree quality?\" | UFBoot bootstrap >= 95 average; PREQUAL \u002F HmmCleaner alignment filter applied |\n| \"Species sampling?\" | At least 30 species for ALE-rooting; clade-balanced sampling reported |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| ALEml \"taxon not found\" | Species label mismatch | Normalize labels exactly; verify with `nw_labels` |\n| GeneRax MPI hangs | Wrong MPI launcher; per-thread vs per-process confusion | Use `mpirun -n $NTASKS generax --threads 1`; check `mpirun -n 4 hostname` |\n| ALE convergence slow \u002F never | Insufficient gene-tree samples | Increase UFBoot samples to 1000; verify each `.ale` file has >= 100 trees |\n| Whale.jl Turing sampling fails | NUTS step-size; tree dimension high | Try `HMC()` with manual tuning; or scale down number of WGD nodes |\n| RANGER outputs single most-parsimonious history | One MPR returned by default | Run with `--explore-mpr` for multiple equally parsimonious histories |\n| AleRax species tree differs from initial | Co-estimation revised it (intended) | Use AleRax's tree; report initial vs refined |\n| Reconciliation gives 1000 events on a 5-gene family | Numerical instability or bad input | Inspect family for paralog confusion or sequence error |\n| Per-branch event posterior > 1.0 | Multiple events on same branch | Expected for high-DTL-rate branches; sum over event classes |\n| NOTUNG DL counts vastly exceed ALE D + L counts | NOTUNG attributes T events to L (no T model) | Use ALE for HGT-affected clades |\n| DLCpar over-calls deep coalescence (ILS) across many nodes | ILS\u002Fcoalescence cost too permissive | Restrict ILS-aware analysis to known short-internode regions; re-check cost settings |\n\n## Tool Installation Notes\n\n```bash\n# ALE (C++)\ngit clone https:\u002F\u002Fgithub.com\u002Fssolo\u002FALE && cd ALE && mkdir build && cd build && cmake .. && make\n# Or via bioconda\nconda install -c bioconda ale\n\n# GeneRax (with MPI)\ngit clone --recursive https:\u002F\u002Fgithub.com\u002FBenoitMorel\u002FGeneRax && cd GeneRax && .\u002Finstall.sh\n\n# AleRax\ngit clone --recursive https:\u002F\u002Fgithub.com\u002FBenoitMorel\u002FAleRax && cd AleRax && .\u002Finstall.sh\n\n# Whale.jl (Julia)\njulia -e 'using Pkg; Pkg.add(\"Whale\")'\n\n# RANGER-DTL\nwget https:\u002F\u002Fcompbio.engr.uconn.edu\u002Fsoftware\u002FRANGER-DTL\u002FRANGER-DTL-Linux.tar.gz\ntar xf RANGER-DTL-Linux.tar.gz\n\n# NOTUNG\nwget https:\u002F\u002Fwww.cs.cmu.edu\u002F~durand\u002FNotung\u002Fdownload\u002FNotung-2.9.1.5.tar.gz\n\n# ecceTERA\ngit clone https:\u002F\u002Fgithub.com\u002Fcchauve\u002FecceTERA && cd ecceTERA && make\n\n# Treerecs\nconda install -c bioconda treerecs\n\n# Newick utilities (label inspection)\nconda install -c bioconda newick_utils\n```\n\nFor cluster deployment, AleRax \u002F GeneRax require MPI; verify `mpicc --version` and run a small `hostname` test before deploying to genome-scale data.\n\n## References\n\n- Szöllősi GJ et al 2013 Syst Biol 62:901 (ALE undated)\n- Szöllősi GJ et al 2015 Syst Biol 64:e42 (ALE rooting concept)\n- Morel B et al 2020 MBE 37:2763 (GeneRax)\n- Morel B et al 2024 Bioinformatics 40:btae162 (AleRax co-estimation)\n- Williams TA et al 2017 PNAS 114:E4602 (ALE-rooting of the archaeal tree of life)\n- Zwaenepoel A & Van de Peer Y 2019 MBE 36:1384 (Whale.jl Bayesian DL+WGD)\n- Bansal MS et al 2018 Bioinformatics 34:3214 (RANGER-DTL 2.0)\n- Chen K et al 2000 J Comp Biol 7:429 (NOTUNG)\n- Stolzer M et al 2012 Bioinformatics 28:i409 (NOTUNG-HGT extension)\n- Jacox E et al 2016 Bioinformatics 32:2056 (ecceTERA)\n- Comte N et al 2020 Bioinformatics 36:4822 (Treerecs)\n- Wu Y-C et al 2014 GR 24:475 (DLCpar)\n- Boussau B et al 2013 Genome Res 23:323 (Phyldog joint inference)\n- Sjöstrand J et al 2012 Bioinformatics 28:2994 (PrIME-DLRS Bayesian)\n- Tofigh A, Hallett M & Lagergren J 2011 IEEE\u002FACM TCBB 8:517 (DTL graph algorithm)\n- Maddison WP 1997 Syst Biol 46:523 (gene tree discordance causes)\n- Rabier C-E et al 2014 MBE 31:750 (rate inference under WGD)\n- Tria FDK et al 2017 Nat Eco Evo 1:0193 (MAD rooting alternative)\n- Emms DM & Kelly S 2017 MBE 34:3267 (STRIDE rooting)\n\n## Related Skills\n\n- comparative-genomics\u002Fhgt-detection - DTL reconciliation underlies probabilistic HGT inference\n- comparative-genomics\u002Fortholog-inference - Orthogroups feed reconciliation pipeline\n- comparative-genomics\u002Fgene-family-evolution - CAFE5 birth-death across families (complementary to per-family reconciliation)\n- comparative-genomics\u002Fwhole-genome-duplication - WGD modeling in Whale.jl\n- comparative-genomics\u002Fancestral-reconstruction - DTL informs ancestral gene-content inference\n- phylogenetics\u002Fmodern-tree-inference - UFBoot bootstrap gene trees for ALE input\n- phylogenetics\u002Fbayesian-inference - MrBayes \u002F RevBayes alternative gene-tree posteriors\n- phylogenetics\u002Fspecies-trees - ASTRAL-Pro2 coalescent species tree as ALE\u002FAleRax input\n- alignment\u002Fmultiple-alignment - High-quality MSA precedes gene-tree inference\n- alignment\u002Falignment-trimming - PREQUAL \u002F HmmCleaner for clean gene trees\n","## Version Compatibility\n\nReference examples tested with: ALE 1.0+ (ssolo\u002FALE github), GeneRax 2.1.3+ (BenoitMorel\u002FGeneRax), AleRax 1.2.0+ (BenoitMorel\u002FAleRax; Morel 2024 Bioinformatics 40:btae162), Whale.jl 2.0+ (arzwa\u002FWhale.jl), RANGER-DTL 2.0+ (Bansal lab; Bansal 2018 Bioinformatics 34:3214), NOTUNG 2.9.1.5+ (Stolzer 2012; Chen 2000), ecceTERA 1.2.5+, Treerecs 1.2+, IQ-TREE 2.3.6+, MrBayes 3.2.7+, BUSCO 5.7+, ete4 4.1.0+, BioPython 1.84+. Open Tree of Life and NCBI Taxonomy reference databases at 2024-Q3 minimum for species-tree-aware inference.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `ALEml_undated --help`, `ALEml --help` (dated), `generax --help`, `alerax --help`\n- Julia: `using Whale; Whale.WhaleProblem`; `]status` for package versions\n- Python: `pip show ete4`; `ete4 --help`\n\nIf code throws `species tree mismatch`, `gene tree taxa not in species tree`, or `MPI process pool failure`, these reconciliation tools share strict label-consistency requirements: species labels must match exactly across the species tree and gene trees (case-sensitive, no whitespace), and gene IDs typically encode species via prefix (`species|gene_id` separator convention). Use `sed` \u002F `awk` normalization scripts before reconciliation.\n\n# Gene Tree Species Tree Reconciliation\n\n**\"Where did this gene family come from, and what events shaped its history?\"** -> Reconcile gene trees against species trees under explicit probabilistic models of duplication (D), horizontal transfer (T), and loss (L). The reconciliation framework converts gene-tree-species-tree discordance into a quantitative history of evolutionary events. Modern probabilistic methods (ALE, GeneRax, AleRax) **distinguish gene-tree-error-driven discordance from biological discordance** by integrating over gene-tree uncertainty -- a critical advance over parsimony reconciliation (NOTUNG, RANGER) which treats input gene trees as fixed and inflates duplication\u002Floss counts from gene-tree noise (Boussau 2013 Genome Res 23:323; Morel 2020 MBE 37:2763).\n\n- CLI: `ALEobserve` + `ALEml_undated` -- Bayesian DTL on a sample of gene trees (amalgamated likelihood)\n- CLI: `generax` -- ML reconciliation; refines gene trees jointly with reconciliation\n- CLI: `alerax` -- co-estimation of gene and species trees + DTL rates (Morel 2024)\n- Julia: `using Whale` -- Bayesian DL + WGD modeling\n- CLI: `ranger-dtl` -- parsimony DTL with cost weights\n- CLI: `notung` -- duplication-loss only (DL); user-friendly GUI; legacy\n\n## Algorithmic Taxonomy\n\n| Tool | Approach | Events modeled | Inference | Strength | Fails when |\n|------|----------|----------------|-----------|----------|------------|\n| ALE undated (Szöllősi 2013 Syst Biol 62:901) | Amalgamated likelihood over gene-tree distribution; species-tree-aware | D, T, L | Bayesian | Posterior over D\u002FT\u002FL events at every species-tree branch; integrates over gene-tree uncertainty | Requires gene-tree posterior sample (>= 100 bootstrap\u002FUFBoot trees); slow for many families |\n| ALE dated | Same as undated but uses time-calibrated species tree | D, T, L | Bayesian | Time-aware; better donor inference | Requires dated species tree (BEAST2 \u002F RevBayes calibration) |\n| GeneRax (Morel 2020 MBE 37:2763) | ML reconciliation + joint gene-tree refinement | D, T, L | ML | Faster than ALE; refines noisy gene trees; species-tree-aware | Less uncertainty quantification than ALE |\n| AleRax (Morel 2024 Bioinformatics 40:btae162) | Co-estimation of gene tree, species tree, and DTL rates | D, T, L | Bayesian \u002F ML hybrid | Gold standard 2024; corrects gene-tree-error feedback into species tree | Computationally heaviest; needs >= 20 species |\n| Whale.jl (Zwaenepoel & Van de Peer 2019 MBE 36:1384) | Bayesian DL + WGD via amalgamated likelihood | D, L, WGD | Bayesian (Turing.jl) | Native WGD modeling; modern Bayesian framework | Julia ecosystem dependency |\n| RANGER-DTL 2.0 (Bansal 2018 Bioinformatics 34:3214) | Parsimony DTL with user cost weights (D-cost, T-cost, L-cost) | D, T, L | Parsimony | Fast; deterministic; many gene families per minute | Cost weights are user choices; results sensitive to costs |\n| NOTUNG (Chen 2000 JCB 7:429; Stolzer 2012 Bioinformatics 28:i409) | Parsimony DL; HGT extension | D, L (optional T) | Parsimony | User-friendly GUI; widely used | DL-only by default; HGT extension less rigorous than ALE |\n| ecceTERA (Jacox 2016 Bioinformatics 32:2056) | DTL on input set of trees; sampled + unsampled (\"dead\") lineages | D, T, L | Parsimony \u002F DP | Transfers from extinct\u002Funsampled lineages; cost-sweep mode | No ILS model; less popular than ALE; smaller community |\n| Treerecs (Comte 2020 Bioinformatics 36:4822) | Gene-tree correction\u002Frooting against a fixed species tree | D, L | ML | Refines gene trees by species-tree constraint | No HGT; eukaryote-focused |\n| DLCpar (Wu 2014 GR 24:475) | DLC parsimony for DL + coalescence (ILS) | D, L, C | Parsimony | Models ILS explicitly | No HGT; older |\n| GraphDTL (Tofigh 2011) | Graph algorithm for DTL | D, T, L | Parsimony | Fast on small instances | Less used today |\n| Phyldog (Boussau 2013 GR 23:323) | Joint species-tree-gene-tree DL with site-rate variation | D, L | ML | Joint inference; refines gene trees | Bacteria-unfriendly; eukaryote-only |\n\nMethodology evolves; verify the AleRax \u002F ALE documentation before locking on a single approach. The probabilistic ALE \u002F GeneRax \u002F AleRax tools have largely superseded parsimony reconciliation for serious phylogenomic work; parsimony is fine for screening but not for publication-grade DTL inference.\n\n## Decision Tree by Experimental Scenario\n\n| Scenario | Recommended approach | Why |\n|----------|------------------------|-----|\n| Bacterial \u002F archaeal phylogenomics, 50-500 genomes | GeneRax (refinement) -> ALE undated (posterior) | Two-stage: GeneRax refines, ALE provides posterior |\n| Eukaryote DL inference, no HGT expected | NOTUNG (legacy) or Treerecs | DL is the dominant signal; HGT rare in animals |\n| Mixed prokaryote\u002Feukaryote with HGT | ALE undated | Probabilistic D\u002FT\u002FL; ALE-rooting (Williams 2017) for deep questions |\n| Plant comparative genomics with WGD | Whale.jl | Native WGD modeling; Bayesian |\n| Need uncertainty quantification | ALE or AleRax | Posteriors on every branch; ML methods give point estimates only |\n| Need fastest possible per-family analysis | RANGER-DTL parsimony | Deterministic; multi-gene parallel |\n| Co-estimate species tree from many gene families | AleRax | Modern gold-standard; corrects gene-tree-error |\n| Root a deep species tree from DTL signal | ALE undated rooting (Williams 2017 method) | Root inference from D\u002FT\u002FL event distribution |\n| Detect ancient HGT in archaea \u002F bacteria | ALE undated | Probabilistic T detection at each branch; donor inferred |\n| Identify ancestral gene family content | ALE; report origination events per branch | Posterior over presence\u002Fabsence at internal nodes |\n| Test specific HGT hypothesis (e.g. plant -> nematode) | ALE on filtered OG set; manual gene tree inspection | Quantitative T posterior |\n| Distinguish HGT from differential gene loss | ALE event posteriors (T vs L on candidate branch) | Probabilistic ratio between alternatives |\n| WGD detection alongside DTL | Whale.jl explicit WGD modeling | Joint inference; replaces post hoc Ks plotting |\n| Refine noisy gene trees against species tree | GeneRax `--strategy SPR` | Species-tree-aware gene-tree refinement |\n| Gene family birth-death modeling | See [[gene-family-evolution]] (CAFE5) | Reconciliation is per-family; CAFE5 is across families |\n| Single gene of interest, single species | Manual gene-tree placement; ALE not needed | Reconciliation framework is genome-scale |\n\n## Per-Tool Failure Modes\n\n### Gene-tree-error feedback inflating duplications\n\n**Trigger:** Using GeneRax or ALE with poorly-supported gene trees (low bootstrap, short alignments).\n\n**Mechanism:** Noisy gene trees show spurious topology that, when reconciled, produces apparent duplications-followed-by-losses or transfers. The reconciliation framework cannot distinguish gene-tree noise from real DTL events; the output is biased toward more events (Boussau 2013).\n\n**Symptom:** D + T + L event counts exceed reasonable rates (e.g. > 5 events per gene per Myr in eukaryotes); per-branch event posteriors are diffuse; ALE convergence (in `_uTs` files) is slow.\n\n**Fix:** Use ALE (which integrates over gene-tree posterior sample) rather than GeneRax (which uses a single ML tree). For GeneRax users, provide UFBoot trees with high (`-B 1000`) bootstraps, and refine via `--strategy SPR`. AleRax (Morel 2024) co-estimates gene trees + species tree + DTL rates, addressing this feedback directly.\n\n### Species labels and gene IDs mismatch\n\n**Trigger:** Different naming conventions across gene trees, species tree, and orthology files.\n\n**Mechanism:** Reconciliation tools require species labels in the species tree to match a defined prefix or suffix in each gene ID. Inconsistencies cause silent failures or partial reconciliation.\n\n**Symptom:** ALE fails with \"taxon not in species tree\"; or runs but produces zero reconciliation events; or reconciliation matrix is sparse.\n\n**Fix:** Strict normalization before reconciliation. ALE convention: gene IDs as `species|gene_id` (pipe separator); species labels match the species tree leaf names exactly. Pre-process all gene trees with:\n```bash\nfor tree in gene_trees\u002F*.nwk; do\n    sed -i 's\u002F_gene_\u002F|\u002Fg' \"$tree\"   # adjust separator\ndone\n```\nVerify with `nw_labels -I species_tree.nwk` vs `nw_labels -I gene_trees\u002FOG0000001.nwk` -- both species sets must be subsets of the species tree leaves.\n\n### Cost-weight sensitivity in parsimony reconciliation (RANGER)\n\n**Trigger:** Running RANGER-DTL with default costs (D=2, T=3, L=1).\n\n**Mechanism:** Parsimony reconciliation minimizes total cost; the inferred D \u002F T \u002F L event count depends linearly on these costs. Default costs are biased toward favoring duplication-loss explanations over transfer.\n\n**Symptom:** RANGER reports fewer transfers than ALE\u002FGeneRax on the same data; sensitivity-analysis varies event counts dramatically with cost changes.\n\n**Fix:** Run RANGER with cost sensitivity sweep: D in {1, 2, 3, 4}, T in {1, 2, 3, 4, 5}, L = 1. Report consensus events appearing in all cost combinations. Or move to probabilistic ALE\u002FGeneRax which infers rates from data, not user costs. ecceTERA also allows cost-sweep mode.\n\n### Root sensitivity in ALE undated\n\n**Trigger:** ALE on a species tree with poorly-supported root.\n\n**Mechanism:** ALE undated treats the species tree root as fixed; event posteriors at deepest branches depend on the root location. Wrong root flips D vs T inference at deep nodes.\n\n**Symptom:** Running ALE under multiple candidate rootings (STRIDE, MAD, outgroup) produces qualitatively different event histories at deep branches.\n\n**Fix:** Run ALE under multiple rootings; report only robust events. For deep phylogenomic questions, use ALE-rooting (Williams 2017 PNAS 114:E4602): run ALE under all possible rootings, choose the root maximizing the joint likelihood. AleRax can co-estimate the root, removing this issue.\n\n### WGD events misattributed as duplications\n\n**Trigger:** Reconciliation on a clade with known WGD (vertebrates 2R, fish 3R, salmonids Ss4R, plant lineages).\n\n**Mechanism:** Standard DTL models (ALE, GeneRax) treat WGD as a series of individual duplications; the posterior at the WGD branch is dominated by D events but the joint event is whole-genome.\n\n**Symptom:** D events at the WGD branch are 10-100x higher than other branches; many \"duplications\" cluster temporally.\n\n**Fix:** Use Whale.jl which natively models WGD as a single event with a flexible retention parameter (Zwaenepoel 2019 MBE 36:1384). Otherwise, post hoc identify clusters of synchronized duplications and label as WGD.\n\n### Saturation at deep timescales\n\n**Trigger:** Reconciliation on extremely deep clades (>1 Gyr divergence in bacteria; >500 Myr in eukaryotes).\n\n**Mechanism:** Gene families have undergone many cycles of D, T, L; the observed pattern is consistent with many DTL histories. Parameter identifiability is lost.\n\n**Symptom:** ALE convergence requires hundreds of cycles; posterior on D\u002FT\u002FL rates is uninformative; branch event posteriors are diffuse.\n\n**Fix:** Restrict to subclades with more recent divergence for quantitative DTL claims; for deep questions, qualitative event-class identification only (e.g. \"transfers occurred along this branch\" without precise count). Williams 2017 PNAS 114:E4602 demonstrates how ALE on deep archaeal phylogeny still resolves event class.\n\n### MPI parallelization failures in GeneRax\n\n**Trigger:** Running GeneRax on cluster with many gene families.\n\n**Mechanism:** GeneRax uses MPI to parallelize per-family analysis; misconfigured MPI environment (wrong `srun`\u002F`mpirun`\u002F`mpiexec`, wrong allocator) silently runs serial or hangs.\n\n**Symptom:** GeneRax progresses through few families per hour; cluster CPU usage shows only 1 core per node.\n\n**Fix:** Verify MPI: `mpirun -n 8 hostname` should show 8 different hostnames or threads. Use `--per-family-rates` and proper MPI launch: `mpirun -n $SLURM_NTASKS generax ...`. Reduce `--threads` to 1 per family (let MPI handle parallelism). AleRax uses the same convention.\n\n### ILS misattributed as transfers\n\n**Trigger:** Reconciliation on rapidly radiated clade (incomplete lineage sorting expected).\n\n**Mechanism:** ILS produces gene-tree-species-tree discordance indistinguishable from HGT at short internodes. ALE \u002F GeneRax cannot separate them.\n\n**Symptom:** Many \"transfers\" at short internal branches; transfer rate per branch correlates with branch length (more transfers at short branches).\n\n**Fix:** Use DLCpar, which models deep coalescence (ILS) jointly with duplication and loss; or pre-screen for ILS-likely loci via Dsuite ABBA-BABA (see [[introgression-detection]]); restrict ALE to gene families where ILS unlikely (long internodes). For phylogenomic-scale ILS, use an ASTRAL-Pro2 coalescent species tree as the fixed input to reconciliation.\n\n### Multifurcations in the species tree\n\n**Trigger:** Using a species tree with polytomies (unresolved nodes).\n\n**Mechanism:** ALE \u002F GeneRax \u002F AleRax assume strictly bifurcating species trees; multifurcations break the inference.\n\n**Symptom:** Tool fails with \"polytomy detected\" or runs but produces nonsensical results at multifurcating nodes.\n\n**Fix:** Resolve polytomies before reconciliation via `ape::multi2di()` (random resolution) or with an outgroup-informed resolution (RAxML \u002F ASTRAL-Pro2 on more data). Document the resolution.\n\n## Quantitative Thresholds\n\n| Quantity | Threshold | Source \u002F Rationale |\n|----------|-----------|-------------------|\n| ALE gene-tree sample size | >= 100 bootstrap or UFBoot trees per family | ALE documentation; below this, posterior poorly resolved |\n| Bacterial transfer rate (per gene per branch) | typically 0.001-0.05 in ALE inferences | Szöllősi 2013; varies clade |\n| Eukaryote duplication rate | typically 0.0001-0.005 | eukaryote-specific convention; calibrate per clade |\n| Branch-wise DTL event posterior | > 0.5 for \"called\" event | ssolo\u002FALE convention |\n| Minimum gene families for AleRax | >= 100 families; >= 20 species | Morel 2024 |\n| Minimum species for species-tree rooting via ALE | >= 30 species across the clade | Williams 2017 |\n| GeneRax `--strategy` choices | EVAL only (no refinement), SPR (refinement), HYBRID (random + SPR) | GeneRax docs |\n| RANGER cost weights default | D=2, T=3, L=1 (Bansal 2018) | Sensitivity sweep recommended |\n| Whale.jl MCMC burn-in | >= 1000 samples; convergence by ESS >= 200 | Whale.jl docs |\n| Reasonable runtime per family (ALE) | 1-30 minutes | Modern CPU; varies with gene-tree count |\n| Reasonable runtime per family (GeneRax) | 0.1-5 minutes | Modern CPU; SPR is slower than EVAL |\n| Maximum families per AleRax run | \u003C 5000 (computational) | Above this, partition |\n| Species labels case-sensitivity | strict; case mismatch = silent failure | Universal convention |\n| Gene-ID separator | ALE \u002F GeneRax accept a single-character separator via `separators=\"X\"` (commonly `|` or `_`); Whale.jl uses a mapping file. Verify per-tool. | Tool-specific |\n| Transfer branch detection minimum support | branch posterior > 0.5 + AU test on alternative placement | Conservative publication-grade |\n| Distinguish T from L | T posterior - L posterior on candidate branch | Subtraction approach; ALE outputs both |\n\n## ALE Standard Workflow\n\n**Goal:** Quantify D\u002FT\u002FL events per branch of a species tree, integrating gene-tree uncertainty.\n\n**Approach:** Build UFBoot gene trees per orthogroup -> `ALEobserve` to encode tree samples -> `ALEml_undated` for reconciliation -> aggregate per-branch event posteriors.\n\n```bash\n# 1. Build UFBoot gene trees per orthogroup\nmkdir -p gene_trees\nfor og in orthogroups\u002F*.fa; do\n    base=$(basename $og .fa)\n    iqtree2 -s $og -m TEST -B 1000 -nt 2 --prefix gene_trees\u002F$base\ndone\n\n# 2. Encode for ALE\nfor ufb in gene_trees\u002F*.ufboot; do\n    ALEobserve $ufb\ndone\n# Produces gene_trees\u002F*.ale files\n\n# 3. Reconcile against species tree\nmkdir -p reconciled\nfor ale in gene_trees\u002F*.ale; do\n    ALEml_undated species_tree.nwk $ale \\\n        separators=\"|\" \\\n        sample=100 \\\n        output_format=newick\n    mv ${ale%.*}_*.uml ${ale%.*}.uml\n    mv ${ale%.*}_*.uTs ${ale%.*}.uTs\ndone\n\n# 4. Aggregate branch-wise events\npython aggregate_ale_events.py reconciled\u002F > branch_events.tsv\n```\n\n```python\n'''Aggregate ALE outputs per species-tree branch.'''\nimport glob\nfrom collections import defaultdict\nimport pandas as pd\n\n\ndef parse_uts(path):\n    '''ALE _uTs format: branch  duplications  transfers  losses  originations  speciations.'''\n    rows = []\n    with open(path) as fh:\n        for ln in fh:\n            if ln.startswith('#') or not ln.strip():\n                continue\n            parts = ln.split()\n            if len(parts) >= 5:\n                rows.append({\n                    'branch_id': parts[0],\n                    'duplications': float(parts[1]),\n                    'transfers': float(parts[2]),\n                    'losses': float(parts[3]),\n                    'originations': float(parts[4]),\n                })\n    return pd.DataFrame(rows)\n\n\ndef aggregate(reconciled_dir):\n    agg = defaultdict(lambda: defaultdict(float))\n    for uts in glob.glob(f'{reconciled_dir}\u002F*.uTs'):\n        df = parse_uts(uts)\n        family = uts.split('\u002F')[-1].split('.')[0]\n        for _, row in df.iterrows():\n            for event in ('duplications', 'transfers', 'losses', 'originations'):\n                agg[row['branch_id']][event] += row[event]\n    return pd.DataFrame(agg).T.fillna(0)\n\n\nbranch_events = aggregate('reconciled')\nprint(branch_events.sort_values('transfers', ascending=False).head(20))\n```\n\n## GeneRax for ML Reconciliation with Refinement\n\n**Goal:** Reconcile gene trees against a species tree while jointly refining noisy gene trees.\n\n**Approach:** Provide gene trees + alignments + species tree -> GeneRax SPR strategy refines each gene tree -> reconciliation produces D\u002FT\u002FL history.\n\n```bash\n# Prepare families file (one line per family with paths)\ncat > families.txt \u003C\u003C 'EOF'\n[FAMILIES]\n- OG0000001\nstarting_gene_tree = gene_trees\u002FOG0000001.nwk\nalignment = alignments\u002FOG0000001.fa\nmapping = mapping.txt\nsubst_model = GTR+G\n- OG0000002\nstarting_gene_tree = gene_trees\u002FOG0000002.nwk\nalignment = alignments\u002FOG0000002.fa\nmapping = mapping.txt\nsubst_model = GTR+G\nEOF\n\n# Mapping file: gene_id  species_label\n# One line per gene\ngenerate_mapping.py orthogroups.tsv > mapping.txt\n\n# Run GeneRax with SPR refinement\nmpirun -n 16 generax \\\n    --families families.txt \\\n    --species-tree species_tree.nwk \\\n    --rec-model UndatedDTL \\\n    --strategy SPR \\\n    --prefix generax_run \\\n    --per-family-rates \\\n    --max-spr-radius 5\n\n# Output:\n#   generax_run\u002Fresults\u002F\u003Cfamily>\u002FinferredGeneTree.newick  refined gene tree\n#   generax_run\u002Fresults\u002F\u003Cfamily>\u002Freconciliation.nhx       reconciliation in NHX format\n#   generax_run\u002Fspecies_trees\u002Fspecies_tree.newick         species tree (with optional re-rooting)\n#   generax_run\u002Ffamilies.txt                              refined families\n```\n\n## AleRax Co-Estimation\n\n**Goal:** Co-estimate gene trees, species tree, and DTL rates from gene-family alignments.\n\n**Approach:** Provide alignments + initial species tree -> AleRax runs joint Bayesian \u002F ML co-estimation.\n\n```bash\n# Prepare AleRax families file (similar to GeneRax but with bootstrap trees)\ncat > families.txt \u003C\u003C 'EOF'\n[FAMILIES]\n- OG0000001\nstarting_gene_tree = gene_trees\u002FOG0000001.ufboot\nalignment = alignments\u002FOG0000001.fa\nmapping = mapping.txt\nsubst_model = GTR+G\nEOF\n\nmpirun -n 32 alerax \\\n    --families families.txt \\\n    --species-tree initial_species_tree.nwk \\\n    --rec-model UndatedDTL \\\n    --output alerax_run \\\n    --gene-tree-samples 100 \\\n    --species-tree-samples 1\n```\n\nAleRax outputs include `alerax_run\u002Finferred_species_tree.nwk` (possibly re-rooted; D\u002FT\u002FL-aware) and per-family reconciled gene trees.\n\n## Whale.jl Bayesian DL + WGD\n\n**Goal:** Bayesian DTL inference with explicit WGD modeling.\n\n**Approach:** Define species tree with WGD nodes -> Whale.jl posterior over D\u002FL + WGD retention.\n\n```julia\n# IMPORTANT: Whale.jl public API evolves; verify against current docs at\n# https:\u002F\u002Fgithub.com\u002Farzwa\u002FWhale.jl before scripting. The sketch below is\n# illustrative; introspect via `?WhaleModel`, `?WhaleProblem`, `?read_ale`.\nusing Whale, NewickTree, Distributions, DynamicHMC\n\n# Read species tree (Whale uses readnw or SlicedTree)\nspecies_tree = readnw(read(\"species_with_wgd.nwk\", String))\n\n# Define rates model and WGD retention parameters\n# Whale parameterization: λ (duplication), μ (loss), q (WGD retention per WGD node), ρ (sampling)\n# The exact constructor signature is package-version-dependent; see ?WhaleModel\nrates = ConstantDLWGD(λ=0.1, μ=0.1, q=Dict(1=>0.3), η=0.66)\n\n# Read amalgamated gene-tree distributions (a directory of .ale files)\nale_dir = \"families\u002F\"\nale_data = read_ale(ale_dir, species_tree)\n\n# Build problem and sample with DynamicHMC (verify with current Whale.jl examples)\nproblem = WhaleProblem(ale_data, species_tree, rates)\nresults = mcmc(problem, n=1000)\n```\n\n**Operational note:** the Whale.jl 2.x DSL has moved between releases; do NOT copy-paste this without verifying with `?` on the actual installed version. Reference examples live in the upstream `examples\u002F` directory.\n\n## Reconciliation: When Methods Disagree\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| ALE high transfer posterior, RANGER low | Cost weights in RANGER bias against T | Trust ALE; sensitivity-sweep RANGER costs |\n| GeneRax fewer events than ALE | GeneRax uses ML on single tree; ALE integrates over tree distribution | Trust ALE; GeneRax may have underestimated due to gene-tree uncertainty |\n| AleRax revises species tree from initial guess | Gene-tree-error feedback was biasing initial estimate | Trust AleRax (co-estimation corrects feedback) |\n| Whale.jl WGD posterior high; ALE shows duplication burst | Same event; Whale models as WGD with retention parameter | Whale.jl interpretation is more biological for clades with known WGD |\n| NOTUNG DL reconciliation contradicts ALE | NOTUNG ignores T; ALE includes T | Trust ALE for HGT-affected clades |\n| Same family: D in one tool, T in another | Boundary case; both events possible | Report both with explicit caveats; or use AleRax for joint co-estimation |\n| Many \"transfers\" at short internal branches | ILS confounded with T | Switch to DLCpar (or an ASTRAL-Pro2 coalescent species tree) for ILS-aware inference |\n| ALE posterior diffuse across branches | Saturated; very ancient family or short tree | Restrict to subclade; or report event class only |\n| GeneRax fails on 1% of families | Specific orthology \u002F alignment issue | Inspect failed families manually; often related to species-label mismatch |\n\n**Operational rule for publication:** ALE with 100+ bootstrap gene trees + Bayesian event posteriors > 0.5 + multiple-rooting robustness + biological corroboration (e.g. HGT predictions cross-checked with composition \u002F [[hgt-detection]]) = publication-grade DTL inference. Single parsimony reconciliation (RANGER, NOTUNG) is appropriate for screening but should be backed by ALE for published claims.\n\n## Cohort Gotchas\n\n- **Bacterial clades with rampant HGT (e.g. Enterobacteriaceae, Streptomyces):** ALE transfer posteriors will dominate; calibrate expected per-branch transfer rate against published values (Szöllősi 2013; Williams 2017)\n- **Endosymbionts with genome reduction (Buchnera, Wolbachia):** rampant gene loss; loss rates may exceed all other events; calibrate against known biology\n- **Salmonid 4R Ss4R WGD:** add WGD node to species tree before reconciliation; use Whale.jl with native WGD parameter; treating Ss4R as duplication burst inflates DL counts\n- **Plant tetraploids:** subgenome assignment first ([[whole-genome-duplication]]); reconcile each subgenome lineage separately\n- **Rapid radiations (cichlids, Drosophila species groups, hominoids):** ILS confounded with transfers; use ASTRAL-Pro2 coalescent species tree as input; or apply DLCpar for explicit duplication-loss-coalescence reconciliation\n- **Polyploid lineages with WGD-derived \"extra\" genes:** appear as duplications in DTL methods; AleRax with WGD node specification handles this; Whale.jl native\n\n## Anticipated Reviewer Pushback\n\n| Pushback | Standard response |\n|----------|-------------------|\n| \"Gene-tree uncertainty?\" | ALE integrates over 100+ UFBoot trees per family; AleRax co-estimates |\n| \"Species tree rooting?\" | ALE-rooting (Williams 2017) under multiple candidate rooting hypotheses; events robust across rootings reported |\n| \"ILS vs HGT?\" | Tested via ABBA-BABA \u002F Dsuite; or used DLCpar for joint duplication-loss-coalescence inference |\n| \"WGD vs DL?\" | Whale.jl native WGD modeling for known-WGD lineages; otherwise WGD node added explicitly |\n| \"Why ALE over RANGER?\" | RANGER is cost-sensitive parsimony; ALE provides posterior probabilities |\n| \"Why AleRax over ALE?\" | AleRax co-estimates gene tree + species tree + DTL rates, correcting gene-tree-error feedback; preferred for publication-grade work since 2024 |\n| \"ILS at rapid radiation?\" | ILS-aware reconciliation (DLCpar); or restrict to gene families with long internodes |\n| \"Cost weight sensitivity (RANGER)?\" | If RANGER used, sensitivity sweep across cost weights performed; consensus events reported |\n| \"Contamination?\" | Pre-filtered with FCS-GX \u002F BlobTools (cross-ref [[hgt-detection]]) |\n| \"Gene-tree quality?\" | UFBoot bootstrap >= 95 average; PREQUAL \u002F HmmCleaner alignment filter applied |\n| \"Species sampling?\" | At least 30 species for ALE-rooting; clade-balanced sampling reported |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| ALEml \"taxon not found\" | Species label mismatch | Normalize labels exactly; verify with `nw_labels` |\n| GeneRax MPI hangs | Wrong MPI launcher; per-thread vs per-process confusion | Use `mpirun -n $NTASKS generax --threads 1`; check `mpirun -n 4 hostname` |\n| ALE convergence slow \u002F never | Insufficient gene-tree samples | Increase UFBoot samples to 1000; verify each `.ale` file has >= 100 trees |\n| Whale.jl Turing sampling fails | NUTS step-size; tree dimension high | Try `HMC()` with manual tuning; or scale down number of WGD nodes |\n| RANGER outputs single most-parsimonious history | One MPR returned by default | Run with `--explore-mpr` for multiple equally parsimonious histories |\n| AleRax species tree differs from initial | Co-estimation revised it (intended) | Use AleRax's tree; report initial vs refined |\n| Reconciliation gives 1000 events on a 5-gene family | Numerical instability or bad input | Inspect family for paralog confusion or sequence error |\n| Per-branch event posterior > 1.0 | Multiple events on same branch | Expected for high-DTL-rate branches; sum over event classes |\n| NOTUNG DL counts vastly exceed ALE D + L counts | NOTUNG attributes T events to L (no T model) | Use ALE for HGT-affected clades |\n| DLCpar over-calls deep coalescence (ILS) across many nodes | ILS\u002Fcoalescence cost too permissive | Restrict ILS-aware analysis to known short-internode regions; re-check cost settings |\n\n## Tool Installation Notes\n\n```bash\n# ALE (C++)\ngit clone https:\u002F\u002Fgithub.com\u002Fssolo\u002FALE && cd ALE && mkdir build && cd build && cmake .. && make\n# Or via bioconda\nconda install -c bioconda ale\n\n# GeneRax (with MPI)\ngit clone --recursive https:\u002F\u002Fgithub.com\u002FBenoitMorel\u002FGeneRax && cd GeneRax && .\u002Finstall.sh\n\n# AleRax\ngit clone --recursive https:\u002F\u002Fgithub.com\u002FBenoitMorel\u002FAleRax && cd AleRax && .\u002Finstall.sh\n\n# Whale.jl (Julia)\njulia -e 'using Pkg; Pkg.add(\"Whale\")'\n\n# RANGER-DTL\nwget https:\u002F\u002Fcompbio.engr.uconn.edu\u002Fsoftware\u002FRANGER-DTL\u002FRANGER-DTL-Linux.tar.gz\ntar xf RANGER-DTL-Linux.tar.gz\n\n# NOTUNG\nwget https:\u002F\u002Fwww.cs.cmu.edu\u002F~durand\u002FNotung\u002Fdownload\u002FNotung-2.9.1.5.tar.gz\n\n# ecceTERA\ngit clone https:\u002F\u002Fgithub.com\u002Fcchauve\u002FecceTERA && cd ecceTERA && make\n\n# Treerecs\nconda install -c bioconda treerecs\n\n# Newick utilities (label inspection)\nconda install -c bioconda newick_utils\n```\n\nFor cluster deployment, AleRax \u002F GeneRax require MPI; verify `mpicc --version` and run a small `hostname` test before deploying to genome-scale data.\n\n## References\n\n- Szöllősi GJ et al 2013 Syst Biol 62:901 (ALE undated)\n- Szöllősi GJ et al 2015 Syst Biol 64:e42 (ALE rooting concept)\n- Morel B et al 2020 MBE 37:2763 (GeneRax)\n- Morel B et al 2024 Bioinformatics 40:btae162 (AleRax co-estimation)\n- Williams TA et al 2017 PNAS 114:E4602 (ALE-rooting of the archaeal tree of life)\n- Zwaenepoel A & Van de Peer Y 2019 MBE 36:1384 (Whale.jl Bayesian DL+WGD)\n- Bansal MS et al 2018 Bioinformatics 34:3214 (RANGER-DTL 2.0)\n- Chen K et al 2000 J Comp Biol 7:429 (NOTUNG)\n- Stolzer M et al 2012 Bioinformatics 28:i409 (NOTUNG-HGT extension)\n- Jacox E et al 2016 Bioinformatics 32:2056 (ecceTERA)\n- Comte N et al 2020 Bioinformatics 36:4822 (Treerecs)\n- Wu Y-C et al 2014 GR 24:475 (DLCpar)\n- Boussau B et al 2013 Genome Res 23:323 (Phyldog joint inference)\n- Sjöstrand J et al 2012 Bioinformatics 28:2994 (PrIME-DLRS Bayesian)\n- Tofigh A, Hallett M & Lagergren J 2011 IEEE\u002FACM TCBB 8:517 (DTL graph algorithm)\n- Maddison WP 1997 Syst Biol 46:523 (gene tree discordance causes)\n- Rabier C-E et al 2014 MBE 31:750 (rate inference under WGD)\n- Tria FDK et al 2017 Nat Eco Evo 1:0193 (MAD rooting alternative)\n- Emms DM & Kelly S 2017 MBE 34:3267 (STRIDE rooting)\n\n## Related Skills\n\n- comparative-genomics\u002Fhgt-detection - DTL reconciliation underlies probabilistic HGT inference\n- comparative-genomics\u002Fortholog-inference - Orthogroups feed reconciliation pipeline\n- comparative-genomics\u002Fgene-family-evolution - CAFE5 birth-death across families (complementary to per-family reconciliation)\n- comparative-genomics\u002Fwhole-genome-duplication - WGD modeling in Whale.jl\n- comparative-genomics\u002Fancestral-reconstruction - DTL informs ancestral gene-content inference\n- phylogenetics\u002Fmodern-tree-inference - UFBoot bootstrap gene trees for ALE input\n- phylogenetics\u002Fbayesian-inference - MrBayes \u002F RevBayes alternative gene-tree posteriors\n- phylogenetics\u002Fspecies-trees - ASTRAL-Pro2 coalescent species tree as ALE\u002FAleRax input\n- alignment\u002Fmultiple-alignment - High-quality MSA precedes gene-tree inference\n- alignment\u002Falignment-trimming - PREQUAL \u002F HmmCleaner for clean gene trees\n",{"name":5,"source":24,"license":15,"tool_type":25,"description":7,"imported_at":26,"source_path":27,"primary_tool":28,"source_repository":29},"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills","cli","2026-09-20","comparative-genomics\u002Fgene-tree-species-tree-reconciliation\u002FSKILL.md","ALE","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-comparative-genomics-gene-tree-species-tree-reconciliation","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-comparative-genomics-gene-tree-species-tree-reconciliation",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-comparative-genomics-gene-tree-species-tree-reconciliation",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-comparative-genomics-gene-tree-species-tree-reconciliation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-comparative-genomics-gene-tree-species-tree-reconciliation\u002FSKILL.md",true,[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Fale_dtl_reconciliation.sh","SCRIPT","脚本",2747,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-comparative-genomics-gene-tree-species-tree-reconciliation\u002Fexamples\u002Fale_dtl_reconciliation.sh",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"usage-guide.md","REFERENCE","参考文档",5850,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-comparative-genomics-gene-tree-species-tree-reconciliation\u002Fusage-guide.md",[63,71,78,85,92,99],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":70},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":70},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":70},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":70},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":70},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":70},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]