[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EGJD8F175AB4Y4C0KQHTSQ":3,"skill-same:01M7EGJD8F175AB4Y4C0KQHTSQ":81},{"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":46,"commitSha":47,"skillDirectory":48,"forksCount":14,"repositoryHtmlUrl":49,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":51,"install":52,"resources":64},"01M7EGJD8F175AB4Y4C0KQHTSQ","bio-workflows-genome-annotation-pipeline",null,"Orchestrates genome annotation from assembled contigs to functional annotation, forking prokaryotic (Bakta one-step, genetic-code table from GTDB-Tk) vs eukaryotic (RepeatMask -> BRAKER3 -> functional -> ncRNA), then eggNOG\u002FInterProScan functional assignment and Infernal\u002FtRNAscan ncRNA. Use when committing the pro-vs-eukaryotic path and the genetic-code table from taxonomy (never guessing), annotating ONLY a decontaminated QC-passed assembly (CheckM2 before prokaryotic annotation is non-negotiable), committing the evidence set (RNA-seq + protein drives BRAKER3 training), soft-masking with a curated repeat library before gene prediction, or pinning the tool + DB version for any pangenome comparison. Hands mechanism to the genome-annotation component skills; not a re-teach of any single step.","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-workflows-genome-annotation-pipeline\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-workflows-genome-annotation-pipeline\ndescription: Orchestrates genome annotation from assembled contigs to functional annotation, forking prokaryotic (Bakta one-step, genetic-code table from GTDB-Tk) vs eukaryotic (RepeatMask -> BRAKER3 -> functional -> ncRNA), then eggNOG\u002FInterProScan functional assignment and Infernal\u002FtRNAscan ncRNA. Use when committing the pro-vs-eukaryotic path and the genetic-code table from taxonomy (never guessing), annotating ONLY a decontaminated QC-passed assembly (CheckM2 before prokaryotic annotation is non-negotiable), committing the evidence set (RNA-seq + protein drives BRAKER3 training), soft-masking with a curated repeat library before gene prediction, or pinning the tool + DB version for any pangenome comparison. Hands mechanism to the genome-annotation component skills; not a re-teach of any single step.\ntool_type: mixed\nprimary_tool: Bakta\ngoal_approach_exempt: true\nworkflow: true\ndepends_on:\n  - genome-annotation\u002Fprokaryotic-annotation\n  - genome-annotation\u002Feukaryotic-gene-prediction\n  - genome-annotation\u002Frepeat-annotation\n  - genome-annotation\u002Ffunctional-annotation\n  - genome-annotation\u002Fncrna-annotation\n  - genome-annotation\u002Fannotation-qc\n  - genome-assembly\u002Fassembly-qc\nqc_checkpoints:\n  - after_repeat_masking: \"Repeat content within expected range for taxon\"\n  - after_gene_prediction: \"Gene count plausible, BUSCO completeness >90%\"\n  - after_functional_annotation: \">60% of genes with functional assignment\"\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"workflows\u002Fgenome-annotation-pipeline\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference examples tested with: BRAKER3 3.0+, BUSCO 5.5+, Bakta 1.9+, Infernal 1.1+, InterProScan 5.66+, Prokka 1.14+, RepeatMasker 4.1+, RepeatModeler 2.0.4+ (-threads replaced -pa in 2.0.4), eggNOG-mapper 2.1+, pandas 2.2+, tRNAscan-SE 2.0+\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n- CLI: `\u003Ctool> --version` then `\u003Ctool> --help` to confirm flags\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed\npackage and adapt the example to match the actual API rather than retrying.\n\n# Genome Annotation Pipeline\n\n**\"Annotate my genome assembly\"** -> Orchestrate prokaryotic (Bakta) or eukaryotic (BRAKER3) gene prediction, repeat masking (RepeatMasker), functional annotation (eggNOG-mapper, InterProScan), and ncRNA annotation (Infernal).\n\nThis is a workflow skill: it owns the chaining decisions and hand-offs, not the internals of any one step.\n\n## The governing principle\n\nA gene set is ~95% right and 100% confident; its trustworthiness is decided at four seams, not inside the gene-finder.\n\n1. **Pro- vs eukaryotic is THE fork, committed from taxonomy up front, and it fixes the genetic-code table.** Prokaryote -> Bakta one-step (verify the genetic-code TABLE from GTDB-Tk classification, never guess — a Mycoplasma under table 11 splits every gene at internal UGA). Eukaryote -> multi-step RepeatMask -> BRAKER3 -> functional -> ncRNA. There is no general-purpose eukaryote annotator: alternative genetic codes, trans-splicing, and polycistronic transcription break standard pipelines.\n2. **Annotate ONLY a decontaminated, QC-passed assembly.** CheckM2 before prokaryotic annotation is non-negotiable: contamination >5% mixes two organisms' genes into one chimeric set; a gene-finder trained on a contaminated\u002Ffragmented assembly produces confidently-wrong models genome-wide that are invisible in the GFF3. Annotation quality is bounded above by assembly quality.\n3. **The evidence set is a committed input, not an afterthought.** Eukaryotic: RNA-seq BAM + protein (OrthoDB) evidence drives BRAKER3's high-confidence training-set mining (the real advance — learning from loci where transcripts AND homology agree). Committing RNA-seq (ideally Iso-Seq for isoforms+UTRs) is decided at project design; without it the annotation is one-isoform, CDS-only, UTR-less and silently poisons AS\u002F3'-tag\u002FAPA analyses.\n4. **Tool + DB version + date is a reproducibility commitment.** Bakta's DB is versioned (record it); Prokka's is frozen ~2019 (a post-2019 gene is \"hypothetical\" in Prokka, \"named\" in Bakta — accessory-vs-core flips on tool vintage alone). For any comparison, re-annotate everyone with ONE pipeline + ONE DB version from FASTA.\n\n## Made-once commitments\n\n| Commitment | Consequence inherited downstream |\n|------------|----------------------------------|\n| Pro- vs eukaryotic path + genetic-code table (from taxonomy) | The whole tool chain; a wrong code table splits genes at recoded stops |\n| Decontaminated, QC-passed assembly (CheckM2 gate) | Chimeric gene set \u002F genome-wide corrupt training if skipped; annotation quality is bounded by assembly quality |\n| Evidence set (RNA-seq + protein) | BRAKER3 training quality; without RNA-seq the annotation is isoform-naive, UTR-less |\n| Tool + DB version | Named-vs-hypothetical and accessory-vs-core flip on tool vintage; re-annotate all with one version for comparison |\n\n## Pipeline Overview\n\n```\nAssembled contigs\n    |\n    v\n[0. Assembly QC] ----------> QUAST, BUSCO (confirm assembly quality)\n    |\n    +----- Prokaryotic? -----> Path A: Bakta (one-step annotation)\n    |                                |\n    |                                v\n    |                          Annotated genome (GFF3, GenBank, FASTA)\n    |\n    +----- Eukaryotic? ------> Path B: Multi-step pipeline\n                                    |\n                                    v\n                              [1. Repeat Masking] ----> RepeatModeler + RepeatMasker\n                                    |\n                                    v\n                              [2. Gene Prediction] ---> BRAKER3 (RNA-seq + protein evidence)\n                                    |\n                                    v\n                              [3. Functional Annotation] -> eggNOG-mapper + InterProScan\n                                    |\n                                    v\n                              [4. ncRNA Annotation] ---> Infernal + tRNAscan-SE\n                                    |\n                                    v\n                              Annotated genome (GFF3, proteins, functional tables)\n```\n\n## Path A: Prokaryotic Annotation (Bakta)\n\nBakta provides comprehensive one-step annotation for bacteria and archaea. Preferred over Prokka for new projects.\n\n### Database Setup\n\n```bash\nbakta_db download --output \u002Fpath\u002Fto\u002Fbakta_db --type full\n```\n\n### Run Bakta\n\n```bash\nbakta \\\n    --db \u002Fpath\u002Fto\u002Fbakta_db \\\n    --output bakta_out \\\n    --prefix my_genome \\\n    --locus-tag MYORG \\\n    --genus Escherichia --species \"coli\" \\\n    --strain K12 \\\n    --gram - \\\n    --translation-table 11 \\\n    --threads 8 \\\n    assembly.fasta\n# Set --translation-table from the GTDB-Tk classification, never a guess: table 11 for most\n# bacteria, but --translation-table 4 for Mycoplasma\u002FSpiroplasma (UGA = Trp, not stop) --\n# annotating a Mycoplasma under table 11 splits every gene at its internal UGA codons.\n# Add --complete ONLY for finished replicons; omit it for draft contigs (the common input).\n```\n\n### Prokaryotic QC Checkpoint\n\n```python\nimport subprocess\nimport json\n\ndef validate_prokaryotic_annotation(bakta_dir, prefix, expected_cds_range=(500, 8000)):\n    '''\n    QC gates for prokaryotic annotation.\n    - CDS count in expected range for genome size\n    - tRNA count >= 20 (typical minimum for free-living bacteria)\n    - rRNA operons detected\n    '''\n    gff_file = f'{bakta_dir}\u002F{prefix}.gff3'\n\n    feature_counts = {'CDS': 0, 'tRNA': 0, 'rRNA': 0, 'tmRNA': 0, 'ncRNA': 0}\n    with open(gff_file) as f:\n        for line in f:\n            if line.startswith('#'):\n                continue\n            fields = line.strip().split('\\t')\n            if len(fields) >= 3 and fields[2] in feature_counts:\n                feature_counts[fields[2]] += 1\n\n    qc_pass = True\n    if not (expected_cds_range[0] \u003C= feature_counts['CDS'] \u003C= expected_cds_range[1]):\n        print(f'WARNING: CDS count {feature_counts[\"CDS\"]} outside expected range {expected_cds_range}')\n        qc_pass = False\n    if feature_counts['tRNA'] \u003C 20:\n        print(f'WARNING: Only {feature_counts[\"tRNA\"]} tRNAs detected (expect >= 20)')\n        qc_pass = False\n\n    print(f'Feature summary: {feature_counts}')\n    return qc_pass, feature_counts\n```\n\n## Path B: Eukaryotic Annotation\n\n### Step 1: Repeat Masking\n\n```bash\n# Build the RepeatModeler database FIRST, then the species-specific library\nBuildDatabase -name mygenome assembly.fasta\nRepeatModeler -database mygenome -threads 8 -LTRStruct\n\n# CURATE the de novo library against a protein DB before masking, or real multi-copy gene\n# families (NLR\u002FR-genes, zinc-fingers) get masked and \"discovered\" as a gene-poor repertoire.\n# Then soft-mask with the curated library (RepeatMasker uses the bundled Dfam DB in addition).\nRepeatMasker \\\n    -lib mygenome-families.fa \\\n    -pa 8 \\\n    -xsmall \\\n    -gff \\\n    -dir repeat_out \\\n    assembly.fasta\n```\n\n#### Repeat Masking QC Checkpoint\n\n```python\ndef check_repeat_content(repeatmasker_tbl, taxon='vertebrate'):\n    '''\n    Verify repeat content is within expected range for taxon.\n    Typical ranges:\n    - Vertebrate: 30-60%\n    - Insect: 15-45%\n    - Plant: 20-85%\n    - Fungus: 3-20%\n    '''\n    expected_ranges = {\n        'vertebrate': (30, 60), 'insect': (15, 45),\n        'plant': (20, 85), 'fungus': (3, 20)\n    }\n    low, high = expected_ranges.get(taxon, (5, 80))\n\n    with open(repeatmasker_tbl) as f:\n        for line in f:\n            if 'total interspersed' in line.lower():\n                pct = float(line.strip().split()[-1].replace('%', ''))\n                break\n\n    qc_pass = low \u003C= pct \u003C= high\n    if not qc_pass:\n        print(f'WARNING: Repeat content {pct:.1f}% outside expected range ({low}-{high}%) for {taxon}')\n    return qc_pass, pct\n```\n\n### Step 2: Gene Prediction with BRAKER3\n\n```bash\n# BRAKER3 combines GeneMark-ETP, AUGUSTUS, and TSEBRA\n# Uses both RNA-seq and protein evidence for best results\nbraker.pl \\\n    --genome=repeat_out\u002Fassembly.fasta.masked \\\n    --bam=rnaseq_sorted.bam \\\n    --prot_seq=proteins.fa \\\n    --softmasking \\\n    --threads 8 \\\n    --species=my_species \\\n    --gff3 \\\n    --workingdir=braker_out\n\n# If only RNA-seq evidence available\nbraker.pl \\\n    --genome=repeat_out\u002Fassembly.fasta.masked \\\n    --bam=rnaseq_sorted.bam \\\n    --softmasking \\\n    --threads 8 \\\n    --species=my_species \\\n    --gff3\n\n# If only protein evidence available (use OrthoDB proteins)\nbraker.pl \\\n    --genome=repeat_out\u002Fassembly.fasta.masked \\\n    --prot_seq=orthodb_proteins.fa \\\n    --softmasking \\\n    --threads 8 \\\n    --species=my_species \\\n    --gff3\n```\n\n#### Gene Prediction QC Checkpoint\n\n```bash\n# BUSCO completeness on predicted proteins. Use the DEEPEST applicable clade dataset\n# (e.g. insecta_odb10 \u002F embryophyta_odb10), NOT the shallow eukaryota_odb10.\n# The diagnostic that matters: compare this proteome BUSCO to a genome-mode BUSCO on the\n# same assembly -- a large gap means the predictor missed present genes (see genome-annotation\u002Fannotation-qc).\nbusco \\\n    -i braker_out\u002Fbraker.aa \\\n    -l \u003Cclade>_odb10 \\\n    -o busco_annotation \\\n    -m proteins \\\n    --cpu 8\n```\n\n```python\ndef check_gene_prediction(braker_gff, busco_summary, expected_genes_range=(15000, 35000)):\n    '''\n    QC gates after gene prediction.\n    - Gene count within expected range for genome\n    - BUSCO completeness > 90%\n    - Mean exons per gene > 1 (spliced genes expected in eukaryotes)\n    '''\n    gene_count = 0\n    exon_count = 0\n    with open(braker_gff) as f:\n        for line in f:\n            if line.startswith('#'):\n                continue\n            feature = line.strip().split('\\t')[2] if len(line.strip().split('\\t')) >= 3 else ''\n            if feature == 'gene':\n                gene_count += 1\n            elif feature == 'exon':\n                exon_count += 1\n\n    mean_exons = exon_count \u002F gene_count if gene_count > 0 else 0\n\n    with open(busco_summary) as f:\n        for line in f:\n            if line.strip().startswith('C:'):\n                completeness = float(line.strip().split('C:')[1].split('%')[0])\n                break\n\n    issues = []\n    if not (expected_genes_range[0] \u003C= gene_count \u003C= expected_genes_range[1]):\n        issues.append(f'Gene count {gene_count} outside expected range {expected_genes_range}')\n    if completeness \u003C 90:\n        issues.append(f'BUSCO completeness {completeness:.1f}% \u003C 90%')\n    if mean_exons \u003C 2:\n        issues.append(f'Mean exons\u002Fgene {mean_exons:.1f} is low for eukaryote')\n\n    print(f'Genes: {gene_count}, Mean exons\u002Fgene: {mean_exons:.1f}, BUSCO: {completeness:.1f}%')\n    return len(issues) == 0, issues\n```\n\n### Step 3: Functional Annotation\n\n```bash\n# eggNOG-mapper for comprehensive functional annotation\nemapper.py \\\n    -i braker_out\u002Fbraker.aa \\\n    --output eggnog_results \\\n    --cpu 8 \\\n    -m diamond \\\n    --tax_scope auto \\\n    --go_evidence non-electronic \\\n    --target_orthologs all \\\n    --seed_ortholog_evalue 1e-5 \\\n    --override\n\n# InterProScan for domain annotation (complementary to eggNOG)\ninterproscan.sh \\\n    -i braker_out\u002Fbraker.aa \\\n    -b interpro_results \\\n    -f tsv,gff3 \\\n    -goterms \\\n    -pa \\\n    -cpu 8\n```\n\n#### Functional Annotation QC Checkpoint\n\n```python\nimport pandas as pd\n\ndef check_functional_annotation(eggnog_annotations, total_genes):\n    '''\n    QC gate: > 60% of genes should have functional assignment.\n    Below 50% suggests database issues or highly divergent organism.\n    '''\n    cols = ['query', 'seed_ortholog', 'evalue', 'score', 'eggNOG_OGs', 'max_annot_lvl',\n            'COG_category', 'Description', 'Preferred_name', 'GOs', 'EC', 'KEGG_ko']\n    df = pd.read_csv(eggnog_annotations, sep='\\t', comment='#', header=None)\n    df.columns = (cols + [f'c{i}' for i in range(len(df.columns) - len(cols))])[:len(df.columns)]\n    annotated = len(df[df['Description'] != '-'])\n    pct_annotated = annotated \u002F total_genes * 100\n\n    has_go = len(df[df['GOs'] != '-'])\n    has_kegg = len(df[df['KEGG_ko'] != '-'])\n\n    print(f'Annotated: {annotated}\u002F{total_genes} ({pct_annotated:.1f}%)')\n    print(f'With GO terms: {has_go}, With KEGG: {has_kegg}')\n\n    if pct_annotated \u003C 60:\n        print('WARNING: \u003C60% annotated. Check database version or use broader taxonomy scope.')\n    return pct_annotated >= 60\n```\n\n### Step 4: ncRNA Annotation\n\n```bash\n# tRNAscan-SE for tRNA genes\ntRNAscan-SE \\\n    -E \\\n    --thread 8 \\\n    -o trna_results.txt \\\n    --gff trna.gff \\\n    assembly.fasta\n\n# Infernal for Rfam-based ncRNA annotation. Rfam.cm ships pre-calibrated: cmpress it, never recalibrate.\n# --cut_ga uses the curated per-family bit-score gathering thresholds (the correct Rfam default over a\n# flat E-value); --rfam is the large-DB strict filter; --nohmmonly keeps GA valid for every model.\ncmpress Rfam.cm\ncmscan \\\n    --cpu 8 \\\n    --cut_ga --rfam --nohmmonly \\\n    --tblout rfam_results.tbl \\\n    --fmt 2 \\\n    --clanin Rfam.clanin \\\n    Rfam.cm \\\n    assembly.fasta\n# Clan deoverlapping: drop hits marked '=' (dominated by a higher-scoring clanmate)\ngrep -v ' = ' rfam_results.tbl > rfam_results.deoverlapped.tbl\n```\n\n## Merging Annotations\n\n```python\ndef merge_annotations(braker_gff, trna_gff, rfam_tbl, eggnog_tsv, output_gff):\n    '''Merge gene predictions, ncRNAs, and functional annotations into final GFF3.'''\n    import subprocess\n\n    # Use AGAT for GFF merging and validation\n    subprocess.run([\n        'agat_sp_merge_annotations.pl',\n        '--gff', braker_gff,\n        '--gff', trna_gff,\n        '-o', output_gff\n    ], check=True)\n\n    # Validate final GFF3\n    subprocess.run([\n        'agat_sp_statistics.pl',\n        '--gff', output_gff,\n        '-o', output_gff.replace('.gff3', '_stats.txt')\n    ], check=True)\n\n    print(f'Merged annotations written to {output_gff}')\n```\n\n## Common Errors\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| Chimeric gene set; training corrupted genome-wide | Annotated a contaminated assembly | CheckM2\u002FFCS-GX gate BEFORE annotation; decontaminate first |\n| Genes split at recoded stops; low coding density, high hypothetical | Wrong genetic-code table | Set the table from GTDB-Tk taxonomy, not a guess |\n| Real NLR\u002Fimmune gene families deleted; suspiciously gene-poor | Over-masking with an uncurated repeat library | Filter the RepeatModeler library against a protein DB; confirm conserved families survive; soft-mask `-xsmall` |\n| Accessory genome inflated ~10x in a pangenome | Frozen-DB annotation drift (Panaroo) | Re-annotate all assemblies with ONE pipeline + DB version from FASTA; existing GenBank annotations are unusable for pangenomics |\n| BUSCO looks great but models are wrong | BUSCO-only quality claim (certifies ~1000 easy genes) | Proteome-mode BUSCO on delivered proteins; add mono-exonic fraction + length distribution + mRNA:gene ratio |\n| Low gene count | Repeat masking too aggressive | Soft-mask (`-xsmall`) not hard-mask; curate the TE library first |\n| Isoform-naive annotation (mRNA:gene = 1.00) | No RNA-seq evidence | Add RNA-seq (Iso-Seq for isoforms\u002FUTRs) to BRAKER3 |\n\n## Complete Pipeline Script\n\n```bash\n#!\u002Fbin\u002Fbash\nset -e\n\nGENOME=\"assembly.fasta\"\nRNASEQ_BAM=\"rnaseq_sorted.bam\"\nPROTEINS=\"orthodb_proteins.fa\"\nBAKTA_DB=\"\u002Fpath\u002Fto\u002Fbakta_db\"\nTHREADS=8\n\n# Determine organism type\nORGANISM_TYPE=\"${1:-eukaryotic}\"  # prokaryotic or eukaryotic\n\nif [ \"$ORGANISM_TYPE\" == \"prokaryotic\" ]; then\n    echo \"Running prokaryotic annotation with Bakta\"\n    echo \"Step 0: Contamination\u002Fcompleteness gate (CheckM2 before annotation is non-negotiable)\"\n    checkm2 predict --input $GENOME --output-directory checkm2_out --threads $THREADS\n    # Inspect checkm2_out\u002Fquality_report.tsv: proceed only if Completeness is high and Contamination \u003C 5%\n    # --translation-table comes from the GTDB-Tk classification, never a guess (rule 1). Bakta silently\n    # assumes table 11; Mycoplasma\u002FSpiroplasma need 4 (UGA = Trp, not stop) or every gene is truncated.\n    bakta --db $BAKTA_DB --output bakta_out --prefix genome --translation-table 11 \\\n          --locus-tag MYORG --threads $THREADS $GENOME\n    echo \"Done. Results in bakta_out\u002F\"\n\nelse\n    echo \"Running eukaryotic annotation pipeline\"\n\n    echo \"Step 0: Assembly QC (contiguity + completeness before committing to annotation)\"\n    quast.py $GENOME -o quast_out --threads $THREADS\n    busco -i $GENOME -l \"${LINEAGE:?set the DEEPEST applicable clade dataset, e.g. insecta_odb10 \u002F embryophyta_odb10; eukaryota_odb10 is too shallow and inflates completeness}\" -o busco_asm -m genome --cpu $THREADS\n\n    echo \"Step 1: Repeat masking\"\n    BuildDatabase -name mygenome $GENOME\n    RepeatModeler -database mygenome -threads $THREADS -LTRStruct\n    RepeatMasker -lib mygenome-families.fa -pa $THREADS -xsmall -gff -dir repeat_out $GENOME\n\n    echo \"Step 2: Gene prediction with BRAKER3\"\n    braker.pl --genome=repeat_out\u002F$(basename $GENOME).masked \\\n              --bam=$RNASEQ_BAM --prot_seq=$PROTEINS \\\n              --softmasking --threads $THREADS --gff3 --workingdir=braker_out\n\n    echo \"Step 3: BUSCO QC (use the deepest applicable clade dataset, not eukaryota_odb10)\"\n    busco -i braker_out\u002Fbraker.aa -l \"${LINEAGE:?set the DEEPEST applicable clade dataset, e.g. insecta_odb10 \u002F embryophyta_odb10; eukaryota_odb10 is too shallow and inflates completeness}\" -o busco_check -m proteins --cpu $THREADS\n\n    echo \"Step 4: Functional annotation\"\n    emapper.py -i braker_out\u002Fbraker.aa --output eggnog_out --cpu $THREADS -m diamond\n\n    echo \"Step 5: ncRNA annotation\"\n    tRNAscan-SE -E --thread $THREADS -o trna_out.txt --gff trna.gff $GENOME\n    cmscan --cpu $THREADS --cut_ga --rfam --nohmmonly --tblout rfam.tbl --fmt 2 --clanin Rfam.clanin Rfam.cm $GENOME\n\n    echo \"Done. Check braker_out\u002F, eggnog_out*, trna.gff, rfam.tbl\"\nfi\n```\n\n## Related Skills\n\n- genome-annotation\u002Fprokaryotic-annotation - Bakta and Prokka details\n- genome-annotation\u002Feukaryotic-gene-prediction - BRAKER3 and AUGUSTUS options\n- genome-annotation\u002Frepeat-annotation - Soft-masking before gene prediction\n- genome-annotation\u002Ffunctional-annotation - eggNOG-mapper and InterProScan\n- genome-annotation\u002Fncrna-annotation - Infernal\u002FRfam and tRNAscan-SE detail\n- rna-structure\u002Fncrna-search - Covariance-model search, gathering thresholds, and clan resolution\n- genome-annotation\u002Fannotation-qc - BUSCO genome-vs-proteome, OMArk, CheckM2 gates\n- genome-assembly\u002Fassembly-qc - Pre-annotation assembly quality checks\n- genome-intervals\u002Fgtf-gff-handling - GFF3\u002FGTF hierarchy traversal, AGAT sanitizing\u002Fvalidation, coordinate conversion, and seqid-consistency checks on the merged annotation\n- workflows\u002Fgenome-assembly-pipeline - Upstream: hands off the decontaminated, QC-passed FASTA (with its QV\u002FBUSCO)\n\n## References\n\n- Salzberg SL (2019) Next-generation genome annotation: we still struggle to get it right. *Genome Biology* 20:92. DOI 10.1186\u002Fs13059-019-1715-2. (error propagation.)\n- Gabriel L, Bruna T, Hoff KJ, et al (2024) BRAKER3: fully automated genome annotation using RNA-seq and protein evidence with GeneMark-ETP, AUGUSTUS, and TSEBRA. *Genome Research* 34:769-777. DOI 10.1101\u002Fgr.278090.123. (high-confidence training-set mining.)\n- Tonkin-Hill G, MacAlasdair N, Ruis C, et al (2020) Producing polished prokaryotic pangenomes with the Panaroo pipeline. *Genome Biology* 21:180. DOI 10.1186\u002Fs13059-020-02090-4. (annotation-drift accessory inflation.)\n- Schwengers O, Jelonek L, Dieckmann MA, et al (2021) Bakta: rapid and standardized annotation of bacterial genomes via alignment-free sequence identification. *Microbial Genomics* 7:000685. DOI 10.1099\u002Fmgen.0.000685.\n","## Version Compatibility\n\nReference examples tested with: BRAKER3 3.0+, BUSCO 5.5+, Bakta 1.9+, Infernal 1.1+, InterProScan 5.66+, Prokka 1.14+, RepeatMasker 4.1+, RepeatModeler 2.0.4+ (-threads replaced -pa in 2.0.4), eggNOG-mapper 2.1+, pandas 2.2+, tRNAscan-SE 2.0+\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n- CLI: `\u003Ctool> --version` then `\u003Ctool> --help` to confirm flags\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed\npackage and adapt the example to match the actual API rather than retrying.\n\n# Genome Annotation Pipeline\n\n**\"Annotate my genome assembly\"** -> Orchestrate prokaryotic (Bakta) or eukaryotic (BRAKER3) gene prediction, repeat masking (RepeatMasker), functional annotation (eggNOG-mapper, InterProScan), and ncRNA annotation (Infernal).\n\nThis is a workflow skill: it owns the chaining decisions and hand-offs, not the internals of any one step.\n\n## The governing principle\n\nA gene set is ~95% right and 100% confident; its trustworthiness is decided at four seams, not inside the gene-finder.\n\n1. **Pro- vs eukaryotic is THE fork, committed from taxonomy up front, and it fixes the genetic-code table.** Prokaryote -> Bakta one-step (verify the genetic-code TABLE from GTDB-Tk classification, never guess — a Mycoplasma under table 11 splits every gene at internal UGA). Eukaryote -> multi-step RepeatMask -> BRAKER3 -> functional -> ncRNA. There is no general-purpose eukaryote annotator: alternative genetic codes, trans-splicing, and polycistronic transcription break standard pipelines.\n2. **Annotate ONLY a decontaminated, QC-passed assembly.** CheckM2 before prokaryotic annotation is non-negotiable: contamination >5% mixes two organisms' genes into one chimeric set; a gene-finder trained on a contaminated\u002Ffragmented assembly produces confidently-wrong models genome-wide that are invisible in the GFF3. Annotation quality is bounded above by assembly quality.\n3. **The evidence set is a committed input, not an afterthought.** Eukaryotic: RNA-seq BAM + protein (OrthoDB) evidence drives BRAKER3's high-confidence training-set mining (the real advance — learning from loci where transcripts AND homology agree). Committing RNA-seq (ideally Iso-Seq for isoforms+UTRs) is decided at project design; without it the annotation is one-isoform, CDS-only, UTR-less and silently poisons AS\u002F3'-tag\u002FAPA analyses.\n4. **Tool + DB version + date is a reproducibility commitment.** Bakta's DB is versioned (record it); Prokka's is frozen ~2019 (a post-2019 gene is \"hypothetical\" in Prokka, \"named\" in Bakta — accessory-vs-core flips on tool vintage alone). For any comparison, re-annotate everyone with ONE pipeline + ONE DB version from FASTA.\n\n## Made-once commitments\n\n| Commitment | Consequence inherited downstream |\n|------------|----------------------------------|\n| Pro- vs eukaryotic path + genetic-code table (from taxonomy) | The whole tool chain; a wrong code table splits genes at recoded stops |\n| Decontaminated, QC-passed assembly (CheckM2 gate) | Chimeric gene set \u002F genome-wide corrupt training if skipped; annotation quality is bounded by assembly quality |\n| Evidence set (RNA-seq + protein) | BRAKER3 training quality; without RNA-seq the annotation is isoform-naive, UTR-less |\n| Tool + DB version | Named-vs-hypothetical and accessory-vs-core flip on tool vintage; re-annotate all with one version for comparison |\n\n## Pipeline Overview\n\n```\nAssembled contigs\n    |\n    v\n[0. Assembly QC] ----------> QUAST, BUSCO (confirm assembly quality)\n    |\n    +----- Prokaryotic? -----> Path A: Bakta (one-step annotation)\n    |                                |\n    |                                v\n    |                          Annotated genome (GFF3, GenBank, FASTA)\n    |\n    +----- Eukaryotic? ------> Path B: Multi-step pipeline\n                                    |\n                                    v\n                              [1. Repeat Masking] ----> RepeatModeler + RepeatMasker\n                                    |\n                                    v\n                              [2. Gene Prediction] ---> BRAKER3 (RNA-seq + protein evidence)\n                                    |\n                                    v\n                              [3. Functional Annotation] -> eggNOG-mapper + InterProScan\n                                    |\n                                    v\n                              [4. ncRNA Annotation] ---> Infernal + tRNAscan-SE\n                                    |\n                                    v\n                              Annotated genome (GFF3, proteins, functional tables)\n```\n\n## Path A: Prokaryotic Annotation (Bakta)\n\nBakta provides comprehensive one-step annotation for bacteria and archaea. Preferred over Prokka for new projects.\n\n### Database Setup\n\n```bash\nbakta_db download --output \u002Fpath\u002Fto\u002Fbakta_db --type full\n```\n\n### Run Bakta\n\n```bash\nbakta \\\n    --db \u002Fpath\u002Fto\u002Fbakta_db \\\n    --output bakta_out \\\n    --prefix my_genome \\\n    --locus-tag MYORG \\\n    --genus Escherichia --species \"coli\" \\\n    --strain K12 \\\n    --gram - \\\n    --translation-table 11 \\\n    --threads 8 \\\n    assembly.fasta\n# Set --translation-table from the GTDB-Tk classification, never a guess: table 11 for most\n# bacteria, but --translation-table 4 for Mycoplasma\u002FSpiroplasma (UGA = Trp, not stop) --\n# annotating a Mycoplasma under table 11 splits every gene at its internal UGA codons.\n# Add --complete ONLY for finished replicons; omit it for draft contigs (the common input).\n```\n\n### Prokaryotic QC Checkpoint\n\n```python\nimport subprocess\nimport json\n\ndef validate_prokaryotic_annotation(bakta_dir, prefix, expected_cds_range=(500, 8000)):\n    '''\n    QC gates for prokaryotic annotation.\n    - CDS count in expected range for genome size\n    - tRNA count >= 20 (typical minimum for free-living bacteria)\n    - rRNA operons detected\n    '''\n    gff_file = f'{bakta_dir}\u002F{prefix}.gff3'\n\n    feature_counts = {'CDS': 0, 'tRNA': 0, 'rRNA': 0, 'tmRNA': 0, 'ncRNA': 0}\n    with open(gff_file) as f:\n        for line in f:\n            if line.startswith('#'):\n                continue\n            fields = line.strip().split('\\t')\n            if len(fields) >= 3 and fields[2] in feature_counts:\n                feature_counts[fields[2]] += 1\n\n    qc_pass = True\n    if not (expected_cds_range[0] \u003C= feature_counts['CDS'] \u003C= expected_cds_range[1]):\n        print(f'WARNING: CDS count {feature_counts[\"CDS\"]} outside expected range {expected_cds_range}')\n        qc_pass = False\n    if feature_counts['tRNA'] \u003C 20:\n        print(f'WARNING: Only {feature_counts[\"tRNA\"]} tRNAs detected (expect >= 20)')\n        qc_pass = False\n\n    print(f'Feature summary: {feature_counts}')\n    return qc_pass, feature_counts\n```\n\n## Path B: Eukaryotic Annotation\n\n### Step 1: Repeat Masking\n\n```bash\n# Build the RepeatModeler database FIRST, then the species-specific library\nBuildDatabase -name mygenome assembly.fasta\nRepeatModeler -database mygenome -threads 8 -LTRStruct\n\n# CURATE the de novo library against a protein DB before masking, or real multi-copy gene\n# families (NLR\u002FR-genes, zinc-fingers) get masked and \"discovered\" as a gene-poor repertoire.\n# Then soft-mask with the curated library (RepeatMasker uses the bundled Dfam DB in addition).\nRepeatMasker \\\n    -lib mygenome-families.fa \\\n    -pa 8 \\\n    -xsmall \\\n    -gff \\\n    -dir repeat_out \\\n    assembly.fasta\n```\n\n#### Repeat Masking QC Checkpoint\n\n```python\ndef check_repeat_content(repeatmasker_tbl, taxon='vertebrate'):\n    '''\n    Verify repeat content is within expected range for taxon.\n    Typical ranges:\n    - Vertebrate: 30-60%\n    - Insect: 15-45%\n    - Plant: 20-85%\n    - Fungus: 3-20%\n    '''\n    expected_ranges = {\n        'vertebrate': (30, 60), 'insect': (15, 45),\n        'plant': (20, 85), 'fungus': (3, 20)\n    }\n    low, high = expected_ranges.get(taxon, (5, 80))\n\n    with open(repeatmasker_tbl) as f:\n        for line in f:\n            if 'total interspersed' in line.lower():\n                pct = float(line.strip().split()[-1].replace('%', ''))\n                break\n\n    qc_pass = low \u003C= pct \u003C= high\n    if not qc_pass:\n        print(f'WARNING: Repeat content {pct:.1f}% outside expected range ({low}-{high}%) for {taxon}')\n    return qc_pass, pct\n```\n\n### Step 2: Gene Prediction with BRAKER3\n\n```bash\n# BRAKER3 combines GeneMark-ETP, AUGUSTUS, and TSEBRA\n# Uses both RNA-seq and protein evidence for best results\nbraker.pl \\\n    --genome=repeat_out\u002Fassembly.fasta.masked \\\n    --bam=rnaseq_sorted.bam \\\n    --prot_seq=proteins.fa \\\n    --softmasking \\\n    --threads 8 \\\n    --species=my_species \\\n    --gff3 \\\n    --workingdir=braker_out\n\n# If only RNA-seq evidence available\nbraker.pl \\\n    --genome=repeat_out\u002Fassembly.fasta.masked \\\n    --bam=rnaseq_sorted.bam \\\n    --softmasking \\\n    --threads 8 \\\n    --species=my_species \\\n    --gff3\n\n# If only protein evidence available (use OrthoDB proteins)\nbraker.pl \\\n    --genome=repeat_out\u002Fassembly.fasta.masked \\\n    --prot_seq=orthodb_proteins.fa \\\n    --softmasking \\\n    --threads 8 \\\n    --species=my_species \\\n    --gff3\n```\n\n#### Gene Prediction QC Checkpoint\n\n```bash\n# BUSCO completeness on predicted proteins. Use the DEEPEST applicable clade dataset\n# (e.g. insecta_odb10 \u002F embryophyta_odb10), NOT the shallow eukaryota_odb10.\n# The diagnostic that matters: compare this proteome BUSCO to a genome-mode BUSCO on the\n# same assembly -- a large gap means the predictor missed present genes (see genome-annotation\u002Fannotation-qc).\nbusco \\\n    -i braker_out\u002Fbraker.aa \\\n    -l \u003Cclade>_odb10 \\\n    -o busco_annotation \\\n    -m proteins \\\n    --cpu 8\n```\n\n```python\ndef check_gene_prediction(braker_gff, busco_summary, expected_genes_range=(15000, 35000)):\n    '''\n    QC gates after gene prediction.\n    - Gene count within expected range for genome\n    - BUSCO completeness > 90%\n    - Mean exons per gene > 1 (spliced genes expected in eukaryotes)\n    '''\n    gene_count = 0\n    exon_count = 0\n    with open(braker_gff) as f:\n        for line in f:\n            if line.startswith('#'):\n                continue\n            feature = line.strip().split('\\t')[2] if len(line.strip().split('\\t')) >= 3 else ''\n            if feature == 'gene':\n                gene_count += 1\n            elif feature == 'exon':\n                exon_count += 1\n\n    mean_exons = exon_count \u002F gene_count if gene_count > 0 else 0\n\n    with open(busco_summary) as f:\n        for line in f:\n            if line.strip().startswith('C:'):\n                completeness = float(line.strip().split('C:')[1].split('%')[0])\n                break\n\n    issues = []\n    if not (expected_genes_range[0] \u003C= gene_count \u003C= expected_genes_range[1]):\n        issues.append(f'Gene count {gene_count} outside expected range {expected_genes_range}')\n    if completeness \u003C 90:\n        issues.append(f'BUSCO completeness {completeness:.1f}% \u003C 90%')\n    if mean_exons \u003C 2:\n        issues.append(f'Mean exons\u002Fgene {mean_exons:.1f} is low for eukaryote')\n\n    print(f'Genes: {gene_count}, Mean exons\u002Fgene: {mean_exons:.1f}, BUSCO: {completeness:.1f}%')\n    return len(issues) == 0, issues\n```\n\n### Step 3: Functional Annotation\n\n```bash\n# eggNOG-mapper for comprehensive functional annotation\nemapper.py \\\n    -i braker_out\u002Fbraker.aa \\\n    --output eggnog_results \\\n    --cpu 8 \\\n    -m diamond \\\n    --tax_scope auto \\\n    --go_evidence non-electronic \\\n    --target_orthologs all \\\n    --seed_ortholog_evalue 1e-5 \\\n    --override\n\n# InterProScan for domain annotation (complementary to eggNOG)\ninterproscan.sh \\\n    -i braker_out\u002Fbraker.aa \\\n    -b interpro_results \\\n    -f tsv,gff3 \\\n    -goterms \\\n    -pa \\\n    -cpu 8\n```\n\n#### Functional Annotation QC Checkpoint\n\n```python\nimport pandas as pd\n\ndef check_functional_annotation(eggnog_annotations, total_genes):\n    '''\n    QC gate: > 60% of genes should have functional assignment.\n    Below 50% suggests database issues or highly divergent organism.\n    '''\n    cols = ['query', 'seed_ortholog', 'evalue', 'score', 'eggNOG_OGs', 'max_annot_lvl',\n            'COG_category', 'Description', 'Preferred_name', 'GOs', 'EC', 'KEGG_ko']\n    df = pd.read_csv(eggnog_annotations, sep='\\t', comment='#', header=None)\n    df.columns = (cols + [f'c{i}' for i in range(len(df.columns) - len(cols))])[:len(df.columns)]\n    annotated = len(df[df['Description'] != '-'])\n    pct_annotated = annotated \u002F total_genes * 100\n\n    has_go = len(df[df['GOs'] != '-'])\n    has_kegg = len(df[df['KEGG_ko'] != '-'])\n\n    print(f'Annotated: {annotated}\u002F{total_genes} ({pct_annotated:.1f}%)')\n    print(f'With GO terms: {has_go}, With KEGG: {has_kegg}')\n\n    if pct_annotated \u003C 60:\n        print('WARNING: \u003C60% annotated. Check database version or use broader taxonomy scope.')\n    return pct_annotated >= 60\n```\n\n### Step 4: ncRNA Annotation\n\n```bash\n# tRNAscan-SE for tRNA genes\ntRNAscan-SE \\\n    -E \\\n    --thread 8 \\\n    -o trna_results.txt \\\n    --gff trna.gff \\\n    assembly.fasta\n\n# Infernal for Rfam-based ncRNA annotation. Rfam.cm ships pre-calibrated: cmpress it, never recalibrate.\n# --cut_ga uses the curated per-family bit-score gathering thresholds (the correct Rfam default over a\n# flat E-value); --rfam is the large-DB strict filter; --nohmmonly keeps GA valid for every model.\ncmpress Rfam.cm\ncmscan \\\n    --cpu 8 \\\n    --cut_ga --rfam --nohmmonly \\\n    --tblout rfam_results.tbl \\\n    --fmt 2 \\\n    --clanin Rfam.clanin \\\n    Rfam.cm \\\n    assembly.fasta\n# Clan deoverlapping: drop hits marked '=' (dominated by a higher-scoring clanmate)\ngrep -v ' = ' rfam_results.tbl > rfam_results.deoverlapped.tbl\n```\n\n## Merging Annotations\n\n```python\ndef merge_annotations(braker_gff, trna_gff, rfam_tbl, eggnog_tsv, output_gff):\n    '''Merge gene predictions, ncRNAs, and functional annotations into final GFF3.'''\n    import subprocess\n\n    # Use AGAT for GFF merging and validation\n    subprocess.run([\n        'agat_sp_merge_annotations.pl',\n        '--gff', braker_gff,\n        '--gff', trna_gff,\n        '-o', output_gff\n    ], check=True)\n\n    # Validate final GFF3\n    subprocess.run([\n        'agat_sp_statistics.pl',\n        '--gff', output_gff,\n        '-o', output_gff.replace('.gff3', '_stats.txt')\n    ], check=True)\n\n    print(f'Merged annotations written to {output_gff}')\n```\n\n## Common Errors\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| Chimeric gene set; training corrupted genome-wide | Annotated a contaminated assembly | CheckM2\u002FFCS-GX gate BEFORE annotation; decontaminate first |\n| Genes split at recoded stops; low coding density, high hypothetical | Wrong genetic-code table | Set the table from GTDB-Tk taxonomy, not a guess |\n| Real NLR\u002Fimmune gene families deleted; suspiciously gene-poor | Over-masking with an uncurated repeat library | Filter the RepeatModeler library against a protein DB; confirm conserved families survive; soft-mask `-xsmall` |\n| Accessory genome inflated ~10x in a pangenome | Frozen-DB annotation drift (Panaroo) | Re-annotate all assemblies with ONE pipeline + DB version from FASTA; existing GenBank annotations are unusable for pangenomics |\n| BUSCO looks great but models are wrong | BUSCO-only quality claim (certifies ~1000 easy genes) | Proteome-mode BUSCO on delivered proteins; add mono-exonic fraction + length distribution + mRNA:gene ratio |\n| Low gene count | Repeat masking too aggressive | Soft-mask (`-xsmall`) not hard-mask; curate the TE library first |\n| Isoform-naive annotation (mRNA:gene = 1.00) | No RNA-seq evidence | Add RNA-seq (Iso-Seq for isoforms\u002FUTRs) to BRAKER3 |\n\n## Complete Pipeline Script\n\n```bash\n#!\u002Fbin\u002Fbash\nset -e\n\nGENOME=\"assembly.fasta\"\nRNASEQ_BAM=\"rnaseq_sorted.bam\"\nPROTEINS=\"orthodb_proteins.fa\"\nBAKTA_DB=\"\u002Fpath\u002Fto\u002Fbakta_db\"\nTHREADS=8\n\n# Determine organism type\nORGANISM_TYPE=\"${1:-eukaryotic}\"  # prokaryotic or eukaryotic\n\nif [ \"$ORGANISM_TYPE\" == \"prokaryotic\" ]; then\n    echo \"Running prokaryotic annotation with Bakta\"\n    echo \"Step 0: Contamination\u002Fcompleteness gate (CheckM2 before annotation is non-negotiable)\"\n    checkm2 predict --input $GENOME --output-directory checkm2_out --threads $THREADS\n    # Inspect checkm2_out\u002Fquality_report.tsv: proceed only if Completeness is high and Contamination \u003C 5%\n    # --translation-table comes from the GTDB-Tk classification, never a guess (rule 1). Bakta silently\n    # assumes table 11; Mycoplasma\u002FSpiroplasma need 4 (UGA = Trp, not stop) or every gene is truncated.\n    bakta --db $BAKTA_DB --output bakta_out --prefix genome --translation-table 11 \\\n          --locus-tag MYORG --threads $THREADS $GENOME\n    echo \"Done. Results in bakta_out\u002F\"\n\nelse\n    echo \"Running eukaryotic annotation pipeline\"\n\n    echo \"Step 0: Assembly QC (contiguity + completeness before committing to annotation)\"\n    quast.py $GENOME -o quast_out --threads $THREADS\n    busco -i $GENOME -l \"${LINEAGE:?set the DEEPEST applicable clade dataset, e.g. insecta_odb10 \u002F embryophyta_odb10; eukaryota_odb10 is too shallow and inflates completeness}\" -o busco_asm -m genome --cpu $THREADS\n\n    echo \"Step 1: Repeat masking\"\n    BuildDatabase -name mygenome $GENOME\n    RepeatModeler -database mygenome -threads $THREADS -LTRStruct\n    RepeatMasker -lib mygenome-families.fa -pa $THREADS -xsmall -gff -dir repeat_out $GENOME\n\n    echo \"Step 2: Gene prediction with BRAKER3\"\n    braker.pl --genome=repeat_out\u002F$(basename $GENOME).masked \\\n              --bam=$RNASEQ_BAM --prot_seq=$PROTEINS \\\n              --softmasking --threads $THREADS --gff3 --workingdir=braker_out\n\n    echo \"Step 3: BUSCO QC (use the deepest applicable clade dataset, not eukaryota_odb10)\"\n    busco -i braker_out\u002Fbraker.aa -l \"${LINEAGE:?set the DEEPEST applicable clade dataset, e.g. insecta_odb10 \u002F embryophyta_odb10; eukaryota_odb10 is too shallow and inflates completeness}\" -o busco_check -m proteins --cpu $THREADS\n\n    echo \"Step 4: Functional annotation\"\n    emapper.py -i braker_out\u002Fbraker.aa --output eggnog_out --cpu $THREADS -m diamond\n\n    echo \"Step 5: ncRNA annotation\"\n    tRNAscan-SE -E --thread $THREADS -o trna_out.txt --gff trna.gff $GENOME\n    cmscan --cpu $THREADS --cut_ga --rfam --nohmmonly --tblout rfam.tbl --fmt 2 --clanin Rfam.clanin Rfam.cm $GENOME\n\n    echo \"Done. Check braker_out\u002F, eggnog_out*, trna.gff, rfam.tbl\"\nfi\n```\n\n## Related Skills\n\n- genome-annotation\u002Fprokaryotic-annotation - Bakta and Prokka details\n- genome-annotation\u002Feukaryotic-gene-prediction - BRAKER3 and AUGUSTUS options\n- genome-annotation\u002Frepeat-annotation - Soft-masking before gene prediction\n- genome-annotation\u002Ffunctional-annotation - eggNOG-mapper and InterProScan\n- genome-annotation\u002Fncrna-annotation - Infernal\u002FRfam and tRNAscan-SE detail\n- rna-structure\u002Fncrna-search - Covariance-model search, gathering thresholds, and clan resolution\n- genome-annotation\u002Fannotation-qc - BUSCO genome-vs-proteome, OMArk, CheckM2 gates\n- genome-assembly\u002Fassembly-qc - Pre-annotation assembly quality checks\n- genome-intervals\u002Fgtf-gff-handling - GFF3\u002FGTF hierarchy traversal, AGAT sanitizing\u002Fvalidation, coordinate conversion, and seqid-consistency checks on the merged annotation\n- workflows\u002Fgenome-assembly-pipeline - Upstream: hands off the decontaminated, QC-passed FASTA (with its QV\u002FBUSCO)\n\n## References\n\n- Salzberg SL (2019) Next-generation genome annotation: we still struggle to get it right. *Genome Biology* 20:92. DOI 10.1186\u002Fs13059-019-1715-2. (error propagation.)\n- Gabriel L, Bruna T, Hoff KJ, et al (2024) BRAKER3: fully automated genome annotation using RNA-seq and protein evidence with GeneMark-ETP, AUGUSTUS, and TSEBRA. *Genome Research* 34:769-777. DOI 10.1101\u002Fgr.278090.123. (high-confidence training-set mining.)\n- Tonkin-Hill G, MacAlasdair N, Ruis C, et al (2020) Producing polished prokaryotic pangenomes with the Panaroo pipeline. *Genome Biology* 21:180. DOI 10.1186\u002Fs13059-020-02090-4. (annotation-drift accessory inflation.)\n- Schwengers O, Jelonek L, Dieckmann MA, et al (2021) Bakta: rapid and standardized annotation of bacterial genomes via alignment-free sequence identification. *Microbial Genomics* 7:000685. DOI 10.1099\u002Fmgen.0.000685.\n",{"name":5,"source":24,"license":15,"workflow":25,"tool_type":26,"depends_on":27,"description":7,"imported_at":35,"source_path":36,"primary_tool":37,"qc_checkpoints":38,"source_repository":45,"goal_approach_exempt":25},"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills",true,"mixed",[28,29,30,31,32,33,34],"genome-annotation\u002Fprokaryotic-annotation","genome-annotation\u002Feukaryotic-gene-prediction","genome-annotation\u002Frepeat-annotation","genome-annotation\u002Ffunctional-annotation","genome-annotation\u002Fncrna-annotation","genome-annotation\u002Fannotation-qc","genome-assembly\u002Fassembly-qc","2026-09-20","workflows\u002Fgenome-annotation-pipeline\u002FSKILL.md","Bakta",[39,41,43],{"after_repeat_masking":40},"Repeat content within expected range for taxon",{"after_gene_prediction":42},"Gene count plausible, BUSCO completeness >90%",{"after_functional_annotation":44},">60% of genes with functional assignment","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-workflows-genome-annotation-pipeline","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":53,"prompt":63,"zipAvailable":25},[54,57,60],{"tool":55,"command":56},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-workflows-genome-annotation-pipeline",{"tool":58,"command":59},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-workflows-genome-annotation-pipeline",{"tool":61,"command":62},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-workflows-genome-annotation-pipeline","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-workflows-genome-annotation-pipeline\u002FSKILL.md",[65,71,75],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"examples\u002Feukaryotic_annotation_pipeline.sh","SCRIPT","脚本",5496,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-workflows-genome-annotation-pipeline\u002Fexamples\u002Feukaryotic_annotation_pipeline.sh",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"examples\u002Fprokaryotic_annotation_pipeline.sh",2948,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-workflows-genome-annotation-pipeline\u002Fexamples\u002Fprokaryotic_annotation_pipeline.sh",{"path":76,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":79,"sourceHtmlUrl":80},"usage-guide.md","REFERENCE","参考文档",3751,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-workflows-genome-annotation-pipeline\u002Fusage-guide.md",[82,90,97,104,111,118],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":89},"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":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":89},"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":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":89},"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":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":89},"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":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":89},"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":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":89},"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",[],[]]