bio-comparative-genomics-whole-genome-duplication
Detect, date, and contextualize whole-genome duplication (WGD / paleopolyploidy) events using wgd v2 (Chen & Zwaenepoel 2024), KsRates (Sensalari 2022 substitution-rate-corrected Ks dating), DupGen_finder (Qiao 2019), MAPS (Li 2018 phylogenomic), POInT (Conant 2008 ordered-block), SLEDGe (2024 ML-based), Whale.jl (Bayesian DTL+WGD), and synteny-anchored paranome construction. Use when identifying ancient polyploidy from Ks distributions and synteny block analysis, positioning WGD events relative to speciation, distinguishing tandem from segmental from WGD duplications, dating the 2R/3R vertebrate / fish / salmonid WGDs, building paranome and Ks-age mixture models, applying KsRates substitution-rate correction across lineages, or testing alternative biased-fractionation / dosage-balance models post-WGD.
What this skill does
## Version Compatibility
Reference examples tested with: wgd v2.0.31+ (heche-psb/wgd; Chen & Zwaenepoel 2024 Bioinformatics 40:btae272), KsRates 1.1.3+ (VIB-PSB/ksrates; Sensalari 2022 Bioinformatics 38:530), DupGen_finder (Qiao 2019 Genome Biol 20:38), MAPS 1.0 (Li 2018), POInT (Conant lab), SLEDGe (bioRxiv 2024.01.17.574559), Whale.jl 2.0+, ksrates pip 1.1+, MCScanX 1.0+, PAML 4.10+ (yn00/codeml for Ks), BLAT 36+, DIAMOND 2.1+, R 4.4+, mclust 6.1+ (for mixture models). Python 3.10+ required for wgd v2.
Before using code patterns, verify installed versions match. If versions differ:
- CLI: `wgd --version`; `ksrates --version`; `wgd ksd --help`
- Python: `pip show wgd ksrates`
- R: `packageVersion('mclust')`
If code throws `wgd ksd: cannot find PAML output`, `KsRates: insufficient sister species`, `MAPS: missing tree`, these tools have specific input expectations: wgd needs codon-aware MAFFT/MUSCLE alignment; KsRates needs configured `config_ksrates.txt`; MAPS needs nucleotide tree. The deprecated arzwa/wgd v1 is replaced by heche-psb/wgd v2.
# Whole Genome Duplication Analysis
**"Are there WGD events in this lineage and when did they occur?"** -> WGD detection combines **Ks distributions** (synonymous-substitution rates between gene paralog pairs, showing peaks at past polyploidy events) and **synteny block analysis** (parallel collinear blocks within a genome). Modern best practice uses **wgd v2** (Chen & Zwaenepoel 2024 Bioinformatics 40:btae272) as an integrated pipeline. **KsRates** (Sensalari 2022 Bioinformatics 38:530) is mandatory for cross-lineage comparison because substitution rates vary across the tree -- ignoring this places WGDs incorrectly relative to speciation events. The fundamental tradeoff: Ks plot peaks are visually obvious but biologically ambiguous between (1) small-scale tandem duplications, (2) segmental duplications, and (3) true WGD; combining Ks with synteny anchors disambiguates these.
- CLI: `wgd dmd` and `wgd ksd` -- paranome construction + Ks distribution
- CLI: `wgd syn` -- synteny-anchored WGD signal extraction
- CLI: `ksrates init` then `ksrates wgd-paralogs ortho` -- substitution-rate-corrected positioning
- CLI: `MCScanX -h` then `dupgen_finder` -- duplication-class assignment
- CLI: `mapsR` -- gene-tree-based WGD phylogenetic placement
## Algorithmic Taxonomy
| Tool | Approach | Output | Strength | Fails when |
|------|----------|--------|----------|------------|
| wgd v2 (Chen & Zwaenepoel 2024 Bioinformatics 40:btae272) | Integrated paranome + Ks + synteny + WGD dating | Ks distributions, collinearity plots, GMM/ELMM mixture fits, dating | Standard 2024 pipeline; replaces deprecated arzwa/wgd v1 | Saturation at Ks > 2; single-lineage substitution rate variation |
| KsRates (Sensalari 2022 Bioinformatics 38:530) | Substitution-rate correction via outgroup pairs | Adjusted Ks ages of focal-species paralogs vs orthologs | MANDATORY when comparing WGDs across lineages with different rates | Requires at least 2 outgroups for rate calibration |
| DupGen_finder (Qiao 2019 Genome Biol 20:38) | Classifies duplications by genomic context | Per-gene class: tandem, proximal, dispersed, segmental, WGD | Disambiguates duplication type | Class assignment depends on intervening-gene-count windows |
| MAPS (Li 2018) | Phylogenomic placement of WGD via gene-tree topology mapping | WGD position on species tree | Detects WGDs from gene-tree-species-tree discordance | Computationally heavy; requires many gene trees |
| POInT (Conant 2008 Genome Res 18:1597) | Order-aware reconstruction of WGD chromosomes | Reconstructed ancestral WGD genome | Strong inference for syntenic-block ages | Lineage-specific tuning required |
| SLEDGe (bioRxiv 2024.01.17.574559) | ML classifier on Ks plot features | WGD vs no-WGD binary call + confidence | Reduces visual-peak-fitting subjectivity | Newer; less validated |
| wgd v1 (arzwa/wgd; DEPRECATED) | Predecessor of v2 | -- | Historical | Use v2 (heche-psb/wgd) |
| dupHMM (Zwaenepoel 2019 different MBE paper) | HMM on Ks for WGD/SSD attribution | Per-pair WGD/SSD classification | Probabilistic disambiguation | Less integrated than wgd v2 |
| Whale.jl (Zwaenepoel & Van de Peer 2019 MBE 36:1384) | Bayesian DTL + WGD reconciliation | WGD posterior at species-tree nodes | Native WGD modeling; integrates with [[gene-tree-species-tree-reconciliation]] | Julia ecosystem |
| WGDexploreR (legacy) | Visualize Ks plots | Plots only | Visualization aid | Not for inference |
| McLuster-WGD (custom workflows) | Mixture-model fitting on Ks | GMM / ELMM components | For custom peak fitting | Not a standard tool |
| ksrates web (sensalari 2022) | Web interface to ksrates | Same as CLI | User-friendly | Manual config; not scriptable for genome-wide |
| FastKaKs (Kang 2017) | Fast Ks computation for many pairs | Ks values per pair | Faster than PAML yn00 | Slightly less accurate; for screening |
| wgs2pep (Vandepoele/wgs) | Pep-to-WGD ortholog identification | Per-paralog WGD assignment | Plant-focused | Less general |
Methodology evolves; verify the current wgd v2 manual and the Cheng & Zwaenepoel 2024 review chapter (in *Polyploidy: Methods and Protocols*) before locking on a single workflow. The 2R vertebrate / 3R teleost / Ss4R salmonid WGDs are well-established; novel WGD claims require concordance across Ks, synteny, and phylogenomic placement.
## Decision Tree by Experimental Scenario
| Scenario | Recommended approach | Why |
|----------|------------------------|-----|
| Plant comparative genomics; suspect WGD | wgd v2 + KsRates | Modern standard pipeline; plants are WGD-prone |
| Vertebrate 2R or 3R WGD analysis | wgd v2 + MAPS phylogenomic placement | Vertebrate-specific; combines Ks + tree topology |
| Salmonid Ss4R WGD | Whale.jl with WGD node in species tree | Native WGD modeling in Bayesian framework |
| Distinguish WGD from sequential small duplications | Ks GMM fit + synteny block analysis (wgd syn) | Ks peak alone insufficient; synteny confirms |
| Date WGD relative to a speciation event | KsRates with outgroup speciation calibration | Required when substitution rates differ |
| Identify duplicates retained vs lost after WGD | DupGen_finder + Ks distribution | Classification + age estimation |
| Detect novel WGD in non-model organism | wgd dmd -> wgd ksd -> visual GMM/ELMM mixture | Standard discovery workflow |
| Reconstruct ancestral WGD genome architecture | POInT | Order-aware ancestral reconstruction |
| Test post-WGD bias in fractionation (dosage-balance) | DupGen_finder + per-gene functional annotation | Compare retained vs lost genes |
| Distinguish recent vs ancient WGD | KsRates + Ks peak location after correction | Ks peak < 0.1 recent; 0.5-1.5 ancient |
| WGD in clade with rapid evolution (e.g. fish) | KsRates mandatory | Without rate correction, Ks peaks displaced |
| ML classification of WGD signal | SLEDGe | Newer ML-based alternative to manual fitting |
| Integrate WGD with DTL inference | Whale.jl OR ALE with WGD branch | See [[gene-tree-species-tree-reconciliation]] |
| Pan-clade WGD survey (e.g. all angiosperms) | wgd v2 batch + ksrates aggregated | Standard for sustained phylogenomic surveys |
| Polyploid genome with subgenomes | DupGen_finder for tandem/segmental + AnchorWave proali for subgenome-aware synteny | Subgenome assignment first |
| Recently diverged species pair, possible recent WGD | minimap2 -x asm5 + SyRI + Ks distribution | High-resolution recent-WGD detection |
## Per-Tool Failure Modes
### Saturation at Ks > 2
**Trigger:** Computing Ks for ancient WGD candidates from distantly related taxa.
**Mechanism:** Synonymous substitutions saturate after Ks ~2; each site has undergone multiple substitutions. Observed Ks underestimates true Ks; the relationship between Ks and time becomes non-monotonic above 1.5. WGD peaks at age 200+ Myr in vertebrates / 100+ Myr in plants are at Ks > 2 and unreliable (Vanneste 2013 GR 23:1304).
**Symptom:** wgd ksd output Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.