bio-metagenomics-amr-detection

Detect antimicrobial resistance genes using AMRFinderPlus, ResFinder, and CARD. Screen isolates and metagenomes for resistance determinants. Use when characterizing resistance profiles in clinical isolates, surveillance samples, or metagenomic data.

16 stars

Best use case

bio-metagenomics-amr-detection is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Detect antimicrobial resistance genes using AMRFinderPlus, ResFinder, and CARD. Screen isolates and metagenomes for resistance determinants. Use when characterizing resistance profiles in clinical isolates, surveillance samples, or metagenomic data.

Teams using bio-metagenomics-amr-detection should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/bio-metagenomics-amr-detection/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/cli-automation/bio-metagenomics-amr-detection/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/bio-metagenomics-amr-detection/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How bio-metagenomics-amr-detection Compares

Feature / Agentbio-metagenomics-amr-detectionStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Detect antimicrobial resistance genes using AMRFinderPlus, ResFinder, and CARD. Screen isolates and metagenomes for resistance determinants. Use when characterizing resistance profiles in clinical isolates, surveillance samples, or metagenomic data.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# AMR Detection

Identify antimicrobial resistance (AMR) genes in bacterial genomes and metagenomes.

## Tool Comparison

| Tool | Database | Best For |
|------|----------|----------|
| AMRFinderPlus | NCBI | Comprehensive, curated |
| ResFinder | CGE | Clinical isolates |
| CARD/RGI | CARD | Detailed resistance mechanisms |
| ABRicate | Multiple | Quick screening |

## AMRFinderPlus (NCBI)

### Installation

```bash
conda install -c bioconda ncbi-amrfinderplus
amrfinder -u  # Update database
```

### From Nucleotide Sequences

```bash
# Assembled contigs
amrfinder -n contigs.fasta -o amr_results.tsv --threads 8

# With organism for point mutations
amrfinder -n contigs.fasta -O Escherichia -o amr_results.tsv

# Include stress/virulence genes
amrfinder -n contigs.fasta -O Salmonella --plus -o amr_results.tsv
```

### From Protein Sequences

```bash
# If you have predicted proteins
amrfinder -p proteins.faa -o amr_results.tsv

# Combined nucleotide and protein
amrfinder -n contigs.fasta -p proteins.faa -g gff_annotation.gff \
    -O Escherichia -o amr_results.tsv
```

### Output Fields

| Column | Description |
|--------|-------------|
| Gene symbol | AMR gene name |
| Sequence name | Contig/protein ID |
| Element type | AMR, STRESS, VIRULENCE |
| Element subtype | Specific class |
| Class | Drug class |
| Subclass | Specific drug |
| % Coverage | Query coverage |
| % Identity | Sequence identity |

### Batch Processing

```bash
for fasta in assemblies/*.fasta; do
    sample=$(basename $fasta .fasta)
    amrfinder -n $fasta -O Escherichia --plus \
        -o results/${sample}_amr.tsv --threads 4
done

# Combine results
head -1 results/sample1_amr.tsv > combined_amr.tsv
for f in results/*_amr.tsv; do
    tail -n+2 $f >> combined_amr.tsv
done
```

## ResFinder

### Installation

```bash
conda install -c bioconda resfinder
# Or use web: https://cge.food.dtu.dk/services/ResFinder/
```

### Run ResFinder

```bash
# Assembled genome
python -m resfinder -ifa contigs.fasta -o resfinder_output \
    -db_res /path/to/resfinder_db -acq

# With species for point mutations
python -m resfinder -ifa contigs.fasta -o resfinder_output \
    -db_res /path/to/resfinder_db \
    -db_point /path/to/pointfinder_db \
    -s "Escherichia coli" -acq
```

### From Raw Reads (KMA)

```bash
python -m resfinder -ifq reads_1.fq reads_2.fq -o resfinder_output \
    -db_res /path/to/resfinder_db -acq
```

## CARD/RGI

Resistance Gene Identifier with detailed mechanism annotations.

### Installation

```bash
conda install -c bioconda rgi
rgi load --card_json /path/to/card.json --local
```

### Run RGI

```bash
# From contigs
rgi main --input_sequence contigs.fasta --output_file rgi_output \
    --input_type contig --local --clean

# From protein
rgi main --input_sequence proteins.faa --output_file rgi_output \
    --input_type protein --local

# Include loose hits (more sensitive)
rgi main --input_sequence contigs.fasta --output_file rgi_output \
    --input_type contig --include_loose --local
```

### RGI Output

```bash
# Main results
cat rgi_output.txt

# JSON with full details
cat rgi_output.json
```

## ABRicate (Quick Screening)

### Installation

```bash
conda install -c bioconda abricate
abricate --setupdb  # Update databases
```

### Available Databases

```bash
abricate --list
# ncbi, card, resfinder, argannot, megares, ecoh, ecoli_vf, plasmidfinder, vfdb
```

### Run ABRicate

```bash
# Default (ncbi)
abricate contigs.fasta > abricate_results.tsv

# Specific database
abricate --db resfinder contigs.fasta > resfinder_results.tsv
abricate --db card contigs.fasta > card_results.tsv

# Multiple databases
for db in ncbi card resfinder; do
    abricate --db $db contigs.fasta > ${db}_results.tsv
done
```

### Batch Summary

```bash
# Run on multiple samples
abricate assemblies/*.fasta > all_results.tsv

# Generate summary matrix
abricate --summary all_results.tsv > summary_matrix.tsv
```

## Metagenome AMR Profiling

### Using ShortBRED

```bash
# Map reads to AMR markers
shortbred_quantify.py --markers amr_markers.faa \
    --wgs reads_1.fq reads_2.fq \
    --results amr_abundance.tsv \
    --threads 8
```

### Using GROOT

```bash
# Index database
groot index -m card.90 -i groot_index -p 8

# Align and report
groot align -i groot_index -f reads_1.fq,reads_2.fq -p 8 | \
    groot report > amr_report.tsv
```

## Complete Workflow

```bash
#!/bin/bash
set -euo pipefail

ASSEMBLY=$1
ORGANISM=$2
OUTPUT_DIR=$3

mkdir -p $OUTPUT_DIR

echo "=== AMRFinderPlus ==="
amrfinder -n $ASSEMBLY -O $ORGANISM --plus \
    -o $OUTPUT_DIR/amrfinder.tsv --threads 8

echo "=== ABRicate (multiple databases) ==="
for db in ncbi card resfinder; do
    abricate --db $db $ASSEMBLY > $OUTPUT_DIR/abricate_${db}.tsv
done

echo "=== Summary ==="
echo "AMR genes found:"
cut -f6 $OUTPUT_DIR/amrfinder.tsv | sort | uniq -c | sort -rn | head -20

echo "=== Complete ==="
echo "Results in $OUTPUT_DIR/"
```

## Summarize Results

```python
import pandas as pd

# Load AMRFinderPlus results
amr = pd.read_csv('amrfinder.tsv', sep='\t')

# Count by drug class
class_counts = amr['Class'].value_counts()
print(class_counts)

# Pivot for heatmap (multiple samples)
import glob
results = []
for f in glob.glob('results/*_amr.tsv'):
    sample = f.split('/')[-1].replace('_amr.tsv', '')
    df = pd.read_csv(f, sep='\t')
    df['Sample'] = sample
    results.append(df)

combined = pd.concat(results)
matrix = pd.crosstab(combined['Sample'], combined['Gene symbol'])
```

## Related Skills

- metagenomics/kraken-classification - Taxonomic context
- metagenomics/functional-profiling - Functional pathways
- genome-assembly/contamination-detection - Sample QC
- workflows/metagenomics-pipeline - Full metagenomics workflow

Related Skills

moai-alfred-language-detection

16
from diegosouzapw/awesome-omni-skill

Auto-detects project language and framework from package.json, pyproject.toml, etc.

performing-steganography-detection

16
from diegosouzapw/awesome-omni-skill

Detect and extract hidden data embedded in images, audio, and other media files using steganalysis tools to uncover covert communication channels.

ai-writing-detection

16
from diegosouzapw/awesome-omni-skill

Comprehensive AI writing detection patterns and methodology. Provides vocabulary lists, structural patterns, model-specific fingerprints, and false positive prevention guidance. Use when analyzing text for AI authorship or understanding detection patterns.

adb-screen-detection

16
from diegosouzapw/awesome-omni-skill

Screen understanding with OCR and template matching for Android device automation

asyncpg-detection

16
from diegosouzapw/awesome-omni-skill

This skill should be used when the user asks to "detect asyncpg usage", "find asyncpg patterns", "scan for asyncpg imports", or "identify asyncpg database code in FastAPI projects". It automatically scans Python files to identify asyncpg imports, connection patterns, and query execution methods that need conversion to SQLAlchemy.

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

moai-lang-r

16
from diegosouzapw/awesome-omni-skill

R 4.4+ best practices with testthat 3.2, lintr 3.2, and data analysis patterns.

moai-lang-python

16
from diegosouzapw/awesome-omni-skill

Python 3.13+ development specialist covering FastAPI, Django, async patterns, data science, testing with pytest, and modern Python features. Use when developing Python APIs, web applications, data pipelines, or writing tests.

moai-icons-vector

16
from diegosouzapw/awesome-omni-skill

Vector icon libraries ecosystem guide covering 10+ major libraries with 200K+ icons, including React Icons (35K+), Lucide (1000+), Tabler Icons (5900+), Iconify (200K+), Heroicons, Phosphor, and Radix Icons with implementation patterns, decision trees, and best practices.

moai-foundation-trust

16
from diegosouzapw/awesome-omni-skill

Complete TRUST 4 principles guide covering Test First, Readable, Unified, Secured. Validation methods, enterprise quality gates, metrics, and November 2025 standards. Enterprise v4.0 with 50+ software quality standards references.

moai-foundation-memory

16
from diegosouzapw/awesome-omni-skill

Persistent memory across sessions using MCP Memory Server for user preferences, project context, and learned patterns

moai-foundation-core

16
from diegosouzapw/awesome-omni-skill

MoAI-ADK's foundational principles - TRUST 5, SPEC-First TDD, delegation patterns, token optimization, progressive disclosure, modular architecture, agent catalog, command reference, and execution rules for building AI-powered development workflows