[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EDF5A467XJVSCTE5EXK2DJ":3,"skill-same:01M7EDF5A467XJVSCTE5EXK2DJ":66},{"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},"01M7EDF5A467XJVSCTE5EXK2DJ","bio-genome-annotation-prokaryotic-annotation",null,"Annotates bacterial and archaeal genomes (isolates, MAGs, plasmids) with Bakta (active versioned databases, NCBI-compliant output) or Prokka (legacy), producing GFF3\u002FGenBank\u002FEMBL\u002FFASTA with INSDC locus tags. Covers Bakta-vs-Prokka-vs-PGAP-vs-DFAST choice, light-vs-full database tiers, translation-table selection (11\u002F4\u002F25), archaeal and leaderless-gene caveats, the small-ORF blind spot, pseudogene-vs-phase-variation, the pangenome re-annotation trap, and submission compliance. Use when annotating a newly assembled prokaryotic genome, choosing an annotation tool, re-annotating a collection for pangenomics, or preparing annotations for NCBI\u002FDDBJ submission.","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-genome-annotation-prokaryotic-annotation\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-genome-annotation-prokaryotic-annotation\ndescription: Annotates bacterial and archaeal genomes (isolates, MAGs, plasmids) with Bakta (active versioned databases, NCBI-compliant output) or Prokka (legacy), producing GFF3\u002FGenBank\u002FEMBL\u002FFASTA with INSDC locus tags. Covers Bakta-vs-Prokka-vs-PGAP-vs-DFAST choice, light-vs-full database tiers, translation-table selection (11\u002F4\u002F25), archaeal and leaderless-gene caveats, the small-ORF blind spot, pseudogene-vs-phase-variation, the pangenome re-annotation trap, and submission compliance. Use when annotating a newly assembled prokaryotic genome, choosing an annotation tool, re-annotating a collection for pangenomics, or preparing annotations for NCBI\u002FDDBJ submission.\ntool_type: cli\nprimary_tool: Bakta\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"genome-annotation\u002Fprokaryotic-annotation\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference examples tested with: Bakta 1.9+, Prokka 1.14.6 (legacy), tRNAscan-SE 2.0+, CheckM2 1.0+, gffutils 0.12+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `\u003Ctool> --version` then `\u003Ctool> --help` to confirm flags\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n\nAnnotation content tracks the **database version**, not just the binary: a Bakta full DB (schema v5+, ~30 GB zipped) and a Bakta light DB give different functional calls, and two runs months apart can differ purely from DB updates. Record the Bakta DB version in methods. Prokka's bundled databases are frozen (~2019-2021). If code throws an error, introspect the installed tool and adapt rather than retrying.\n\n# Prokaryotic Genome Annotation\n\n**\"Annotate my bacterial genome\"** -> Call protein-coding genes, tRNAs\u002FrRNAs\u002FncRNAs, and other features, then assign function by database identity, and emit submission-ready files.\n- CLI: `bakta --db db\u002F assembly.fa` (default), `prokka --outdir out assembly.fa` (legacy), NCBI PGAP (submission\u002FRefSeq-grade)\n\n## The Single Most Important Modern Insight -- Gene Calling Is Near-Solved; Function Is Not, and Wrong Labels Propagate\n\nFor a typical isolate, Prodigal\u002FPyrodigal recovers >95-99% of true coding genes. The unsolved problems are the **start codon** (translation initiation site), the **small\u002Foverlapping\u002Frecoded ORFs**, and above all the **function**. Three consequences a postdoc must internalize:\n\n1. **A confidently wrong product name is worse than \"hypothetical protein.\"** Names assigned by loose homology transfer across distant lineages and *self-amplify* through databases - there is no mechanism to retract a correction once it spreads, so annotation accuracy has gone *down*, not up, as sequencing scaled (Salzberg 2019 *Genome Biol* 20:92). Bakta's design counters this: gene-level identity only via exact (MD5\u002FUniRef100) match, falling back to cluster level, then \"hypothetical\" rather than guessing. 25-50% hypothetical is healthy for a non-model organism; near 0% means over-confident transfer.\n\n2. **Comparing gene counts across tools\u002Fversions\u002FDBs is invalid.** Tool agreement is \"highly dependent on the organism of study\" and biased toward model organisms (Dimonaco 2022 *Bioinformatics* 38:1198) - there is no universal best tool. Differences between two annotations are mostly tool artifacts, not biology. For any collection (pangenomics), **re-annotate every assembly from FASTA with one pipeline + one pinned DB**; merging published annotations inflates the accessory genome ~10× (Tonkin-Hill 2020 *Genome Biol* 21:180).\n\n3. **Annotation completeness ≠ assembly completeness.** A fragmented\u002Fcontaminated assembly produces truncated partial CDS at every contig break, inflated counts, and missing rRNA operons. Run CheckM2 *before* trusting any annotation QC number.\n\n## Tool Taxonomy\n\n| Tool | Maintained | Database approach | Output | When |\n|------|-----------|-------------------|--------|------|\n| Bakta | Yes (active) | Curated, **versioned**, alignment-free (UniRef + AMRFinderPlus + expert systems) | GFF3\u002FGBFF\u002FEMBL\u002FFASTA\u002FTSV\u002FJSON + plot | **Default for new work**; reproducible, MAG-aware |\n| Prokka | Frozen ~2021 | BLAST hierarchy vs frozen UniProt\u002FRefSeq + HMM | GFF3\u002FGBK\u002FFAA + tbl | Legacy only; pangenome pipelines (Roary) expect Prokka GFF |\n| NCBI PGAP | Yes (NCBI) | RefSeq protein-family models + ProSplign | ASN.1\u002FGenBank, submission-ready | **GenBank\u002FRefSeq submission**; best pseudogene\u002Fframeshift\u002Fselenoprotein handling |\n| DFAST | Yes (DDBJ) | DFAST reference DBs + swappable refs | INSDC files | DDBJ submission; fast, flexible reference swap |\n| RAST \u002F BV-BRC | Yes | SEED subsystems | GenBank\u002FGFF + subsystems | Subsystem\u002Fmetabolic framing; web; not for direct INSDC submission |\n\nProkka uses Aragorn (tRNA) + barrnap (rRNA); Bakta uses tRNAscan-SE 2.0 (tRNA, domain-specific) + Infernal\u002FRfam (rRNA\u002FncRNA) + PILER-CR (CRISPR arrays) + DeepSig (signal peptides). Bakta is deliberately conservative on naming, so it reports \"hypothetical\" where Prokka confidently (sometimes wrongly) names a gene - Bakta looking \"less annotated\" is it being honest.\n\n## Decision Tree by Scenario\n\n| Scenario | Recommended | Why |\n|----------|-------------|-----|\n| Routine isolate, reproducible | Bakta, full DB | standardized, versioned, current functional calls |\n| Submitting to GenBank\u002FRefSeq | PGAP | RefSeq re-annotates with PGAP regardless; best pseudogene handling |\n| Submitting to DDBJ | DFAST | INSDC-ready, DDBJ-aligned |\n| MAG \u002F metagenome bin | Bakta `--meta` + CheckM2 gate | anonymous-mode calling; QC before trust |\n| Mycoplasma \u002F Mollicutes | Bakta `--translation-table 4` | UGA=Trp; table 11 splits genes at every UGA |\n| Archaeon | Bakta + verify tRNAscan-SE archaeal model; PGAP if N-termini matter | leaderless mRNAs degrade Prodigal TIS |\n| Inherited Prokka pangenome pipeline | pin Prokka version, or re-call all in Bakta | tool consistency vs current biology |\n| Subsystem\u002Fmetabolic view | RAST \u002F BV-BRC | SEED subsystem categories |\n| Genome not yet assembled \u002F poor QC | -> genome-assembly\u002Fassembly-qc | fix assembly before annotating |\n| AMR for clinical report | -> run AMRFinderPlus\u002FCARD-RGI directly | `--organism` context, point mutations, partials matter |\n\n## Bakta (Default)\n\n```bash\n# Database (record the version): full ~30 GB for publishable annotation; light for triage\u002FCI\nbakta_db download --output db\u002F --type full\n\nbakta --db db\u002F --output bakta_out --prefix ecoli_k12 \\\n    --genus Escherichia --species coli --strain K-12 \\\n    --locus-tag ECK12 --gram - --complete --threads 16 \\\n    assembly.fasta\n```\n\nKey flags: `--translation-table {11,4,25}` (default 11), `--gram {+,-,?}` (gates DeepSig signal-peptide calls; default `?`), `--complete` (all sequences are finished replicons; enables oriC detection - do NOT use on draft contigs), `--meta` (metagenome\u002FMAG mode), `--compliant` (enforce INSDC structure), `--keep-contig-headers`, `--proteins \u003Cfaa>` (trusted-protein transfer). Set `--genus`\u002F`--species` from a GTDB-Tk classification, not a guess. Primary outputs: `.gff3`, `.gbff`, `.faa`, `.ffn`, `.fna`, `.tsv`, plus `.hypotheticals.tsv` and `.inference.tsv` (open the inference column to ask *why* a product was assigned).\n\n## Prokka (Legacy)\n\n```bash\nprokka --outdir prokka_out --prefix my_genome --locustag MYORG \\\n    --genus Escherichia --species coli --cpus 8 --rfam assembly.fasta\n```\n\nUse only for tool-chain consistency with an existing Prokka-based pangenome workflow, and pin the version. Its bundled databases are frozen: a gene family characterized after ~2019 is \"hypothetical\" in Prokka but named by current Bakta\u002FPGAP, so the *same gene* flips core\u002Faccessory purely on DB vintage.\n\n## Coding Density and CDS Extraction with Python\n\n**Goal:** Load Bakta\u002FProkka GFF3 into a queryable database and compute coding density, the first sanity number.\n\n**Approach:** Build a gffutils database, sum CDS lengths, divide by genome length; flag values outside the expected band.\n\n```python\nimport gffutils\n\nCODING_DENSITY_LOW = 0.85   # \u003C0.85 in a free-living bacterium suggests wrong table, fragmentation, or heavy pseudogenization\nCODING_DENSITY_HIGH = 0.93  # >0.93 suggests ORF over-calling (spurious short hypotheticals)\n\ndef coding_density(gff_file, genome_length):\n    db = gffutils.create_db(gff_file, ':memory:', merge_strategy='merge')\n    coding_bp = sum(c.end - c.start + 1 for c in db.features_of_type('CDS'))\n    density = coding_bp \u002F genome_length\n    if density \u003C CODING_DENSITY_LOW or density > CODING_DENSITY_HIGH:\n        print(f'WARNING: coding density {density:.1%} outside expected 85-93%')\n    return density\n```\n\n## Hard Cases the Caller Gets Wrong\n\n- **Wrong genetic code is silent and looks like fragmentation.** A Mycoplasma run under table 11 yields anomalously low coding density + many short \"hypothetical\" fragments because every internal UGA split a gene. Confirm the table from taxonomy (GTDB-Tk), never a guess. Table 4 (UGA=Trp, Mollicutes), table 25 (UGA=Gly, Gracilibacteria\u002FSR1).\n- **Pseudogene over-calling in reductive genomes is real biology.** *Mycobacterium leprae* has ~1,116 pseudogenes vs ~1,604 intact CDS (Cole 2001 *Nature* 409:1007) - high pseudogene fraction in a symbiont\u002Fhost-restricted pathogen (*Rickettsia*, *Sodalis*) is a lifestyle signal, not a defect. PGAP (ProSplign aligns *through* frameshifts, emits `\u002Fpseudo`) is the best automated arbiter.\n- **Phase variation is not a pseudogene.** A frameshift inside a homopolymer\u002FSSR tract in a contingency locus (*Neisseria* ~65 candidate loci, *Haemophilus*, *Campylobacter* poly-G tracts) means the assembled cell was in the OFF phase - do NOT \"correct\" or polish it away. This confounds with ONT homopolymer indel error: a pseudogene spike is ambiguous between reductive biology, phase variation, and basecalling error; disambiguate with orthogonal (short-read\u002FHiFi) data.\n- **Programmed frameshifts make one gene look like two.** `prfB`\u002FRF2 (a **+1** frameshift at a slippery `CTTT` + internal SD), `dnaX` (−1), and IS-element transposases encode one protein across two frames; naive callers emit two short ORFs. PGAP recognizes a curated set.\n- **Small ORFs (\u003C~50 aa) are systematically missed** - callers impose a ~30 aa minimum because short ORFs arise by chance and coding statistics are unreliable there. *E. coli* K-12 was missing dozens of 16-50 aa proteins. Treat the gene count as a lower bound on the small proteome; for sORF biology use a dedicated caller (smORFer, smORFinder) and, ideally, Ribo-seq (the experimental arbiter of translation).\n- **Archaea and Actinobacteria use leaderless mRNAs** (no 5' UTR, no Shine-Dalgarno) - Prodigal's RBS-first scoring degrades TIS placement; GeneMarkS-2 (and PGAP) model leaderless transcription. Use tRNAscan-SE's archaeal model for archaeal intron-containing tRNAs.\n\n## Per-Method Failure Modes\n\n### Cross-tool gene-count comparison\n**Trigger:** comparing counts from Bakta vs Prokka vs old RefSeq, or mixed-vintage records. **Mechanism:** tool\u002FDB differences dominate biological differences. **Symptom:** \"novel genes\" or accessory-genome inflation. **Fix:** re-annotate every genome from FASTA with one pipeline + pinned DB.\n\n### Wrong translation table\n**Trigger:** table 11 on a Mollicute. **Mechanism:** UGA read as stop. **Symptom:** low coding density, doubled short gene count, high hypothetical fraction. **Fix:** `--translation-table 4`; confirm from GTDB-Tk.\n\n### Annotating an unvetted assembly\n**Trigger:** running Bakta before CheckM2. **Mechanism:** contig breaks truncate CDS; contamination mixes organisms. **Symptom:** partial CDS at ends, inflated\u002Fchimeric gene set, missing rRNA operons. **Fix:** CheckM2 first; contamination >5% -> decontaminate.\n\n### Trusting an over-specific product name\n**Trigger:** reading the product column as ground truth. **Mechanism:** loose-homology transfer below ~40% identity is unreliable, especially for promiscuous folds. **Symptom:** a \"histidine-kinase expansion\" that is one over-called domain. **Fix:** open `.inference.tsv`; prefer InterPro\u002FPfam architecture over free-text product when they conflict.\n\n### Single-mode calling on a metagenome or tiny replicon\n**Trigger:** Prodigal single mode on a MAG\u002Fplasmid\u002Fphage. **Mechanism:** self-training needs a full single-organism genome. **Symptom:** poor calls on short\u002Fmixed input. **Fix:** Bakta `--meta` (anonymous mode).\n\n### Missing signal peptides on macOS\n**Trigger:** Bakta on macOS. **Mechanism:** DeepSig was dropped from the default mac conda env (~v1.9.4). **Symptom:** silently absent signal-peptide calls. **Fix:** verify the run log; run on Linux if SPs matter.\n\n## Quantitative Thresholds\n\n| Threshold | Source | Rationale |\n|-----------|--------|-----------|\n| Coding density ~88-90% (band 85-93%) | bacterial genome norm | \u003C85% = wrong table\u002Ffragmentation\u002Fdecay; >93% = over-calling |\n| ~850-1,000 genes\u002FMb (~1 gene\u002Fkb) | bacterial gene density | far higher = over-call; far lower = under-call\u002Fwrong table |\n| Hypothetical 25-50% | annotation norm | ~0% = over-confident transfer; >60-70% = novel lineage or wrong tool\u002Ftable |\n| tRNA count ≥ ~20 (often 40-60) | one isoacceptor set minimum | far fewer = fragmented assembly broke tRNA regions |\n| rRNA operons ~1-15 (e.g. ~7 in *E. coli*) | copy-number norm | zero\u002Ffractional in a \"complete\" genome = short-read repeat collapse |\n| Prodigal minimum ~30 aa \u002F 90 nt | caller default | shorter ORFs need a dedicated sORF caller + Ribo-seq |\n| CheckM2 contamination ≤5%, completeness ≥90% | MIMAG-aligned | above\u002Fbelow -> annotation QC numbers uninterpretable, fix assembly first |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| Genes split, low coding density | wrong translation table | `--translation-table 4\u002F25`; confirm from GTDB-Tk |\n| Many hypothetical proteins | novel organism \u002F light DB | full Bakta DB; add InterProScan\u002FeggNOG; normal if 25-50% |\n| Low gene \u002F tRNA count, missing rRNA | fragmented assembly | CheckM2; prefer long-read\u002Fcomplete assembly |\n| RefSeq record differs from the local GFF | RefSeq is PGAP, GenBank keeps the submitter's annotation | report WP_ accession + locus_tag; expect divergence |\n| Pseudogene spike | ONT homopolymer indels vs real decay vs phase variation | check homopolymer context; corroborate with short-read\u002FHiFi |\n| Submission rejected on locus tags | invented prefix | register the prefix via BioSample (3-12 alnum, starts with a letter) |\n\n## References\n\n- Schwengers O, et al. 2021. Bakta: rapid and standardized annotation of bacterial genomes via alignment-free sequence identification. *Microb Genom* 7:000685.\n- Seemann T. 2014. Prokka: rapid prokaryotic genome annotation. *Bioinformatics* 30:2068-2069.\n- Hyatt D, et al. 2010. Prodigal: prokaryotic gene recognition and translation initiation site identification. *BMC Bioinformatics* 11:119.\n- Larralde M. 2022. Pyrodigal: Python bindings and interface to Prodigal. *J Open Source Softw* 7:4296.\n- Lomsadze A, et al. 2018. Modeling leaderless transcription and atypical genes results in more accurate gene prediction in prokaryotes (GeneMarkS-2). *Genome Res* 28:1079-1089.\n- Tatusova T, et al. 2016. NCBI prokaryotic genome annotation pipeline. *Nucleic Acids Res* 44:6614-6624.\n- Li W, et al. 2021. RefSeq: expanding the Prokaryotic Genome Annotation Pipeline reach with protein family model curation. *Nucleic Acids Res* 49:D1020-D1028.\n- Tanizawa Y, et al. 2018. DFAST: a flexible prokaryotic genome annotation pipeline for faster genome publication. *Bioinformatics* 34:1037-1039.\n- Chan PP, et al. 2021. tRNAscan-SE 2.0: improved detection and functional classification of transfer RNA genes. *Nucleic Acids Res* 49:9077-9096.\n- Chklovski A, et al. 2023. CheckM2: a rapid, scalable and accurate tool for assessing microbial genome quality using machine learning. *Nat Methods* 20:1203-1212.\n- Dimonaco NJ, et al. 2022. No one tool to rule them all: prokaryotic gene prediction tool annotations are highly dependent on the organism of study. *Bioinformatics* 38:1198-1207.\n- Tonkin-Hill G, et al. 2020. Producing polished prokaryotic pangenomes with the Panaroo pipeline. *Genome Biol* 21:180.\n- Salzberg SL. 2019. Next-generation genome annotation: we still struggle to get it right. *Genome Biol* 20:92.\n- Cole ST, et al. 2001. Massive gene decay in the leprosy bacillus. *Nature* 409:1007-1011.\n\n## Related Skills\n\n- functional-annotation - Add GO\u002FKEGG\u002FPfam to hypothetical proteins with eggNOG-mapper\u002FInterProScan\n- ncrna-annotation - Detailed ncRNA identification with Infernal\u002FRfam beyond the built-in callers\n- annotation-qc - CheckM2 completeness\u002Fcontamination gate and gene-set sanity metrics\n- genome-assembly\u002Fassembly-qc - Assess assembly quality before annotation\n- genome-intervals\u002Fgtf-gff-handling - Parse and manipulate GFF3 output\n- comparative-genomics\u002Fpangenome-analysis - Uniform re-annotation before pangenome clustering\n","## Version Compatibility\n\nReference examples tested with: Bakta 1.9+, Prokka 1.14.6 (legacy), tRNAscan-SE 2.0+, CheckM2 1.0+, gffutils 0.12+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `\u003Ctool> --version` then `\u003Ctool> --help` to confirm flags\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n\nAnnotation content tracks the **database version**, not just the binary: a Bakta full DB (schema v5+, ~30 GB zipped) and a Bakta light DB give different functional calls, and two runs months apart can differ purely from DB updates. Record the Bakta DB version in methods. Prokka's bundled databases are frozen (~2019-2021). If code throws an error, introspect the installed tool and adapt rather than retrying.\n\n# Prokaryotic Genome Annotation\n\n**\"Annotate my bacterial genome\"** -> Call protein-coding genes, tRNAs\u002FrRNAs\u002FncRNAs, and other features, then assign function by database identity, and emit submission-ready files.\n- CLI: `bakta --db db\u002F assembly.fa` (default), `prokka --outdir out assembly.fa` (legacy), NCBI PGAP (submission\u002FRefSeq-grade)\n\n## The Single Most Important Modern Insight -- Gene Calling Is Near-Solved; Function Is Not, and Wrong Labels Propagate\n\nFor a typical isolate, Prodigal\u002FPyrodigal recovers >95-99% of true coding genes. The unsolved problems are the **start codon** (translation initiation site), the **small\u002Foverlapping\u002Frecoded ORFs**, and above all the **function**. Three consequences a postdoc must internalize:\n\n1. **A confidently wrong product name is worse than \"hypothetical protein.\"** Names assigned by loose homology transfer across distant lineages and *self-amplify* through databases - there is no mechanism to retract a correction once it spreads, so annotation accuracy has gone *down*, not up, as sequencing scaled (Salzberg 2019 *Genome Biol* 20:92). Bakta's design counters this: gene-level identity only via exact (MD5\u002FUniRef100) match, falling back to cluster level, then \"hypothetical\" rather than guessing. 25-50% hypothetical is healthy for a non-model organism; near 0% means over-confident transfer.\n\n2. **Comparing gene counts across tools\u002Fversions\u002FDBs is invalid.** Tool agreement is \"highly dependent on the organism of study\" and biased toward model organisms (Dimonaco 2022 *Bioinformatics* 38:1198) - there is no universal best tool. Differences between two annotations are mostly tool artifacts, not biology. For any collection (pangenomics), **re-annotate every assembly from FASTA with one pipeline + one pinned DB**; merging published annotations inflates the accessory genome ~10× (Tonkin-Hill 2020 *Genome Biol* 21:180).\n\n3. **Annotation completeness ≠ assembly completeness.** A fragmented\u002Fcontaminated assembly produces truncated partial CDS at every contig break, inflated counts, and missing rRNA operons. Run CheckM2 *before* trusting any annotation QC number.\n\n## Tool Taxonomy\n\n| Tool | Maintained | Database approach | Output | When |\n|------|-----------|-------------------|--------|------|\n| Bakta | Yes (active) | Curated, **versioned**, alignment-free (UniRef + AMRFinderPlus + expert systems) | GFF3\u002FGBFF\u002FEMBL\u002FFASTA\u002FTSV\u002FJSON + plot | **Default for new work**; reproducible, MAG-aware |\n| Prokka | Frozen ~2021 | BLAST hierarchy vs frozen UniProt\u002FRefSeq + HMM | GFF3\u002FGBK\u002FFAA + tbl | Legacy only; pangenome pipelines (Roary) expect Prokka GFF |\n| NCBI PGAP | Yes (NCBI) | RefSeq protein-family models + ProSplign | ASN.1\u002FGenBank, submission-ready | **GenBank\u002FRefSeq submission**; best pseudogene\u002Fframeshift\u002Fselenoprotein handling |\n| DFAST | Yes (DDBJ) | DFAST reference DBs + swappable refs | INSDC files | DDBJ submission; fast, flexible reference swap |\n| RAST \u002F BV-BRC | Yes | SEED subsystems | GenBank\u002FGFF + subsystems | Subsystem\u002Fmetabolic framing; web; not for direct INSDC submission |\n\nProkka uses Aragorn (tRNA) + barrnap (rRNA); Bakta uses tRNAscan-SE 2.0 (tRNA, domain-specific) + Infernal\u002FRfam (rRNA\u002FncRNA) + PILER-CR (CRISPR arrays) + DeepSig (signal peptides). Bakta is deliberately conservative on naming, so it reports \"hypothetical\" where Prokka confidently (sometimes wrongly) names a gene - Bakta looking \"less annotated\" is it being honest.\n\n## Decision Tree by Scenario\n\n| Scenario | Recommended | Why |\n|----------|-------------|-----|\n| Routine isolate, reproducible | Bakta, full DB | standardized, versioned, current functional calls |\n| Submitting to GenBank\u002FRefSeq | PGAP | RefSeq re-annotates with PGAP regardless; best pseudogene handling |\n| Submitting to DDBJ | DFAST | INSDC-ready, DDBJ-aligned |\n| MAG \u002F metagenome bin | Bakta `--meta` + CheckM2 gate | anonymous-mode calling; QC before trust |\n| Mycoplasma \u002F Mollicutes | Bakta `--translation-table 4` | UGA=Trp; table 11 splits genes at every UGA |\n| Archaeon | Bakta + verify tRNAscan-SE archaeal model; PGAP if N-termini matter | leaderless mRNAs degrade Prodigal TIS |\n| Inherited Prokka pangenome pipeline | pin Prokka version, or re-call all in Bakta | tool consistency vs current biology |\n| Subsystem\u002Fmetabolic view | RAST \u002F BV-BRC | SEED subsystem categories |\n| Genome not yet assembled \u002F poor QC | -> genome-assembly\u002Fassembly-qc | fix assembly before annotating |\n| AMR for clinical report | -> run AMRFinderPlus\u002FCARD-RGI directly | `--organism` context, point mutations, partials matter |\n\n## Bakta (Default)\n\n```bash\n# Database (record the version): full ~30 GB for publishable annotation; light for triage\u002FCI\nbakta_db download --output db\u002F --type full\n\nbakta --db db\u002F --output bakta_out --prefix ecoli_k12 \\\n    --genus Escherichia --species coli --strain K-12 \\\n    --locus-tag ECK12 --gram - --complete --threads 16 \\\n    assembly.fasta\n```\n\nKey flags: `--translation-table {11,4,25}` (default 11), `--gram {+,-,?}` (gates DeepSig signal-peptide calls; default `?`), `--complete` (all sequences are finished replicons; enables oriC detection - do NOT use on draft contigs), `--meta` (metagenome\u002FMAG mode), `--compliant` (enforce INSDC structure), `--keep-contig-headers`, `--proteins \u003Cfaa>` (trusted-protein transfer). Set `--genus`\u002F`--species` from a GTDB-Tk classification, not a guess. Primary outputs: `.gff3`, `.gbff`, `.faa`, `.ffn`, `.fna`, `.tsv`, plus `.hypotheticals.tsv` and `.inference.tsv` (open the inference column to ask *why* a product was assigned).\n\n## Prokka (Legacy)\n\n```bash\nprokka --outdir prokka_out --prefix my_genome --locustag MYORG \\\n    --genus Escherichia --species coli --cpus 8 --rfam assembly.fasta\n```\n\nUse only for tool-chain consistency with an existing Prokka-based pangenome workflow, and pin the version. Its bundled databases are frozen: a gene family characterized after ~2019 is \"hypothetical\" in Prokka but named by current Bakta\u002FPGAP, so the *same gene* flips core\u002Faccessory purely on DB vintage.\n\n## Coding Density and CDS Extraction with Python\n\n**Goal:** Load Bakta\u002FProkka GFF3 into a queryable database and compute coding density, the first sanity number.\n\n**Approach:** Build a gffutils database, sum CDS lengths, divide by genome length; flag values outside the expected band.\n\n```python\nimport gffutils\n\nCODING_DENSITY_LOW = 0.85   # \u003C0.85 in a free-living bacterium suggests wrong table, fragmentation, or heavy pseudogenization\nCODING_DENSITY_HIGH = 0.93  # >0.93 suggests ORF over-calling (spurious short hypotheticals)\n\ndef coding_density(gff_file, genome_length):\n    db = gffutils.create_db(gff_file, ':memory:', merge_strategy='merge')\n    coding_bp = sum(c.end - c.start + 1 for c in db.features_of_type('CDS'))\n    density = coding_bp \u002F genome_length\n    if density \u003C CODING_DENSITY_LOW or density > CODING_DENSITY_HIGH:\n        print(f'WARNING: coding density {density:.1%} outside expected 85-93%')\n    return density\n```\n\n## Hard Cases the Caller Gets Wrong\n\n- **Wrong genetic code is silent and looks like fragmentation.** A Mycoplasma run under table 11 yields anomalously low coding density + many short \"hypothetical\" fragments because every internal UGA split a gene. Confirm the table from taxonomy (GTDB-Tk), never a guess. Table 4 (UGA=Trp, Mollicutes), table 25 (UGA=Gly, Gracilibacteria\u002FSR1).\n- **Pseudogene over-calling in reductive genomes is real biology.** *Mycobacterium leprae* has ~1,116 pseudogenes vs ~1,604 intact CDS (Cole 2001 *Nature* 409:1007) - high pseudogene fraction in a symbiont\u002Fhost-restricted pathogen (*Rickettsia*, *Sodalis*) is a lifestyle signal, not a defect. PGAP (ProSplign aligns *through* frameshifts, emits `\u002Fpseudo`) is the best automated arbiter.\n- **Phase variation is not a pseudogene.** A frameshift inside a homopolymer\u002FSSR tract in a contingency locus (*Neisseria* ~65 candidate loci, *Haemophilus*, *Campylobacter* poly-G tracts) means the assembled cell was in the OFF phase - do NOT \"correct\" or polish it away. This confounds with ONT homopolymer indel error: a pseudogene spike is ambiguous between reductive biology, phase variation, and basecalling error; disambiguate with orthogonal (short-read\u002FHiFi) data.\n- **Programmed frameshifts make one gene look like two.** `prfB`\u002FRF2 (a **+1** frameshift at a slippery `CTTT` + internal SD), `dnaX` (−1), and IS-element transposases encode one protein across two frames; naive callers emit two short ORFs. PGAP recognizes a curated set.\n- **Small ORFs (\u003C~50 aa) are systematically missed** - callers impose a ~30 aa minimum because short ORFs arise by chance and coding statistics are unreliable there. *E. coli* K-12 was missing dozens of 16-50 aa proteins. Treat the gene count as a lower bound on the small proteome; for sORF biology use a dedicated caller (smORFer, smORFinder) and, ideally, Ribo-seq (the experimental arbiter of translation).\n- **Archaea and Actinobacteria use leaderless mRNAs** (no 5' UTR, no Shine-Dalgarno) - Prodigal's RBS-first scoring degrades TIS placement; GeneMarkS-2 (and PGAP) model leaderless transcription. Use tRNAscan-SE's archaeal model for archaeal intron-containing tRNAs.\n\n## Per-Method Failure Modes\n\n### Cross-tool gene-count comparison\n**Trigger:** comparing counts from Bakta vs Prokka vs old RefSeq, or mixed-vintage records. **Mechanism:** tool\u002FDB differences dominate biological differences. **Symptom:** \"novel genes\" or accessory-genome inflation. **Fix:** re-annotate every genome from FASTA with one pipeline + pinned DB.\n\n### Wrong translation table\n**Trigger:** table 11 on a Mollicute. **Mechanism:** UGA read as stop. **Symptom:** low coding density, doubled short gene count, high hypothetical fraction. **Fix:** `--translation-table 4`; confirm from GTDB-Tk.\n\n### Annotating an unvetted assembly\n**Trigger:** running Bakta before CheckM2. **Mechanism:** contig breaks truncate CDS; contamination mixes organisms. **Symptom:** partial CDS at ends, inflated\u002Fchimeric gene set, missing rRNA operons. **Fix:** CheckM2 first; contamination >5% -> decontaminate.\n\n### Trusting an over-specific product name\n**Trigger:** reading the product column as ground truth. **Mechanism:** loose-homology transfer below ~40% identity is unreliable, especially for promiscuous folds. **Symptom:** a \"histidine-kinase expansion\" that is one over-called domain. **Fix:** open `.inference.tsv`; prefer InterPro\u002FPfam architecture over free-text product when they conflict.\n\n### Single-mode calling on a metagenome or tiny replicon\n**Trigger:** Prodigal single mode on a MAG\u002Fplasmid\u002Fphage. **Mechanism:** self-training needs a full single-organism genome. **Symptom:** poor calls on short\u002Fmixed input. **Fix:** Bakta `--meta` (anonymous mode).\n\n### Missing signal peptides on macOS\n**Trigger:** Bakta on macOS. **Mechanism:** DeepSig was dropped from the default mac conda env (~v1.9.4). **Symptom:** silently absent signal-peptide calls. **Fix:** verify the run log; run on Linux if SPs matter.\n\n## Quantitative Thresholds\n\n| Threshold | Source | Rationale |\n|-----------|--------|-----------|\n| Coding density ~88-90% (band 85-93%) | bacterial genome norm | \u003C85% = wrong table\u002Ffragmentation\u002Fdecay; >93% = over-calling |\n| ~850-1,000 genes\u002FMb (~1 gene\u002Fkb) | bacterial gene density | far higher = over-call; far lower = under-call\u002Fwrong table |\n| Hypothetical 25-50% | annotation norm | ~0% = over-confident transfer; >60-70% = novel lineage or wrong tool\u002Ftable |\n| tRNA count ≥ ~20 (often 40-60) | one isoacceptor set minimum | far fewer = fragmented assembly broke tRNA regions |\n| rRNA operons ~1-15 (e.g. ~7 in *E. coli*) | copy-number norm | zero\u002Ffractional in a \"complete\" genome = short-read repeat collapse |\n| Prodigal minimum ~30 aa \u002F 90 nt | caller default | shorter ORFs need a dedicated sORF caller + Ribo-seq |\n| CheckM2 contamination ≤5%, completeness ≥90% | MIMAG-aligned | above\u002Fbelow -> annotation QC numbers uninterpretable, fix assembly first |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| Genes split, low coding density | wrong translation table | `--translation-table 4\u002F25`; confirm from GTDB-Tk |\n| Many hypothetical proteins | novel organism \u002F light DB | full Bakta DB; add InterProScan\u002FeggNOG; normal if 25-50% |\n| Low gene \u002F tRNA count, missing rRNA | fragmented assembly | CheckM2; prefer long-read\u002Fcomplete assembly |\n| RefSeq record differs from the local GFF | RefSeq is PGAP, GenBank keeps the submitter's annotation | report WP_ accession + locus_tag; expect divergence |\n| Pseudogene spike | ONT homopolymer indels vs real decay vs phase variation | check homopolymer context; corroborate with short-read\u002FHiFi |\n| Submission rejected on locus tags | invented prefix | register the prefix via BioSample (3-12 alnum, starts with a letter) |\n\n## References\n\n- Schwengers O, et al. 2021. Bakta: rapid and standardized annotation of bacterial genomes via alignment-free sequence identification. *Microb Genom* 7:000685.\n- Seemann T. 2014. Prokka: rapid prokaryotic genome annotation. *Bioinformatics* 30:2068-2069.\n- Hyatt D, et al. 2010. Prodigal: prokaryotic gene recognition and translation initiation site identification. *BMC Bioinformatics* 11:119.\n- Larralde M. 2022. Pyrodigal: Python bindings and interface to Prodigal. *J Open Source Softw* 7:4296.\n- Lomsadze A, et al. 2018. Modeling leaderless transcription and atypical genes results in more accurate gene prediction in prokaryotes (GeneMarkS-2). *Genome Res* 28:1079-1089.\n- Tatusova T, et al. 2016. NCBI prokaryotic genome annotation pipeline. *Nucleic Acids Res* 44:6614-6624.\n- Li W, et al. 2021. RefSeq: expanding the Prokaryotic Genome Annotation Pipeline reach with protein family model curation. *Nucleic Acids Res* 49:D1020-D1028.\n- Tanizawa Y, et al. 2018. DFAST: a flexible prokaryotic genome annotation pipeline for faster genome publication. *Bioinformatics* 34:1037-1039.\n- Chan PP, et al. 2021. tRNAscan-SE 2.0: improved detection and functional classification of transfer RNA genes. *Nucleic Acids Res* 49:9077-9096.\n- Chklovski A, et al. 2023. CheckM2: a rapid, scalable and accurate tool for assessing microbial genome quality using machine learning. *Nat Methods* 20:1203-1212.\n- Dimonaco NJ, et al. 2022. No one tool to rule them all: prokaryotic gene prediction tool annotations are highly dependent on the organism of study. *Bioinformatics* 38:1198-1207.\n- Tonkin-Hill G, et al. 2020. Producing polished prokaryotic pangenomes with the Panaroo pipeline. *Genome Biol* 21:180.\n- Salzberg SL. 2019. Next-generation genome annotation: we still struggle to get it right. *Genome Biol* 20:92.\n- Cole ST, et al. 2001. Massive gene decay in the leprosy bacillus. *Nature* 409:1007-1011.\n\n## Related Skills\n\n- functional-annotation - Add GO\u002FKEGG\u002FPfam to hypothetical proteins with eggNOG-mapper\u002FInterProScan\n- ncrna-annotation - Detailed ncRNA identification with Infernal\u002FRfam beyond the built-in callers\n- annotation-qc - CheckM2 completeness\u002Fcontamination gate and gene-set sanity metrics\n- genome-assembly\u002Fassembly-qc - Assess assembly quality before annotation\n- genome-intervals\u002Fgtf-gff-handling - Parse and manipulate GFF3 output\n- comparative-genomics\u002Fpangenome-analysis - Uniform re-annotation before pangenome clustering\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","genome-annotation\u002Fprokaryotic-annotation\u002FSKILL.md","Bakta","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-genome-annotation-prokaryotic-annotation","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-genome-annotation-prokaryotic-annotation",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-genome-annotation-prokaryotic-annotation",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-genome-annotation-prokaryotic-annotation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-genome-annotation-prokaryotic-annotation\u002FSKILL.md",true,[50,56,60],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Fbakta_annotation.sh","SCRIPT","脚本",1960,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-genome-annotation-prokaryotic-annotation\u002Fexamples\u002Fbakta_annotation.sh",{"path":57,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":58,"sourceHtmlUrl":59},"examples\u002Fparse_annotation.py",3571,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-genome-annotation-prokaryotic-annotation\u002Fexamples\u002Fparse_annotation.py",{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"usage-guide.md","REFERENCE","参考文档",5082,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-genome-annotation-prokaryotic-annotation\u002Fusage-guide.md",[67,75,82,89,96,103],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":74},"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":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":74},"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":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":74},"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":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":74},"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":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":74},"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":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":74},"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",[],[]]