Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

claw-metagenomics

БесплатноЗапускает вложенные скриптыНе проверен

Shotgun metagenomics profiling — taxonomy, resistome, and functional pathways

ClawBioот ClawBio★ 1 197 звёзд на GitHub

Об этом скилле

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, from the WHO Bacterial Priority Pathogens List 2024:

Priority Pathogen Resistance
Critical Acinetobacter baumannii Carbapenem-resistant
Critical Enterobacterales 3rd-gen cephalosporin-resistant
Critical Enterobacterales Carbapenem-resistant
Critical Mycobacterium tuberculosis Rifampicin-resistant
High Salmonella Typhi Fluoroquinolone-resistant
High Shigella spp. Fluoroquinolone-resistant
High Enterococcus faecium Vancomycin-resistant
High Pseudomonas aeruginosa Carbapenem-resistant
High Non-typhoidal Salmonella Fluoroquinolone-resistant
High Neisseria gonorrhoeae 3rd-gen cephalosporin- and/or fluoroquinolone-resistant
High Staphylococcus aureus Methicillin-resistant
Medium Group A streptococci Macrolide-resistant
Medium Streptococcus pneumoniae Macrolide-resistant
Medium Haemophilus influenzae Ampicillin-resistant
Medium Group B streptococci Penicillin-resistant

Usage

# 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 \
Полный SKILL.md на GitHub

Установить claw-metagenomics в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

metagenomics_profiler.py

FAQ

Что делает скилл claw-metagenomics?

Shotgun metagenomics profiling — taxonomy, resistome, and functional pathways

Как установить скилл claw-metagenomics?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл claw-metagenomics запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить claw-metagenomics с