[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EC71NE2Z7CZFZM5CV7GHBM":3,"skill-same:01M7EC71NE2Z7CZFZM5CV7GHBM":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},"01M7EC71NE2Z7CZFZM5CV7GHBM","bio-comparative-genomics-comparative-annotation-projection",null,"Project gene annotations across genomes using TOGA (Kirilenko 2023 whole-genome-alignment chain-based projection with intactness classification), CESAR 2.0 (Sharma, Schwede & Hiller 2017 codon-aware exon projection), LiftOff (Shumate & Salzberg 2021 reference-based annotation transfer), Liftover (UCSC), GeMoMa (Keilwagen 2019 evidence-based projection), and Comparative Annotation Toolkit (CAT). Use when transferring annotations from a well-annotated reference to query genome(s), classifying gene-loss vs gene-intact across many genomes at scale, building Zoonomia-style comparative annotations across hundreds of mammals or birds (Kirilenko 2023), detecting pseudogenization, projecting alternative isoforms, or selecting between WGA-anchored (TOGA) vs ortholog-based (LiftOff) annotation transfer strategies.","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-comparative-annotation-projection\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-comparative-genomics-comparative-annotation-projection\ndescription: Project gene annotations across genomes using TOGA (Kirilenko 2023 whole-genome-alignment chain-based projection with intactness classification), CESAR 2.0 (Sharma, Schwede & Hiller 2017 codon-aware exon projection), LiftOff (Shumate & Salzberg 2021 reference-based annotation transfer), Liftover (UCSC), GeMoMa (Keilwagen 2019 evidence-based projection), and Comparative Annotation Toolkit (CAT). Use when transferring annotations from a well-annotated reference to query genome(s), classifying gene-loss vs gene-intact across many genomes at scale, building Zoonomia-style comparative annotations across hundreds of mammals or birds (Kirilenko 2023), detecting pseudogenization, projecting alternative isoforms, or selecting between WGA-anchored (TOGA) vs ortholog-based (LiftOff) annotation transfer strategies.\ntool_type: cli\nprimary_tool: TOGA\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"comparative-genomics\u002Fcomparative-annotation-projection\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference examples tested with: TOGA 1.1.7+ (hillerlab\u002FTOGA; Kirilenko 2023 Science 380:eabn3107), CESAR 2.0 (Sharma, Schwede & Hiller 2017 Bioinformatics 33:3985), LiftOff 1.6.3+ (Shumate & Salzberg 2021 Bioinformatics 37(12):1639-1643), Comparative Annotation Toolkit (CAT) 2.4+, GeMoMa 1.9+ (Keilwagen 2019 Methods Mol Biol 1962:161), UCSC liftOver 2024+, Cactus 2.9.1+ (for HAL input), HAL toolkit 2.3+, NextFlow 24+ for TOGA pipeline, BUSCO 5.7+ \u002F Compleasm 0.2.7+ for QC, Luigi + Toil for CAT, R 4.4+. The current TOGA expects HAL from Cactus 2.5+; older HAL formats may fail.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `toga.py --help`; `cesar --help`; `liftoff --version`\n- Python: `pip show liftoff`\n- Java: `gemoma --help` (Java 11+)\n\nIf code throws `TOGA chain file missing`, `CESAR fragment not found`, `LiftOff annotation not parsed`, the toolchain expects specific input formats: TOGA needs HAL or chain\u002Fnet files from Cactus \u002F LASTZ; CESAR needs exon-level GFF; LiftOff needs reference GFF and aligned FASTA. Pre-process with the appropriate format conversion.\n\n# Comparative Annotation Projection\n\n**\"Annotate this new genome using my well-annotated reference\"** -> Annotation projection from a reference is the modern alternative to de novo gene prediction; it produces high-quality, comparable annotations across genomes by leveraging evolutionary conservation. The 2023-era standard is **TOGA + CESAR 2.0** (Kirilenko 2023 Science 380:eabn3107), which uses whole-genome alignment chains + ML classification + codon-aware exon projection to scale to hundreds of genomes (Zoonomia: 488 mammals; Bird10000 Genomes: 501 birds). For ortholog-based projection (no WGA needed), **LiftOff** (Shumate & Salzberg 2021 Bioinformatics 37(12):1639) is the standard. The critical decision is **WGA-anchored (TOGA) vs ortholog-anchored (LiftOff)**: TOGA explicitly classifies gene intactness vs loss using the alignment chains, LiftOff relies on reciprocal-best-hit equivalents.\n\n- CLI: `toga.py --chain chain.bb --bed ref.bed --tDB target.2bit --qDB query.2bit --pn project_name` -- WGA-based projection\n- CLI: `cesar -i exons.fa -d 4 -o output.aln` -- codon-aware exon alignment (used internally by TOGA)\n- CLI: `liftoff -g ref.gff query.fa ref.fa -o query.gff` -- ortholog-based projection\n- CLI: `gemoma` -- evidence-based comparative annotation (Java)\n- CLI: `cat` (Comparative Annotation Toolkit) -- multi-species annotation projection\n\n## Algorithmic Taxonomy\n\n| Tool | Approach | Output | Strength | Fails when |\n|------|----------|--------|----------|------------|\n| TOGA (Kirilenko 2023 Science 380:eabn3107) | Cactus HAL or LASTZ chains -> ML projection + intactness classifier | Per-gene I\u002FPI\u002FUL\u002FL\u002FM\u002FPM codes; orthology classification; coding annotation via CESAR 2.0 | Modern paradigm; explicit gene-loss detection at scale; Zoonomia \u002F Bird10000 standard | Requires Cactus WGA; not for prokaryotes |\n| CESAR 2.0 (Sharma, Schwede & Hiller 2017 Bioinformatics 33:3985) | HMM-based codon-aware exon projection | Aligned exons + frame preservation | Most accurate exon projection from WGA; preserves frame across indels | Used internally by TOGA; standalone use more rare |\n| LiftOff (Shumate & Salzberg 2021 Bioinformatics 37(12):1639-1643) | Read-mapping-style ortholog detection + GFF transfer | Lifted GFF | Fast; no WGA required; standard for query-vs-reference pairs | Tandem duplicates ambiguous; not for gene loss detection |\n| UCSC liftOver | Coordinate-based lift using chain files | Coordinate-lifted regions | Standard for coordinate transfers; not for gene annotations | Doesn't handle gene structure changes |\n| Comparative Annotation Toolkit (CAT) | Luigi + Toil workflow integrating TransMap + AUGUSTUS (TM\u002FTMR\u002FCGP\u002FPB) + homGeneMapping | Per-species comparative annotation | Integrates de novo + projection | Requires Cactus HAL input; Toil\u002FLuigi setup complex |\n| GeMoMa (Keilwagen 2019 Methods Mol Biol 1962:161) | Reference protein homology + evidence integration | Comparative gene annotation | Combines multiple reference species evidence | Slower; less popular than TOGA \u002F LiftOff |\n| AUGUSTUS (Stanke 2008) | De novo prediction; not strictly projection | Per-genome annotation | Augments projection with de novo | Standalone de novo; lower comparative accuracy |\n| BRAKER3 (Gabriel 2024) | Augustus + GeneMark-ETP + RNA-Seq + protein | Comparative-aware de novo | Modern de novo with evidence | Not strictly projection |\n| Funannotate (palmer lab) | Multi-evidence annotation including LiftOff | Funannotate annotations | Integrates evidence | Setup complex |\n| Comparative Annotation Pipeline (CAP) | Earlier WGA-based annotation | Per-species per-gene | Historical; replaced by TOGA | Use TOGA |\n| TransMap | UCSC genome browser annotation lifter | Per-locus lift | Tool for UCSC tracks | Tool-specific |\n| Maker (Cantarel 2008) | Evidence-based de novo + projection | Per-genome annotation | Combines evidence | Maker is for novel genomes; LiftOff for transfer |\n\nMethodology evolves; the Kirilenko 2023 TOGA paradigm (WGA-anchored + intactness classification) is the gold standard for vertebrate-scale comparative annotation. For pairwise transfers, LiftOff is the modern standard. Verify the current TOGA documentation (hillerlab\u002FTOGA) before locking on a single approach.\n\n## Decision Tree by Experimental Scenario\n\n| Scenario | Recommended approach | Why |\n|----------|------------------------|-----|\n| Annotate hundreds of mammal \u002F bird genomes | TOGA with Cactus HAL | Scales to Zoonomia \u002F Bird10000 |\n| Annotate single new genome from reference | LiftOff | Fast; no WGA required |\n| Detect gene loss across mammals | TOGA intactness classification | Explicit I\u002FPI\u002FUL\u002FL\u002FM\u002FPM codes |\n| Project alternative isoforms | TOGA (preserves multiple transcripts) | Standard |\n| Project annotations to assembly with high N50 + chromosome-level | TOGA | Requires good assembly |\n| Project to fragmented draft assembly | LiftOff (more tolerant) | LiftOff works on draft assemblies |\n| Multi-species annotation pipeline | CAT (Luigi + Toil) | Integrated workflow |\n| Annotate plant genome from Arabidopsis | LiftOff with plant-specific options | Standard for plant work |\n| Pseudogenization detection at scale | TOGA + intactness analysis | Designed for this |\n| Reference-free gene prediction | BRAKER3 or AUGUSTUS | De novo; not projection |\n| Comparative annotation of multiple references | GeMoMa | Multi-reference evidence integration |\n| UCSC genome browser coordinate transfer | liftOver tool | Coordinate-specific |\n| Annotation transfer to closely related strain (>95% ANI) | LiftOff | High accuracy at close divergence |\n| Annotation transfer to deep divergence (mammal to fish) | TOGA + manual review | Requires WGA; expect lower coverage |\n| Project annotations with WGD-aware handling | AnchorWave + TOGA-like or custom workflow | WGD-aware tools |\n| Annotate non-coding RNAs | Specialized tools (Rfam, ncRNA-specific) | RNA detection different problem |\n| Annotate immune \u002F repetitive genes (MHC, OR) | PGR-TK MAP graph or manual | Repetitive regions; use [[pangenome-analysis]] |\n| Annotate transposable elements | RepeatMasker \u002F RepeatModeler | TE annotation different problem |\n| Validate projected annotations | RNA-Seq alignment to projected | RNA-Seq evidence is gold standard |\n\n## Per-Tool Failure Modes\n\n### TOGA chain file missing or incompatible\n\n**Trigger:** Running TOGA on Cactus HAL without proper chain file extraction.\n\n**Mechanism:** TOGA requires UCSC-style chain files derived from Cactus HAL or LASTZ chains\u002Fnets pipeline. Cactus HAL doesn't directly produce chain files; conversion via halSynteny + chainNet + axtChain is required.\n\n**Symptom:** TOGA fails with \"chain file not found\" or \"no syntenic blocks for query.\"\n\n**Fix:** Use `halSynteny` (HAL toolkit) to extract syntenic blocks; convert to chain format via `axtChain` and `chainNet`. The TOGA Nextflow wrapper handles this automatically; for manual runs, see UCSC kentUtils chain documentation.\n\n### CESAR exon-fragment misalignment in highly divergent species\n\n**Trigger:** Projecting from mouse to fish (~400 Myr divergence); many exons fail CESAR projection.\n\n**Mechanism:** CESAR's HMM model is calibrated for vertebrate divergence (\u003C 100 Myr typical). At deep divergence, exon boundaries shift; CESAR may misalign or fail to project.\n\n**Symptom:** Many genes in mouse have TOGA \"M\" (missing) or \"PI\" (partial-intact) classification in fish; coverage of expected genes is low.\n\n**Fix:** TOGA documentation recommends \u003C 300 Myr divergence for reliable projection. For deeper divergence, manual review of failed exons; consider GeMoMa with multiple reference species. Some genes won't project because they're truly absent (orphan genes); others fail due to alignment limitations.\n\n### LiftOff tandem duplicate ambiguity\n\n**Trigger:** LiftOff on genomes with extensive tandem duplications (e.g., NLR clusters in plants, olfactory receptors in mammals).\n\n**Mechanism:** LiftOff uses ortholog detection similar to OrthoFinder; tandem duplicates create many similar sequences, making reciprocal-best-hit identification ambiguous.\n\n**Symptom:** LiftOff reports many \"multimapped\" genes; tandem clusters have one-to-many or many-to-one orthology calls.\n\n**Fix:** Pre-collapse tandem duplicates manually; or use LiftOff with `-mismatch 5` and `-flank 0.5` for more relaxed mapping; or use TOGA which has tandem-aware classification.\n\n### TOGA intactness classification false negatives\n\n**Trigger:** TOGA classifies a gene as \"Lost\" when it is actually intact.\n\n**Mechanism:** TOGA uses ML classifier on chain features + frame preservation; assembly gaps, short alignment fractions, or CESAR projection failures can cause false-loss calls.\n\n**Symptom:** TOGA \"Lost\" gene actually present in independent validation (RNA-Seq, manual inspection); known biology contradicts loss.\n\n**Fix:** Manual review of TOGA \"Lost\" calls in the loss_summ_data.tsv; cross-validate with RNA-Seq mapping; use ID + biology to verify. TOGA's classifier is calibrated for mammals\u002Fbirds; non-canonical genome architectures may produce false losses.\n\n### Reference choice bias\n\n**Trigger:** Projecting from one reference (e.g., mouse) produces different annotation than from another (e.g., human).\n\n**Mechanism:** Each reference's annotation has its own biases (gene structures, splice variants, missing genes). Projection inherits these biases; different references produce somewhat different annotations.\n\n**Symptom:** Mouse-reference TOGA annotation has gene X missing in query; human-reference TOGA has it present; or different exon structures.\n\n**Fix:** Project from multiple references; consensus annotation. CAT integrates multi-reference projection; manual review of inconsistencies. Document reference choice impact.\n\n### Pseudogenization vs gene loss distinction\n\n**Trigger:** Reporting a \"lost\" gene that retains coding sequence (frame may be conserved but expression lost).\n\n**Mechanism:** TOGA detects loss of coding capacity (intactness), but doesn't directly identify pseudogenization (loss of expression). A pseudogene with intact reading frame may be classified \"Intact\" by TOGA.\n\n**Symptom:** TOGA \"Intact\" annotation but the gene is pseudogene per RNA-Seq + Ribo-Seq evidence.\n\n**Fix:** Combine TOGA intactness with expression data (RNA-Seq from species of interest); apply PseudoPipe (Zhang 2006 Bioinformatics 22:1437) or RetroFinder (Baertsch 2008 BMC Genomics 9:466) for systematic pseudogene detection.\n\n### Splice variant inconsistency across projections\n\n**Trigger:** Projecting genes with extensive alternative splicing.\n\n**Mechanism:** Reference may have alternative splice variants; projection of alternative isoforms requires per-isoform alignment which may fail for some variants.\n\n**Symptom:** Query species has fewer projected isoforms than reference; canonical isoform present but alternatives missing.\n\n**Fix:** TOGA projects each transcript independently; manual review of dropped isoforms. RNA-Seq from species of interest for novel splice variants.\n\n### Annotation pipeline reference quality affecting projection\n\n**Trigger:** Projecting from an outdated or buggy reference annotation.\n\n**Mechanism:** Errors in reference annotation propagate to all projections. A wrong exon boundary in mouse is propagated to all mammals.\n\n**Symptom:** Same exon boundary error appears across many projected annotations.\n\n**Fix:** Verify reference annotation quality via BUSCO + manual gene model review; use updated Ensembl \u002F NCBI releases (current 2024-Q4).\n\n### Polyploid query genome handling\n\n**Trigger:** Projecting annotations onto a polyploid query without subgenome consideration.\n\n**Mechanism:** Projection sees multiple homeologous regions; ortholog detection ambiguous between subgenomes.\n\n**Symptom:** Polyploid query annotation has ~2x the genes expected; many \"redundant\" projections from homeologs.\n\n**Fix:** Assign subgenomes before projection (see [[whole-genome-duplication]]); project to each subgenome separately. AnchorWave proali handles ploidy; LiftOff doesn't natively.\n\n### Chromosome-level vs scaffold-level reference\n\n**Trigger:** Projecting from chromosome-level reference to scaffold-level query.\n\n**Mechanism:** Scaffold-level query has gaps and ambiguous gene assignments; projection mostly succeeds but some genes split across scaffolds.\n\n**Symptom:** Projected GFF has fragmented gene models; some genes have 2-3 entries across scaffolds.\n\n**Fix:** Pre-scaffold query (Hi-C scaffolding if possible); or accept partial annotations; document fragmentation rate. TOGA reports \"Partial Intact\" for these cases.\n\n## Quantitative Thresholds\n\n| Quantity | Threshold | Source \u002F Rationale |\n|----------|-----------|-------------------|\n| TOGA intactness classes (loss_summ_data.tsv) | I (intact), PI (partial intact), UL (uncertain loss), L (lost), M (missing\u002Fassembly gap), PM (partial missing) | Kirilenko 2023 + TOGA repo |\n| TOGA orthology relationships (orthology_classification.tsv) | one2one, one2many, many2one, many2many, PG (paralogous projection \u002F no orthologous chain) | Kirilenko 2023 |\n| TOGA \"Intact\" classification confidence | ML classifier posterior > 0.9 | Kirilenko 2023 supp |\n| LiftOff coverage | >=80% of reference gene length aligned | Default |\n| LiftOff identity | >=70% nucleotide identity (default) | Default |\n| Maximum divergence for TOGA | ~300 Myr (vertebrate); validate per clade | Kirilenko 2023 |\n| Maximum divergence for LiftOff | ~80% nucleotide identity | Empirical |\n| Maximum divergence for CESAR | ~150 Myr (vertebrate) | Sharma, Schwede & Hiller 2017 |\n| Reference annotation BUSCO completeness | >= 95% | Standard QC |\n| Assembly N50 for projection | >= 1 Mb; chromosome-level preferred | Standard |\n| Annotation transfer success rate | 90-95% for closely related (\u003C 50 Myr); 60-80% for moderately diverged | Empirical |\n| Multi-reference consensus | >= 2 references agreeing | Manual standard |\n| Pseudogene classification threshold | TOGA \"Lost\" + no RNA-Seq evidence | Operational |\n| Tandem cluster window for LiftOff | 50 kb default | Default |\n| GeMoMa minimum protein identity | 60% | Default |\n| CAT pipeline runtime per genome | 1-5 hours on 16 cores | Empirical |\n| TOGA per-genome runtime | 30 min - 5 hr on 16 cores | Empirical |\n| Nextflow scaling | scales with cores | Standard |\n| Reference annotation version | Ensembl \u002F NCBI release 2024-Q4 minimum | Standard |\n| Splice variant count | report; per-transcript projection | Variable |\n\n## TOGA Standard Workflow\n\n**Goal:** Project annotations from reference to query genome(s), classifying gene-loss \u002F intactness.\n\n**Approach:** Cactus WGA -> halSynteny + chainNet -> TOGA Nextflow pipeline.\n\n```bash\n# Prerequisites: Cactus HAL file from [[whole-genome-alignment]]\n# OR LASTZ chain\u002Fnet pipeline output\n\n# 1. Extract syntenic blocks from HAL\nhalSynteny output.hal reference query --queryGenome query > query.synteny.psl\n\n# 2. Convert PSL to UCSC chain format\naxtChain -psl -linearGap=loose query.synteny.psl reference.2bit query.2bit chains\u002Fquery.chain.gz\n# Note: `-psl` is correct here only if the input is PSL. When the input comes from\n# `lastz --format=axt`, drop the `-psl` flag (or emit PSL from LASTZ first).\n\n# 3. Run TOGA. The canonical invocation is `python toga.py` from the TOGA checkout;\n# the Nextflow-style command shown below mirrors the same arguments but may not be\n# the standard entry point in your release -- verify against the hillerlab\u002FTOGA README.\npython toga.py \\\n    chains\u002Fquery.chain.gz \\\n    reference_annotation.bed \\\n    reference.2bit \\\n    query.2bit \\\n    --pn project_name \\\n    --cpus 32\n\n# Output:\n#   project_name\u002Floss_summ_data.tsv           Per-gene intactness call\n#   project_name\u002Forthology_classification.tsv One-to-one \u002F one-to-many \u002F many-to-many\n#   project_name\u002Fquery_annotation.bed         Lifted gene annotation\n#   project_name\u002Fquery_annotation.gff         GFF format\n#   project_name\u002Fcesar_alignment\u002F             CESAR exon alignments\n```\n\n```python\n'''Parse TOGA loss summary to identify gene loss vs intact.'''\nimport pandas as pd\n\n\ndef load_toga_loss(loss_summary_path):\n    '''loss_summary_data.tsv columns: TRANSCRIPT, STATUS, IS_INTACT, ...'''\n    df = pd.read_csv(loss_summary_path, sep='\\t')\n    return df\n\n\ndef classify_genes(df):\n    '''Standard TOGA classification: I\u002FPI\u002FUL\u002FL\u002FM\u002FPM'''\n    return df.groupby('STATUS')['TRANSCRIPT'].count()\n\n\ndef filter_high_confidence_intact(df):\n    '''Filter to high-confidence intact (I) only. PI is partial-intact; L is Lost.'''\n    return df[df['STATUS'] == 'I']\n```\n\n## LiftOff for Pairwise Annotation Transfer\n\n**Goal:** Transfer reference annotation to query genome via ortholog mapping.\n\n**Approach:** Minimap2-based ortholog detection -> per-gene transfer.\n\n```bash\n# Standard LiftOff (verify flags with `liftoff --help`)\nliftoff -g reference.gff \\\n    query.fa reference.fa \\\n    -o query.gff \\\n    -u unmapped.txt \\\n    -copies \\\n    -overlap 0.5 \\\n    -mismatch 2 \\\n    -gap 5 \\\n    -threads 16\n\n# Output:\n#   query.gff             Lifted annotations\n#   unmapped.txt          Genes failed to lift\n```\n\nFor closely related species, default settings suffice. For divergent (75-90% identity), use `-mismatch 5 -gap 10`. For tandem-rich regions, `-copies` allows multiple projections.\n\n## Comparative Annotation Toolkit (CAT)\n\n```bash\n# Setup\ngit clone https:\u002F\u002Fgithub.com\u002FComparativeGenomicsToolkit\u002FComparative-Annotation-Toolkit\ncd Comparative-Annotation-Toolkit && pip install .\n\n# Edit the CAT config file with reference + query genomes; input is a Cactus HAL alignment\n# CAT is orchestrated by Luigi (task graph) on top of Toil (execution); launch the RunCat module\nluigi --module cat RunCat --hal=alignment.hal --ref-genome=mm10 --config=cat.config \\\n      --work-dir work --out-dir out --workers=10 --local-scheduler \\\n      --augustus --augustus-cgp --augustus-pb --assembly-hub > log.txt\n```\n\nCAT projects the reference annotation across the Cactus alignment with TransMap, then integrates AUGUSTUS (TM\u002FTMR\u002FCGP\u002FPB) and homGeneMapping; output is multi-species comparative annotation.\n\n## Reconciliation: When Methods Disagree\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| TOGA \"Lost\" vs LiftOff \"Mapped\" | LiftOff more permissive; doesn't check frame preservation | Trust TOGA for loss claims; LiftOff for pairwise transfer |\n| TOGA \"Partial Intact\" vs LiftOff \"Mapped\" | Frame disruption | Cross-validate; consider biology |\n| Mouse-reference annotation vs human-reference | Reference choice bias | Multi-reference consensus |\n| TOGA \"Intact\" but no RNA-Seq evidence | Possible pseudogene with intact ORF | Add expression evidence; reclassify |\n| CESAR fails exon | Deep divergence or assembly gap | Manual review; consider GeMoMa alternative |\n| GeMoMa vs LiftOff disagree | Evidence integration vs ortholog-based | GeMoMa for evidence-rich; LiftOff for fast pairwise |\n| TOGA chain doesn't cover gene | Cactus alignment quality issue | Re-run Cactus with adjusted parameters; verify assembly |\n| LiftOff produces duplicate transfers | Tandem cluster | Use `-copies` or restrict; manual review |\n| CAT pipeline integrates de novo + projection | Combined evidence | Trust integrated; better than single tool |\n| BUSCO of projected annotation low | Missing core genes | Likely tool failure; re-run with relaxed parameters |\n\n**Operational rule for publication:** TOGA + Cactus HAL for clade-level annotation (Zoonomia-style); LiftOff for pairwise transfer to closely related (\u003C100 Myr); BRAKER3 \u002F Funannotate for de novo where projection fails; manual review of TOGA \"Lost\" \u002F \"PI\" calls.\n\n## Cohort Gotchas\n\n- **Plant comparative annotation:** GENESPACE handles synteny-aware ortholog detection; project via plant-specific tools\n- **Bacterial annotation:** different problem; use [[pangenome-analysis]] with Bakta consistent annotation\n- **Single-cell expression data:** RNA-Seq evidence for projected genes essential\n- **Repetitive genes (MHC, OR):** projection unreliable; use [[pangenome-analysis]] with PGR-TK\n- **Recently diverged strains:** LiftOff with strict parameters; high accuracy\n- **Polyploid query:** assign subgenomes first ([[whole-genome-duplication]])\n- **Distantly related to reference (>300 Myr):** projection rate drops; consider de novo with comparative evidence\n- **Fragmented draft genomes:** projection works on contigs but gene splits possible\n- **Reference annotation quality:** verify BUSCO before propagating to all projections\n- **Non-canonical genomes (B chromosomes, supernumerary):** typically excluded from projection\n\n## Anticipated Reviewer Pushback\n\n| Pushback | Standard response |\n|----------|-------------------|\n| \"Reference annotation quality?\" | BUSCO completeness reported; updated to current Ensembl \u002F NCBI release |\n| \"Maximum divergence for TOGA?\" | \u003C 300 Myr for vertebrate; documented and respected |\n| \"Tandem duplicate handling?\" | LiftOff `-copies`; or pre-collapse for TOGA |\n| \"Gene loss detection?\" | TOGA intactness classification (I\u002FPI\u002FUL\u002FL\u002FM\u002FPM); cross-validated with RNA-Seq |\n| \"Pseudogenization?\" | TOGA \"Intact\" classification verified against RNA-Seq + Ribo-Seq |\n| \"Cactus WGA quality?\" | Pre-filtered repeats; BUSCO on reference and query; Toil reproducibility |\n| \"Multi-reference?\" | Consensus annotation from 2-3 reference species; documented disagreements |\n| \"Polyploid?\" | Subgenomes assigned via [[whole-genome-duplication]]; per-subgenome projection |\n| \"Annotation transfer rate?\" | Per-species coverage reported (e.g. 85% projection success) |\n| \"Splice variants?\" | Per-transcript projection; missing isoforms documented |\n| \"BUSCO of projected annotation?\" | >= 90% complete; reported |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| TOGA \"chain file not found\" | Cactus HAL not converted to chain | Use halSynteny + axtChain |\n| TOGA stops with \"no syntenic blocks\" | Genome unrelated to reference | Verify Cactus alignment is non-empty |\n| LiftOff produces empty GFF | Reference \u002F query genome mismatch | Verify both are FASTA; check identifier consistency |\n| GeMoMa OOM | Java heap insufficient | Increase via `-Xmx32g` |\n| CESAR fragment-not-found | Exon GFF malformed | Verify GFF format; convert if needed |\n| TOGA Nextflow hangs | Cluster resource issue | Restart with `-resume`; check Nextflow config |\n| BUSCO of projected annotation low | Missing core genes | Likely projection failure; manual review |\n| Many \"PI\" classifications | Assembly fragmentation | Improve assembly; or accept partial intactness |\n| CAT Luigi\u002FToil step fails | Conda env or Toil jobstore issue | Re-create conda envs; inspect the Toil jobstore and Luigi task logs |\n| LiftOff \"no overlap\" | Reference \u002F query coordinate systems differ | Verify same genome version |\n| TOGA intactness disagrees with biology | Edge case; manual review needed | Inspect CESAR alignment; cross-validate with RNA-Seq |\n\n## Tool Installation Notes\n\n```bash\n# TOGA\nconda env create -f https:\u002F\u002Fraw.githubusercontent.com\u002Fhillerlab\u002FTOGA\u002Fmaster\u002Ftoga_env.yml\n# Requires Nextflow and nf-core\n\n# CESAR 2.0 (bundled with TOGA)\ngit clone https:\u002F\u002Fgithub.com\u002Fhillerlab\u002FCESAR2.0\n\n# LiftOff\npip install liftoff\n\n# UCSC liftOver\nconda install -c bioconda ucsc-liftover\n\n# Comparative Annotation Toolkit (CAT)\ngit clone https:\u002F\u002Fgithub.com\u002FComparativeGenomicsToolkit\u002FComparative-Annotation-Toolkit\ncd Comparative-Annotation-Toolkit && pip install .\n\n# GeMoMa\nwget https:\u002F\u002Fgemoma.de\u002Fjcag\u002Fgemoma.zip && unzip gemoma.zip\n\n# Comparative tools\nconda install -c bioconda cactus busco compleasm\n\n# De novo annotation (alternative)\nconda install -c bioconda braker3 funannotate maker\n```\n\nFor TOGA pipeline at vertebrate-scale, use Nextflow with proper HPC config (Slurm \u002F Kubernetes); allocate >= 32 cores per genome.\n\n## References\n\n- Kirilenko BM et al 2023 Science 380:eabn3107 (TOGA; Zoonomia + Bird10000 standard)\n- Sharma V, Schwede P & Hiller M 2017 Bioinformatics 33:3985 (CESAR 2.0)\n- Shumate A & Salzberg SL 2021 Bioinformatics 37(12):1639-1643 (LiftOff)\n- Hickey G et al 2013 Bioinformatics 29:1341 (HAL toolkit)\n- Keilwagen J et al 2019 Methods Mol Biol 1962:161 (GeMoMa)\n- Gabriel L, Brůna T et al 2024 Genome Res 34:769 (BRAKER3)\n- Cantarel BL et al 2008 Genome Res 18:188 (MAKER)\n- Stanke M et al 2008 Bioinformatics 24:637 (AUGUSTUS)\n- Zhang Z et al 2006 Bioinformatics 22:1437 (PseudoPipe)\n- Armstrong J et al 2020 Nature 587:246 (Progressive Cactus)\n- Baertsch R et al 2008 BMC Genomics 9:466 (RetroFinder)\n- Liao W-W et al 2023 Nature 617:312 (HPRC draft pangenome; relevant context)\n- Fiddes IT et al 2018 Genome Res 28:1029 (Comparative Annotation Toolkit)\n- Salzberg SL 2019 Genome Biol 20:92 (next-gen annotation pipelines)\n- Comparative Genomics Toolkit (CGT) GitHub\n- TimeTree (database) for divergence dates\n\n## Related Skills\n\n- comparative-genomics\u002Fwhole-genome-alignment - Cactus WGA precedes TOGA\n- comparative-genomics\u002Fsynteny-analysis - Synteny detection from WGA\n- comparative-genomics\u002Fortholog-inference - TOGA orthology classification\n- comparative-genomics\u002Fpangenome-analysis - PGR-TK for repetitive \u002F clinical genes\n- comparative-genomics\u002Fwhole-genome-duplication - Subgenome assignment for polyploid query\n- genome-annotation\u002Feukaryotic-gene-prediction - BRAKER3 \u002F Funannotate de novo alternative\n- genome-annotation\u002Ffunctional-annotation - Function assignment downstream\n- genome-annotation\u002Fannotation-transfer - Related skill on annotation transfer mechanisms\n- genome-annotation\u002Fprokaryotic-annotation - Bakta for prokaryote annotation\n- read-qc\u002Frnaseq-qc - RNA-Seq evidence to validate projected annotations\n- read-alignment\u002Fstar-alignment - RNA-Seq alignment for validation\n","## Version Compatibility\n\nReference examples tested with: TOGA 1.1.7+ (hillerlab\u002FTOGA; Kirilenko 2023 Science 380:eabn3107), CESAR 2.0 (Sharma, Schwede & Hiller 2017 Bioinformatics 33:3985), LiftOff 1.6.3+ (Shumate & Salzberg 2021 Bioinformatics 37(12):1639-1643), Comparative Annotation Toolkit (CAT) 2.4+, GeMoMa 1.9+ (Keilwagen 2019 Methods Mol Biol 1962:161), UCSC liftOver 2024+, Cactus 2.9.1+ (for HAL input), HAL toolkit 2.3+, NextFlow 24+ for TOGA pipeline, BUSCO 5.7+ \u002F Compleasm 0.2.7+ for QC, Luigi + Toil for CAT, R 4.4+. The current TOGA expects HAL from Cactus 2.5+; older HAL formats may fail.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `toga.py --help`; `cesar --help`; `liftoff --version`\n- Python: `pip show liftoff`\n- Java: `gemoma --help` (Java 11+)\n\nIf code throws `TOGA chain file missing`, `CESAR fragment not found`, `LiftOff annotation not parsed`, the toolchain expects specific input formats: TOGA needs HAL or chain\u002Fnet files from Cactus \u002F LASTZ; CESAR needs exon-level GFF; LiftOff needs reference GFF and aligned FASTA. Pre-process with the appropriate format conversion.\n\n# Comparative Annotation Projection\n\n**\"Annotate this new genome using my well-annotated reference\"** -> Annotation projection from a reference is the modern alternative to de novo gene prediction; it produces high-quality, comparable annotations across genomes by leveraging evolutionary conservation. The 2023-era standard is **TOGA + CESAR 2.0** (Kirilenko 2023 Science 380:eabn3107), which uses whole-genome alignment chains + ML classification + codon-aware exon projection to scale to hundreds of genomes (Zoonomia: 488 mammals; Bird10000 Genomes: 501 birds). For ortholog-based projection (no WGA needed), **LiftOff** (Shumate & Salzberg 2021 Bioinformatics 37(12):1639) is the standard. The critical decision is **WGA-anchored (TOGA) vs ortholog-anchored (LiftOff)**: TOGA explicitly classifies gene intactness vs loss using the alignment chains, LiftOff relies on reciprocal-best-hit equivalents.\n\n- CLI: `toga.py --chain chain.bb --bed ref.bed --tDB target.2bit --qDB query.2bit --pn project_name` -- WGA-based projection\n- CLI: `cesar -i exons.fa -d 4 -o output.aln` -- codon-aware exon alignment (used internally by TOGA)\n- CLI: `liftoff -g ref.gff query.fa ref.fa -o query.gff` -- ortholog-based projection\n- CLI: `gemoma` -- evidence-based comparative annotation (Java)\n- CLI: `cat` (Comparative Annotation Toolkit) -- multi-species annotation projection\n\n## Algorithmic Taxonomy\n\n| Tool | Approach | Output | Strength | Fails when |\n|------|----------|--------|----------|------------|\n| TOGA (Kirilenko 2023 Science 380:eabn3107) | Cactus HAL or LASTZ chains -> ML projection + intactness classifier | Per-gene I\u002FPI\u002FUL\u002FL\u002FM\u002FPM codes; orthology classification; coding annotation via CESAR 2.0 | Modern paradigm; explicit gene-loss detection at scale; Zoonomia \u002F Bird10000 standard | Requires Cactus WGA; not for prokaryotes |\n| CESAR 2.0 (Sharma, Schwede & Hiller 2017 Bioinformatics 33:3985) | HMM-based codon-aware exon projection | Aligned exons + frame preservation | Most accurate exon projection from WGA; preserves frame across indels | Used internally by TOGA; standalone use more rare |\n| LiftOff (Shumate & Salzberg 2021 Bioinformatics 37(12):1639-1643) | Read-mapping-style ortholog detection + GFF transfer | Lifted GFF | Fast; no WGA required; standard for query-vs-reference pairs | Tandem duplicates ambiguous; not for gene loss detection |\n| UCSC liftOver | Coordinate-based lift using chain files | Coordinate-lifted regions | Standard for coordinate transfers; not for gene annotations | Doesn't handle gene structure changes |\n| Comparative Annotation Toolkit (CAT) | Luigi + Toil workflow integrating TransMap + AUGUSTUS (TM\u002FTMR\u002FCGP\u002FPB) + homGeneMapping | Per-species comparative annotation | Integrates de novo + projection | Requires Cactus HAL input; Toil\u002FLuigi setup complex |\n| GeMoMa (Keilwagen 2019 Methods Mol Biol 1962:161) | Reference protein homology + evidence integration | Comparative gene annotation | Combines multiple reference species evidence | Slower; less popular than TOGA \u002F LiftOff |\n| AUGUSTUS (Stanke 2008) | De novo prediction; not strictly projection | Per-genome annotation | Augments projection with de novo | Standalone de novo; lower comparative accuracy |\n| BRAKER3 (Gabriel 2024) | Augustus + GeneMark-ETP + RNA-Seq + protein | Comparative-aware de novo | Modern de novo with evidence | Not strictly projection |\n| Funannotate (palmer lab) | Multi-evidence annotation including LiftOff | Funannotate annotations | Integrates evidence | Setup complex |\n| Comparative Annotation Pipeline (CAP) | Earlier WGA-based annotation | Per-species per-gene | Historical; replaced by TOGA | Use TOGA |\n| TransMap | UCSC genome browser annotation lifter | Per-locus lift | Tool for UCSC tracks | Tool-specific |\n| Maker (Cantarel 2008) | Evidence-based de novo + projection | Per-genome annotation | Combines evidence | Maker is for novel genomes; LiftOff for transfer |\n\nMethodology evolves; the Kirilenko 2023 TOGA paradigm (WGA-anchored + intactness classification) is the gold standard for vertebrate-scale comparative annotation. For pairwise transfers, LiftOff is the modern standard. Verify the current TOGA documentation (hillerlab\u002FTOGA) before locking on a single approach.\n\n## Decision Tree by Experimental Scenario\n\n| Scenario | Recommended approach | Why |\n|----------|------------------------|-----|\n| Annotate hundreds of mammal \u002F bird genomes | TOGA with Cactus HAL | Scales to Zoonomia \u002F Bird10000 |\n| Annotate single new genome from reference | LiftOff | Fast; no WGA required |\n| Detect gene loss across mammals | TOGA intactness classification | Explicit I\u002FPI\u002FUL\u002FL\u002FM\u002FPM codes |\n| Project alternative isoforms | TOGA (preserves multiple transcripts) | Standard |\n| Project annotations to assembly with high N50 + chromosome-level | TOGA | Requires good assembly |\n| Project to fragmented draft assembly | LiftOff (more tolerant) | LiftOff works on draft assemblies |\n| Multi-species annotation pipeline | CAT (Luigi + Toil) | Integrated workflow |\n| Annotate plant genome from Arabidopsis | LiftOff with plant-specific options | Standard for plant work |\n| Pseudogenization detection at scale | TOGA + intactness analysis | Designed for this |\n| Reference-free gene prediction | BRAKER3 or AUGUSTUS | De novo; not projection |\n| Comparative annotation of multiple references | GeMoMa | Multi-reference evidence integration |\n| UCSC genome browser coordinate transfer | liftOver tool | Coordinate-specific |\n| Annotation transfer to closely related strain (>95% ANI) | LiftOff | High accuracy at close divergence |\n| Annotation transfer to deep divergence (mammal to fish) | TOGA + manual review | Requires WGA; expect lower coverage |\n| Project annotations with WGD-aware handling | AnchorWave + TOGA-like or custom workflow | WGD-aware tools |\n| Annotate non-coding RNAs | Specialized tools (Rfam, ncRNA-specific) | RNA detection different problem |\n| Annotate immune \u002F repetitive genes (MHC, OR) | PGR-TK MAP graph or manual | Repetitive regions; use [[pangenome-analysis]] |\n| Annotate transposable elements | RepeatMasker \u002F RepeatModeler | TE annotation different problem |\n| Validate projected annotations | RNA-Seq alignment to projected | RNA-Seq evidence is gold standard |\n\n## Per-Tool Failure Modes\n\n### TOGA chain file missing or incompatible\n\n**Trigger:** Running TOGA on Cactus HAL without proper chain file extraction.\n\n**Mechanism:** TOGA requires UCSC-style chain files derived from Cactus HAL or LASTZ chains\u002Fnets pipeline. Cactus HAL doesn't directly produce chain files; conversion via halSynteny + chainNet + axtChain is required.\n\n**Symptom:** TOGA fails with \"chain file not found\" or \"no syntenic blocks for query.\"\n\n**Fix:** Use `halSynteny` (HAL toolkit) to extract syntenic blocks; convert to chain format via `axtChain` and `chainNet`. The TOGA Nextflow wrapper handles this automatically; for manual runs, see UCSC kentUtils chain documentation.\n\n### CESAR exon-fragment misalignment in highly divergent species\n\n**Trigger:** Projecting from mouse to fish (~400 Myr divergence); many exons fail CESAR projection.\n\n**Mechanism:** CESAR's HMM model is calibrated for vertebrate divergence (\u003C 100 Myr typical). At deep divergence, exon boundaries shift; CESAR may misalign or fail to project.\n\n**Symptom:** Many genes in mouse have TOGA \"M\" (missing) or \"PI\" (partial-intact) classification in fish; coverage of expected genes is low.\n\n**Fix:** TOGA documentation recommends \u003C 300 Myr divergence for reliable projection. For deeper divergence, manual review of failed exons; consider GeMoMa with multiple reference species. Some genes won't project because they're truly absent (orphan genes); others fail due to alignment limitations.\n\n### LiftOff tandem duplicate ambiguity\n\n**Trigger:** LiftOff on genomes with extensive tandem duplications (e.g., NLR clusters in plants, olfactory receptors in mammals).\n\n**Mechanism:** LiftOff uses ortholog detection similar to OrthoFinder; tandem duplicates create many similar sequences, making reciprocal-best-hit identification ambiguous.\n\n**Symptom:** LiftOff reports many \"multimapped\" genes; tandem clusters have one-to-many or many-to-one orthology calls.\n\n**Fix:** Pre-collapse tandem duplicates manually; or use LiftOff with `-mismatch 5` and `-flank 0.5` for more relaxed mapping; or use TOGA which has tandem-aware classification.\n\n### TOGA intactness classification false negatives\n\n**Trigger:** TOGA classifies a gene as \"Lost\" when it is actually intact.\n\n**Mechanism:** TOGA uses ML classifier on chain features + frame preservation; assembly gaps, short alignment fractions, or CESAR projection failures can cause false-loss calls.\n\n**Symptom:** TOGA \"Lost\" gene actually present in independent validation (RNA-Seq, manual inspection); known biology contradicts loss.\n\n**Fix:** Manual review of TOGA \"Lost\" calls in the loss_summ_data.tsv; cross-validate with RNA-Seq mapping; use ID + biology to verify. TOGA's classifier is calibrated for mammals\u002Fbirds; non-canonical genome architectures may produce false losses.\n\n### Reference choice bias\n\n**Trigger:** Projecting from one reference (e.g., mouse) produces different annotation than from another (e.g., human).\n\n**Mechanism:** Each reference's annotation has its own biases (gene structures, splice variants, missing genes). Projection inherits these biases; different references produce somewhat different annotations.\n\n**Symptom:** Mouse-reference TOGA annotation has gene X missing in query; human-reference TOGA has it present; or different exon structures.\n\n**Fix:** Project from multiple references; consensus annotation. CAT integrates multi-reference projection; manual review of inconsistencies. Document reference choice impact.\n\n### Pseudogenization vs gene loss distinction\n\n**Trigger:** Reporting a \"lost\" gene that retains coding sequence (frame may be conserved but expression lost).\n\n**Mechanism:** TOGA detects loss of coding capacity (intactness), but doesn't directly identify pseudogenization (loss of expression). A pseudogene with intact reading frame may be classified \"Intact\" by TOGA.\n\n**Symptom:** TOGA \"Intact\" annotation but the gene is pseudogene per RNA-Seq + Ribo-Seq evidence.\n\n**Fix:** Combine TOGA intactness with expression data (RNA-Seq from species of interest); apply PseudoPipe (Zhang 2006 Bioinformatics 22:1437) or RetroFinder (Baertsch 2008 BMC Genomics 9:466) for systematic pseudogene detection.\n\n### Splice variant inconsistency across projections\n\n**Trigger:** Projecting genes with extensive alternative splicing.\n\n**Mechanism:** Reference may have alternative splice variants; projection of alternative isoforms requires per-isoform alignment which may fail for some variants.\n\n**Symptom:** Query species has fewer projected isoforms than reference; canonical isoform present but alternatives missing.\n\n**Fix:** TOGA projects each transcript independently; manual review of dropped isoforms. RNA-Seq from species of interest for novel splice variants.\n\n### Annotation pipeline reference quality affecting projection\n\n**Trigger:** Projecting from an outdated or buggy reference annotation.\n\n**Mechanism:** Errors in reference annotation propagate to all projections. A wrong exon boundary in mouse is propagated to all mammals.\n\n**Symptom:** Same exon boundary error appears across many projected annotations.\n\n**Fix:** Verify reference annotation quality via BUSCO + manual gene model review; use updated Ensembl \u002F NCBI releases (current 2024-Q4).\n\n### Polyploid query genome handling\n\n**Trigger:** Projecting annotations onto a polyploid query without subgenome consideration.\n\n**Mechanism:** Projection sees multiple homeologous regions; ortholog detection ambiguous between subgenomes.\n\n**Symptom:** Polyploid query annotation has ~2x the genes expected; many \"redundant\" projections from homeologs.\n\n**Fix:** Assign subgenomes before projection (see [[whole-genome-duplication]]); project to each subgenome separately. AnchorWave proali handles ploidy; LiftOff doesn't natively.\n\n### Chromosome-level vs scaffold-level reference\n\n**Trigger:** Projecting from chromosome-level reference to scaffold-level query.\n\n**Mechanism:** Scaffold-level query has gaps and ambiguous gene assignments; projection mostly succeeds but some genes split across scaffolds.\n\n**Symptom:** Projected GFF has fragmented gene models; some genes have 2-3 entries across scaffolds.\n\n**Fix:** Pre-scaffold query (Hi-C scaffolding if possible); or accept partial annotations; document fragmentation rate. TOGA reports \"Partial Intact\" for these cases.\n\n## Quantitative Thresholds\n\n| Quantity | Threshold | Source \u002F Rationale |\n|----------|-----------|-------------------|\n| TOGA intactness classes (loss_summ_data.tsv) | I (intact), PI (partial intact), UL (uncertain loss), L (lost), M (missing\u002Fassembly gap), PM (partial missing) | Kirilenko 2023 + TOGA repo |\n| TOGA orthology relationships (orthology_classification.tsv) | one2one, one2many, many2one, many2many, PG (paralogous projection \u002F no orthologous chain) | Kirilenko 2023 |\n| TOGA \"Intact\" classification confidence | ML classifier posterior > 0.9 | Kirilenko 2023 supp |\n| LiftOff coverage | >=80% of reference gene length aligned | Default |\n| LiftOff identity | >=70% nucleotide identity (default) | Default |\n| Maximum divergence for TOGA | ~300 Myr (vertebrate); validate per clade | Kirilenko 2023 |\n| Maximum divergence for LiftOff | ~80% nucleotide identity | Empirical |\n| Maximum divergence for CESAR | ~150 Myr (vertebrate) | Sharma, Schwede & Hiller 2017 |\n| Reference annotation BUSCO completeness | >= 95% | Standard QC |\n| Assembly N50 for projection | >= 1 Mb; chromosome-level preferred | Standard |\n| Annotation transfer success rate | 90-95% for closely related (\u003C 50 Myr); 60-80% for moderately diverged | Empirical |\n| Multi-reference consensus | >= 2 references agreeing | Manual standard |\n| Pseudogene classification threshold | TOGA \"Lost\" + no RNA-Seq evidence | Operational |\n| Tandem cluster window for LiftOff | 50 kb default | Default |\n| GeMoMa minimum protein identity | 60% | Default |\n| CAT pipeline runtime per genome | 1-5 hours on 16 cores | Empirical |\n| TOGA per-genome runtime | 30 min - 5 hr on 16 cores | Empirical |\n| Nextflow scaling | scales with cores | Standard |\n| Reference annotation version | Ensembl \u002F NCBI release 2024-Q4 minimum | Standard |\n| Splice variant count | report; per-transcript projection | Variable |\n\n## TOGA Standard Workflow\n\n**Goal:** Project annotations from reference to query genome(s), classifying gene-loss \u002F intactness.\n\n**Approach:** Cactus WGA -> halSynteny + chainNet -> TOGA Nextflow pipeline.\n\n```bash\n# Prerequisites: Cactus HAL file from [[whole-genome-alignment]]\n# OR LASTZ chain\u002Fnet pipeline output\n\n# 1. Extract syntenic blocks from HAL\nhalSynteny output.hal reference query --queryGenome query > query.synteny.psl\n\n# 2. Convert PSL to UCSC chain format\naxtChain -psl -linearGap=loose query.synteny.psl reference.2bit query.2bit chains\u002Fquery.chain.gz\n# Note: `-psl` is correct here only if the input is PSL. When the input comes from\n# `lastz --format=axt`, drop the `-psl` flag (or emit PSL from LASTZ first).\n\n# 3. Run TOGA. The canonical invocation is `python toga.py` from the TOGA checkout;\n# the Nextflow-style command shown below mirrors the same arguments but may not be\n# the standard entry point in your release -- verify against the hillerlab\u002FTOGA README.\npython toga.py \\\n    chains\u002Fquery.chain.gz \\\n    reference_annotation.bed \\\n    reference.2bit \\\n    query.2bit \\\n    --pn project_name \\\n    --cpus 32\n\n# Output:\n#   project_name\u002Floss_summ_data.tsv           Per-gene intactness call\n#   project_name\u002Forthology_classification.tsv One-to-one \u002F one-to-many \u002F many-to-many\n#   project_name\u002Fquery_annotation.bed         Lifted gene annotation\n#   project_name\u002Fquery_annotation.gff         GFF format\n#   project_name\u002Fcesar_alignment\u002F             CESAR exon alignments\n```\n\n```python\n'''Parse TOGA loss summary to identify gene loss vs intact.'''\nimport pandas as pd\n\n\ndef load_toga_loss(loss_summary_path):\n    '''loss_summary_data.tsv columns: TRANSCRIPT, STATUS, IS_INTACT, ...'''\n    df = pd.read_csv(loss_summary_path, sep='\\t')\n    return df\n\n\ndef classify_genes(df):\n    '''Standard TOGA classification: I\u002FPI\u002FUL\u002FL\u002FM\u002FPM'''\n    return df.groupby('STATUS')['TRANSCRIPT'].count()\n\n\ndef filter_high_confidence_intact(df):\n    '''Filter to high-confidence intact (I) only. PI is partial-intact; L is Lost.'''\n    return df[df['STATUS'] == 'I']\n```\n\n## LiftOff for Pairwise Annotation Transfer\n\n**Goal:** Transfer reference annotation to query genome via ortholog mapping.\n\n**Approach:** Minimap2-based ortholog detection -> per-gene transfer.\n\n```bash\n# Standard LiftOff (verify flags with `liftoff --help`)\nliftoff -g reference.gff \\\n    query.fa reference.fa \\\n    -o query.gff \\\n    -u unmapped.txt \\\n    -copies \\\n    -overlap 0.5 \\\n    -mismatch 2 \\\n    -gap 5 \\\n    -threads 16\n\n# Output:\n#   query.gff             Lifted annotations\n#   unmapped.txt          Genes failed to lift\n```\n\nFor closely related species, default settings suffice. For divergent (75-90% identity), use `-mismatch 5 -gap 10`. For tandem-rich regions, `-copies` allows multiple projections.\n\n## Comparative Annotation Toolkit (CAT)\n\n```bash\n# Setup\ngit clone https:\u002F\u002Fgithub.com\u002FComparativeGenomicsToolkit\u002FComparative-Annotation-Toolkit\ncd Comparative-Annotation-Toolkit && pip install .\n\n# Edit the CAT config file with reference + query genomes; input is a Cactus HAL alignment\n# CAT is orchestrated by Luigi (task graph) on top of Toil (execution); launch the RunCat module\nluigi --module cat RunCat --hal=alignment.hal --ref-genome=mm10 --config=cat.config \\\n      --work-dir work --out-dir out --workers=10 --local-scheduler \\\n      --augustus --augustus-cgp --augustus-pb --assembly-hub > log.txt\n```\n\nCAT projects the reference annotation across the Cactus alignment with TransMap, then integrates AUGUSTUS (TM\u002FTMR\u002FCGP\u002FPB) and homGeneMapping; output is multi-species comparative annotation.\n\n## Reconciliation: When Methods Disagree\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| TOGA \"Lost\" vs LiftOff \"Mapped\" | LiftOff more permissive; doesn't check frame preservation | Trust TOGA for loss claims; LiftOff for pairwise transfer |\n| TOGA \"Partial Intact\" vs LiftOff \"Mapped\" | Frame disruption | Cross-validate; consider biology |\n| Mouse-reference annotation vs human-reference | Reference choice bias | Multi-reference consensus |\n| TOGA \"Intact\" but no RNA-Seq evidence | Possible pseudogene with intact ORF | Add expression evidence; reclassify |\n| CESAR fails exon | Deep divergence or assembly gap | Manual review; consider GeMoMa alternative |\n| GeMoMa vs LiftOff disagree | Evidence integration vs ortholog-based | GeMoMa for evidence-rich; LiftOff for fast pairwise |\n| TOGA chain doesn't cover gene | Cactus alignment quality issue | Re-run Cactus with adjusted parameters; verify assembly |\n| LiftOff produces duplicate transfers | Tandem cluster | Use `-copies` or restrict; manual review |\n| CAT pipeline integrates de novo + projection | Combined evidence | Trust integrated; better than single tool |\n| BUSCO of projected annotation low | Missing core genes | Likely tool failure; re-run with relaxed parameters |\n\n**Operational rule for publication:** TOGA + Cactus HAL for clade-level annotation (Zoonomia-style); LiftOff for pairwise transfer to closely related (\u003C100 Myr); BRAKER3 \u002F Funannotate for de novo where projection fails; manual review of TOGA \"Lost\" \u002F \"PI\" calls.\n\n## Cohort Gotchas\n\n- **Plant comparative annotation:** GENESPACE handles synteny-aware ortholog detection; project via plant-specific tools\n- **Bacterial annotation:** different problem; use [[pangenome-analysis]] with Bakta consistent annotation\n- **Single-cell expression data:** RNA-Seq evidence for projected genes essential\n- **Repetitive genes (MHC, OR):** projection unreliable; use [[pangenome-analysis]] with PGR-TK\n- **Recently diverged strains:** LiftOff with strict parameters; high accuracy\n- **Polyploid query:** assign subgenomes first ([[whole-genome-duplication]])\n- **Distantly related to reference (>300 Myr):** projection rate drops; consider de novo with comparative evidence\n- **Fragmented draft genomes:** projection works on contigs but gene splits possible\n- **Reference annotation quality:** verify BUSCO before propagating to all projections\n- **Non-canonical genomes (B chromosomes, supernumerary):** typically excluded from projection\n\n## Anticipated Reviewer Pushback\n\n| Pushback | Standard response |\n|----------|-------------------|\n| \"Reference annotation quality?\" | BUSCO completeness reported; updated to current Ensembl \u002F NCBI release |\n| \"Maximum divergence for TOGA?\" | \u003C 300 Myr for vertebrate; documented and respected |\n| \"Tandem duplicate handling?\" | LiftOff `-copies`; or pre-collapse for TOGA |\n| \"Gene loss detection?\" | TOGA intactness classification (I\u002FPI\u002FUL\u002FL\u002FM\u002FPM); cross-validated with RNA-Seq |\n| \"Pseudogenization?\" | TOGA \"Intact\" classification verified against RNA-Seq + Ribo-Seq |\n| \"Cactus WGA quality?\" | Pre-filtered repeats; BUSCO on reference and query; Toil reproducibility |\n| \"Multi-reference?\" | Consensus annotation from 2-3 reference species; documented disagreements |\n| \"Polyploid?\" | Subgenomes assigned via [[whole-genome-duplication]]; per-subgenome projection |\n| \"Annotation transfer rate?\" | Per-species coverage reported (e.g. 85% projection success) |\n| \"Splice variants?\" | Per-transcript projection; missing isoforms documented |\n| \"BUSCO of projected annotation?\" | >= 90% complete; reported |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| TOGA \"chain file not found\" | Cactus HAL not converted to chain | Use halSynteny + axtChain |\n| TOGA stops with \"no syntenic blocks\" | Genome unrelated to reference | Verify Cactus alignment is non-empty |\n| LiftOff produces empty GFF | Reference \u002F query genome mismatch | Verify both are FASTA; check identifier consistency |\n| GeMoMa OOM | Java heap insufficient | Increase via `-Xmx32g` |\n| CESAR fragment-not-found | Exon GFF malformed | Verify GFF format; convert if needed |\n| TOGA Nextflow hangs | Cluster resource issue | Restart with `-resume`; check Nextflow config |\n| BUSCO of projected annotation low | Missing core genes | Likely projection failure; manual review |\n| Many \"PI\" classifications | Assembly fragmentation | Improve assembly; or accept partial intactness |\n| CAT Luigi\u002FToil step fails | Conda env or Toil jobstore issue | Re-create conda envs; inspect the Toil jobstore and Luigi task logs |\n| LiftOff \"no overlap\" | Reference \u002F query coordinate systems differ | Verify same genome version |\n| TOGA intactness disagrees with biology | Edge case; manual review needed | Inspect CESAR alignment; cross-validate with RNA-Seq |\n\n## Tool Installation Notes\n\n```bash\n# TOGA\nconda env create -f https:\u002F\u002Fraw.githubusercontent.com\u002Fhillerlab\u002FTOGA\u002Fmaster\u002Ftoga_env.yml\n# Requires Nextflow and nf-core\n\n# CESAR 2.0 (bundled with TOGA)\ngit clone https:\u002F\u002Fgithub.com\u002Fhillerlab\u002FCESAR2.0\n\n# LiftOff\npip install liftoff\n\n# UCSC liftOver\nconda install -c bioconda ucsc-liftover\n\n# Comparative Annotation Toolkit (CAT)\ngit clone https:\u002F\u002Fgithub.com\u002FComparativeGenomicsToolkit\u002FComparative-Annotation-Toolkit\ncd Comparative-Annotation-Toolkit && pip install .\n\n# GeMoMa\nwget https:\u002F\u002Fgemoma.de\u002Fjcag\u002Fgemoma.zip && unzip gemoma.zip\n\n# Comparative tools\nconda install -c bioconda cactus busco compleasm\n\n# De novo annotation (alternative)\nconda install -c bioconda braker3 funannotate maker\n```\n\nFor TOGA pipeline at vertebrate-scale, use Nextflow with proper HPC config (Slurm \u002F Kubernetes); allocate >= 32 cores per genome.\n\n## References\n\n- Kirilenko BM et al 2023 Science 380:eabn3107 (TOGA; Zoonomia + Bird10000 standard)\n- Sharma V, Schwede P & Hiller M 2017 Bioinformatics 33:3985 (CESAR 2.0)\n- Shumate A & Salzberg SL 2021 Bioinformatics 37(12):1639-1643 (LiftOff)\n- Hickey G et al 2013 Bioinformatics 29:1341 (HAL toolkit)\n- Keilwagen J et al 2019 Methods Mol Biol 1962:161 (GeMoMa)\n- Gabriel L, Brůna T et al 2024 Genome Res 34:769 (BRAKER3)\n- Cantarel BL et al 2008 Genome Res 18:188 (MAKER)\n- Stanke M et al 2008 Bioinformatics 24:637 (AUGUSTUS)\n- Zhang Z et al 2006 Bioinformatics 22:1437 (PseudoPipe)\n- Armstrong J et al 2020 Nature 587:246 (Progressive Cactus)\n- Baertsch R et al 2008 BMC Genomics 9:466 (RetroFinder)\n- Liao W-W et al 2023 Nature 617:312 (HPRC draft pangenome; relevant context)\n- Fiddes IT et al 2018 Genome Res 28:1029 (Comparative Annotation Toolkit)\n- Salzberg SL 2019 Genome Biol 20:92 (next-gen annotation pipelines)\n- Comparative Genomics Toolkit (CGT) GitHub\n- TimeTree (database) for divergence dates\n\n## Related Skills\n\n- comparative-genomics\u002Fwhole-genome-alignment - Cactus WGA precedes TOGA\n- comparative-genomics\u002Fsynteny-analysis - Synteny detection from WGA\n- comparative-genomics\u002Fortholog-inference - TOGA orthology classification\n- comparative-genomics\u002Fpangenome-analysis - PGR-TK for repetitive \u002F clinical genes\n- comparative-genomics\u002Fwhole-genome-duplication - Subgenome assignment for polyploid query\n- genome-annotation\u002Feukaryotic-gene-prediction - BRAKER3 \u002F Funannotate de novo alternative\n- genome-annotation\u002Ffunctional-annotation - Function assignment downstream\n- genome-annotation\u002Fannotation-transfer - Related skill on annotation transfer mechanisms\n- genome-annotation\u002Fprokaryotic-annotation - Bakta for prokaryote annotation\n- read-qc\u002Frnaseq-qc - RNA-Seq evidence to validate projected annotations\n- read-alignment\u002Fstar-alignment - RNA-Seq alignment for validation\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\u002Fcomparative-annotation-projection\u002FSKILL.md","TOGA","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-comparative-genomics-comparative-annotation-projection","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-comparative-annotation-projection",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-comparative-genomics-comparative-annotation-projection",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-comparative-genomics-comparative-annotation-projection","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-comparative-genomics-comparative-annotation-projection\u002FSKILL.md",true,[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Ftoga_annotation_projection.sh","SCRIPT","脚本",2997,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-comparative-genomics-comparative-annotation-projection\u002Fexamples\u002Ftoga_annotation_projection.sh",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"usage-guide.md","REFERENCE","参考文档",5641,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-comparative-genomics-comparative-annotation-projection\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",[],[]]