Claw Metagenomics logo

Claw Metagenomics

OrganizationPopular
ClawBio
claw-metagenomics

Shotgun metagenomics profiling — taxonomy, resistome, and functional pathways

Overview

PublisherClawBio
RepositoryClawBio
Skill nameclaw-metagenomics
Stars
1.2K
Forks
280
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ClawBio on GitHub. Read the source before you install it.

Installation

Install the Claw Metagenomics AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ClawBio/ClawBio/tree/main/skills/claw-metagenomics
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ClawBio/ClawBio.git /tmp/ClawBio
mkdir -p .claude/skills
cp -r /tmp/ClawBio/skills/claw-metagenomics .claude/skills/claw-metagenomics
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Claw Metagenomics in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Claw Metagenomics on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Claw Metagenomics is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Shotgun Metagenomics Profiler

Comprehensive shotgun metagenomics analysis combining taxonomic classification, antimicrobial resistance gene detection, and functional pathway profiling from paired-end FASTQ files.

What it does

  1. Takes paired-end FASTQ files (R1, R2) or a single concatenated FASTQ as input
  2. Runs Kraken2 taxonomic classification against a standard database (e.g., Standard-8, PlusPF)
  3. Refines abundances with Bracken at species level (read re-estimation)
  4. Detects antimicrobial resistance genes with RGI against the CARD database
  5. Classifies detected ARGs by WHO critical priority pathogen association
  6. Optionally runs HUMAnN3 for functional pathway profiling (MetaCyc + UniRef)
  7. Calculates alpha diversity metrics from Bracken-adjusted species abundances:
    • Shannon diversity index: H = -sum(p_i * ln(p_i)), where p_i is the proportion of classified reads assigned to species i
    • Simpson diversity index: D = 1 - sum(p_i^2)
    • Pielou evenness: J = H / ln(S), where S is the number of species detected
    • Species richness: S = number of distinct species with at least 1 assigned read
  8. Generates four publication-quality figures:
    • Figure 1: Taxonomy bar chart, top 20 species by relative abundance
    • Figure 2: Resistome heatmap, ARG families by drug class with abundance
    • Figure 3: WHO-critical ARG summary, priority-tier breakdown of detected resistance genes
    • Figure 4: Alpha diversity summary (Shannon, Simpson, Pielou in a panel)
  9. Produces a full reproducibility bundle (commands.sh, environment.yml, checksums.sha256)

Why this exists

If you ask a general AI to "analyse a metagenome," it will:

  • Not know which Kraken2 database to use or how to set confidence thresholds
  • Hallucinate Bracken parameters for read-length and taxonomic level
  • Miss the connection between detected ARGs and WHO priority pathogen lists
  • Skip HUMAnN3 entirely (or misconfigure its database paths)
  • Produce a single bar chart with no resistance context
  • Skip diversity metric calculations (Shannon, Simpson, Pielou)
  • Not provide a reproducibility bundle

This skill encodes the correct methodological decisions:

  • Kraken2 confidence threshold of 0.2 (reduces false positives in environmental samples)
  • Bracken re-estimation at species level with minimum 10 reads
  • RGI MAIN with "Perfect" and "Strict" hit criteria only (no "Loose" hits)
  • WHO Critical Priority Pathogen list mapped to detected ARG families
  • HUMAnN3 with MetaCyc stratification for pathway-level functional context
  • Thread count auto-detected from available CPUs
  • Full reproducibility bundle for every run

Validated On

The skill works with any shotgun metagenome but has been validated on:

  • Peru sewage metagenomics study (6 samples, 3 collection sites: Lima, Cusco, Iquitos)
  • Environmental sewage samples with mixed microbial communities
  • Read depths ranging from 2M to 15M paired-end reads per sample

WHO-Critical ARG Detection

A key feature is the classification of detected resistance genes by WHO priority tier:

PriorityPathogenResistance
CriticalAcinetobacter baumanniiCarbapenem-resistant
CriticalPseudomonas aeruginosaCarbapenem-resistant
CriticalEnterobacteriaceaeCarbapenem-resistant, 3rd-gen cephalosporin-resistant
HighEnterococcus faeciumVancomycin-resistant
HighStaphylococcus aureusMethicillin-resistant, vancomycin-resistant
HighHelicobacter pyloriClarithromycin-resistant
HighCampylobacterFluoroquinolone-resistant
HighSalmonella spp.Fluoroquinolone-resistant
HighNeisseria gonorrhoeae3rd-gen cephalosporin-resistant, fluoroquinolone-resistant
MediumStreptococcus pneumoniaePenicillin-non-susceptible
MediumHaemophilus influenzaeAmpicillin-resistant
MediumShigella spp.Fluoroquinolone-resistant

Usage

bash
# Full pipeline (taxonomy + resistome + functional)
python metagenomics_profiler.py \
    --r1 sample_R1.fastq.gz \
    --r2 sample_R2.fastq.gz \
    --output metagenomics_report

# Skip HUMAnN3 (faster — taxonomy + resistome only)
python metagenomics_profiler.py \
    --r1 sample_R1.fastq.gz \
    --r2 sample_R2.fastq.gz \
    --output metagenomics_report \
    --skip-functional

# Single concatenated FASTQ
python metagenomics_profiler.py \
    --input combined.fastq.gz \
    --output metagenomics_report

# Specify Kraken2 database path
python metagenomics_profiler.py \
    --r1 sample_R1.fastq.gz \
    --r2 sample_R2.fastq.gz \
    --output metagenomics_report \
    --kraken2-db /path/to/kraken2_db \
    --read-length 150

Demo (works out of the box)

bash
python metagenomics_profiler.py --demo --output demo_report

The demo uses pre-computed results from the Peru sewage metagenomics study (6 samples, 3 sites) and generates all figures and reports instantly without requiring external tools.

Example Output

Metagenomics Profiler — ClawBio
================================
Mode: demo (pre-computed Peru sewage data)
Samples: 6 (3 sites: Lima, Cusco, Iquitos)

Taxonomy (Kraken2 + Bracken):
  Total classified: 94.2%
  Top species: Escherichia coli (12.3%), Klebsiella pneumoniae (8.7%),
               Pseudomonas aeruginosa (5.1%), Acinetobacter baumannii (3.9%)

Alpha Diversity:
  Shannon index: 2.847
  Simpson index: 0.912
  Pielou evenness: 0.734
  Species richness: 48

Resistome (RGI/CARD):
  Total ARG hits: 247 (Perfect: 89, Strict: 158)
  Drug classes: 14
  WHO-Critical ARGs detected: 23
    - Carbapenem resistance: NDM-1, OXA-48, KPC-3
    - 3rd-gen cephalosporin resistance: CTX-M-15, CTX-M-27

Functional Pathways (HUMAnN3):
  Total pathways: 312
  Top: PWY-7219 (adenosine ribonucleotides de novo biosynthesis)

Figures saved to: demo_report/figures/
  taxonomy_barplot.png (300 dpi)
  resistome_heatmap.png (300 dpi)
  who_critical_args.png (300 dpi)

Reproducibility:
  commands.sh | environment.yml | checksums.sha256

Pipeline Architecture

FASTQ R1 + R2
     |
     v
[Kraken2] --> kraken2_report.txt
     |
     v
[Bracken] --> bracken_species.tsv   --> Figure 1: Taxonomy bar chart
     |
     v
[RGI MAIN] --> rgi_results.txt      --> Figure 2: Resistome heatmap
     |                                --> Figure 3: WHO-critical ARG summary
     v
[HUMAnN3] --> pathabundance.tsv     (optional, --skip-functional to omit)
     |
     v
[Report] --> report.md + figures/ + reproducibility/

Database Requirements

ToolDatabaseSizeNotes
Kraken2Standard-8 or PlusPF8-70 GBSet via --kraken2-db or $KRAKEN2_DB
Bracken(built from Kraken2 DB)includedRead-length specific (default: 150 bp)
RGICARD~500 MBAuto-downloaded via rgi auto_load
HUMAnN3ChocoPhlAn + UniRef90~15 GBSet via --humann-db or $HUMANN_DB

Citations

If you use this skill in a publication, please cite:

  • Wood, D.E., Lu, J. & Langmead, B. (2019). Improved metagenomic analysis with Kraken 2. Genome Biology, 20, 257.
  • Lu, J. et al. (2017). Bracken: estimating species abundance in metagenomics data. PeerJ Computer Science, 3, e104.
  • Alcock, B.P. et al. (2023). CARD 2023: expanded curation, support for machine learning, and resistome prediction at the Comprehensive Antibiotic Resistance Database. Nucleic Acids Research, 51(D1), D419-D430.
  • Beghini, F. et al. (2021). Integrating taxonomic, functional, and strain-level profiling of diverse microbial communities with bioBakery 3. eLife, 10, e65088.
  • Corpas, M. (2026). ClawBio. https://github.com/ClawBio/ClawBio

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Claw Metagenomics AI skill do?

Shotgun metagenomics profiling — taxonomy, resistome, and functional pathways

Why use Claw Metagenomics on TypingMind?

Because you install it once and use it with any model. Claw Metagenomics is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Claw Metagenomics in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ClawBio/ClawBio/tree/main/skills/claw-metagenomics. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Claw Metagenomics?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Claw Metagenomics?

As many as you like. As long as a model supports skills, you can use Claw Metagenomics with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Claw Metagenomics AI skill free?

Yes. It is published on GitHub by ClawBio under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇