# Claw Metagenomics

Shotgun metagenomics profiling, taxonomy, resistome, and functional pathways

- Repository: https://github.com/ClawBio/ClawBio (1172 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add ClawBio/ClawBio --skill claw-metagenomics -g -a claude-code -y`
Codex: `npx skills add ClawBio/ClawBio --skill claw-metagenomics -g -a codex -y`
Cursor: `npx skills add ClawBio/ClawBio --skill claw-metagenomics -g -a cursor -y`
Gemini CLI: `npx skills add ClawBio/ClawBio --skill claw-metagenomics -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add ClawBio/ClawBio`

## Description

Shotgun metagenomics profiling, taxonomy, resistome, and functional pathways

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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

The rest: https://github.com/ClawBio/ClawBio/blob/HEAD/skills/claw-metagenomics/SKILL.md
