/bio-epidemiological-genomics-amr-surveillance
Detect and track antimicrobial resistance genes using AMRFinderPlus and ResFinder with epidemiological context. Monitor resistance trends and identify emerging resistance patterns. Use when screening genomes for AMR genes or tracking resistance in surveillance programs.
Claude Code
$ npx -y skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-epidemiological-genomics-amr-surveillance --agent claude-code
Codex
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-epidemiological-genomics-amr-surveillance -a codex -y
Cursor
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-epidemiological-genomics-amr-surveillance -a cursor -y
Gemini CLI
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-epidemiological-genomics-amr-surveillance -a gemini-cli -y
GitHub Copilot
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-epidemiological-genomics-amr-surveillance -a github-copilot -y
OpenCode
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-epidemiological-genomics-amr-surveillance -a opencode -y
Windsurf
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-epidemiological-genomics-amr-surveillance -a windsurf -y
SKILL.md
bio-epidemiological-genomics-amr-surveillance.SKILL.mdname: bio-epidemiological-genomics-amr-surveillance
description: Detect and track antimicrobial resistance genes using AMRFinderPlus and ResFinder with epidemiological context. Monitor resistance trends and identify emerging resistance patterns. Use when screening genomes for AMR genes or tracking resistance in surveillance programs.
tool_type: cli
primary_tool: AMRFinderPlus
Version Compatibility
Reference examples tested with: AMRFinderPlus 3.12+, pandas 2.2+
Before using code patterns, verify installed versions match. If versions differ:
- Python: `pip show <package>` then `help(module.function)` to check signatures
- CLI: `<tool> --version` then `<tool> --help` to confirm flags
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
AMR Surveillance
**"Screen my isolates for resistance genes and track AMR trends"** → Detect antimicrobial resistance determinants in bacterial genomes and monitor resistance patterns over time for surveillance programs.
- CLI: `amrfinder -n assembly.fasta --plus --organism Klebsiella`
AMRFinderPlus
# Install AMRFinderPlus
conda install -c bioconda ncbi-amrfinderplus
# Update database
amrfinder -u
# Basic AMR detection from genome
amrfinder -n genome.fasta -o results.tsv
# With protein input (faster, more sensitive)
amrfinder -p proteins.faa -o results.tsv
# Specify organism for point mutations
amrfinder -n genome.fasta --organism Salmonella -o results.tsv
# Available organisms: Acinetobacter_baumannii, Campylobacter,
# Clostridioides_difficile, Enterococcus_faecalis, Enterococcus_faecium,
# Escherichia, Klebsiella, Neisseria, Pseudomonas_aeruginosa,
# Salmonella, Staphylococcus_aureus, Staphylococcus_pseudintermedius,
# Streptococcus_agalactiae, Streptococcus_pneumoniae, Streptococcus_pyogenes,
# Vibrio_cholerae
Parse AMRFinder Results
import pandas as pd
def parse_amrfinder(results_file):
'''Parse AMRFinderPlus output
Key columns:
- Gene symbol: AMR gene name
- Sequence name: Contig/protein where found
- Element type: AMR, STRESS, VIRULENCE
- Element subtype: AMR mechanism
- Class: Drug class affected
- Subclass: Specific drug affected
- % Coverage: Alignment coverage (>90% typical cutoff)
- % Identity: Sequence identity (>90% typical cutoff)
'''
df = pd.read_csv(results_file, sep='\t')
# Filter high-confidence hits
df = df[(df['% Coverage of reference sequence'] >= 90) &
(df['% Identity to reference sequence'] >= 90)]
return df
def summarize_amr_profile(results_df):
'''Summarize AMR profile by drug class'''
amr_only = results_df[results_df['Element type'] == 'AMR']
summary = {
'total_genes': len(amr_only),
'drug_classes': amr_only['Class'].nunique(),
'by_class': amr_only.groupby('Class')['Gene symbol'].apply(list).to_dict()
}
return summaryResFinder Alternative
# ResFinder for acquired resistance genes
# Web: https://cge.cbs.dtu.dk/services/ResFinder/
# Command line via KMA
kma -i reads_1.fq reads_2.fq -o output -t_db resfinder_db -1t1
# Or use CGE Docker
docker run --rm -v $(pwd):/data cgetools/resfinder \
-i /data/genome.fasta -o /data/results -db_res /db/resfinder_dbTrack Resistance Trends
**Goal:** Monitor how AMR gene prevalence changes over time across a surveillance cohort.
**Approach:** Group samples by time period, count AMR gene occurrences per period, and normalize to prevalence percentages for trend analysis.
def analyze_amr_trends(samples_df, date_col='collection_date', gene_col='Gene symbol'):
'''Analyze AMR gene prevalence over time
For surveillance programs tracking:
- Emergence of new resistance
- Increasing prevalence of known resistance
- Geographic spread patterns
'''
# Group by time period
samples_df['period'] = pd.to_datetime(samples_df[date_col]).dt.to_period('M')
# Calculate prevalence by period
prevalence = samples_df.groupby(['period', gene_col]).size().unstack(fill_value=0)
# Normalize to percentage
total_per_period = samples_df.groupby('period').size()
prevalence_pct = prevalence.div(total_per_period, axis=0) * 100
return prevalence_pct
def detect_emerging_resistance(historical_df, new_samples_df):
'''Flag novel or increasing resistance patterns
Alerts for:
1. New AMR gene not seen before
2. Significant increase in prevalence
3. New combinations of resistance
'''
historical_genes = set(historical_df['Gene symbol'].unique())
new_genes = set(new_samples_df['Gene symbol'].unique())
novel = new_genes - historical_genes
if novel:
print(f'ALERT: Novel resistance genes detected: {novel}')
return novelClinical Interpretation
# Drug-gene relationships for interpretation
AMR_INTERPRETATION = {
'bla_CTX-M': {
'class': 'Beta-lactam',
'affects': ['Cephalosporins (3rd gen)', 'Penicillins'],
'clinical': 'ESBL producer - avoid cephalosporins'
},
'bla_KPC': {
'class': 'Beta-lactam',
'affects': ['Carbapenems', 'Cephalosporins', 'Penicillins'],
'clinical': 'Carbapenemase - limited treatment options'
},
'mcr-1': {
'class': 'Polymyxin',
'affects': ['Colistin'],
'clinical': 'Plasmid-mediated colistin resistance - critical'
},
'vanA': {
'class': 'Glycopeptide',
'affects': ['Vancomycin', 'Teicoplanin'],
'clinical': 'VRE - infection control measures required'
}
}
def interpret_amr_profile(genes):
'''Generate clinical interpretation of AMR profile'''
interpretations = []
for gene in genes:
for pattern, info in AMR_INTERPRETATION.items():
if pattern in gene:
interpretations.append({
'gene': gene,Read more
name: bio-epidemiological-genomics-amr-surveillance description: Detect and track antimicrobial resistance genes using AMRFinderPlus and ResFinder with epidemiological context. Monitor resistance trends and identify emerging resistance patterns. Use when screening genomes for AMR genes or tracking resistance in surveillance programs. tool_type: cli primary_tool: AMRFinderPlus
Version Compatibility
Reference examples tested with: AMRFinderPlus 3.12+, pandas 2.2+
Before using code patterns, verify installed versions match. If versions differ:
- Python: `pip show <package>` then `help(module.function)` to check signatures
- CLI: `<tool> --version` then `<tool> --help` to confirm flags
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
AMR Surveillance
**"Screen my isolates for resistance genes and track AMR trends"** → Detect antimicrobial resistance determinants in bacterial genomes and monitor resistance patterns over time for surveillance programs.
- CLI: `amrfinder -n assembly.fasta --plus --organism Klebsiella`
AMRFinderPlus
# Install AMRFinderPlus conda install -c bioconda ncbi-amrfinderplus # Update database amrfinder -u # Basic AMR detection from genome amrfinder -n genome.fasta -o results.tsv # With protein input (faster, more sensitive) amrfinder -p proteins.faa -o results.tsv # Specify organism for point mutations amrfinder -n genome.fasta --organism Salmonella -o results.tsv # Available organisms: Acinetobacter_baumannii, Campylobacter, # Clostridioides_difficile, Enterococcus_faecalis, Enterococcus_faecium, # Escherichia, Klebsiella, Neisseria, Pseudomonas_aeruginosa, # Salmonella, Staphylococcus_aureus, Staphylococcus_pseudintermedius, # Streptococcus_agalactiae, Streptococcus_pneumoniae, Streptococcus_pyogenes, # Vibrio_cholerae
Parse AMRFinder Results
import pandas as pd
def parse_amrfinder(results_file):
'''Parse AMRFinderPlus output
Key columns:
- Gene symbol: AMR gene name
- Sequence name: Contig/protein where found
- Element type: AMR, STRESS, VIRULENCE
- Element subtype: AMR mechanism
- Class: Drug class affected
- Subclass: Specific drug affected
- % Coverage: Alignment coverage (>90% typical cutoff)
- % Identity: Sequence identity (>90% typical cutoff)
'''
df = pd.read_csv(results_file, sep='\t')
# Filter high-confidence hits
df = df[(df['% Coverage of reference sequence'] >= 90) &
(df['% Identity to reference sequence'] >= 90)]
return df
def summarize_amr_profile(results_df):
'''Summarize AMR profile by drug class'''
amr_only = results_df[results_df['Element type'] == 'AMR']
summary = {
'total_genes': len(amr_only),
'drug_classes': amr_only['Class'].nunique(),
'by_class': amr_only.groupby('Class')['Gene symbol'].apply(list).to_dict()
}
return summaryResFinder Alternative
# ResFinder for acquired resistance genes
# Web: https://cge.cbs.dtu.dk/services/ResFinder/
# Command line via KMA
kma -i reads_1.fq reads_2.fq -o output -t_db resfinder_db -1t1
# Or use CGE Docker
docker run --rm -v $(pwd):/data cgetools/resfinder \
-i /data/genome.fasta -o /data/results -db_res /db/resfinder_dbTrack Resistance Trends
**Goal:** Monitor how AMR gene prevalence changes over time across a surveillance cohort.
**Approach:** Group samples by time period, count AMR gene occurrences per period, and normalize to prevalence percentages for trend analysis.
def analyze_amr_trends(samples_df, date_col='collection_date', gene_col='Gene symbol'):
'''Analyze AMR gene prevalence over time
For surveillance programs tracking:
- Emergence of new resistance
- Increasing prevalence of known resistance
- Geographic spread patterns
'''
# Group by time period
samples_df['period'] = pd.to_datetime(samples_df[date_col]).dt.to_period('M')
# Calculate prevalence by period
prevalence = samples_df.groupby(['period', gene_col]).size().unstack(fill_value=0)
# Normalize to percentage
total_per_period = samples_df.groupby('period').size()
prevalence_pct = prevalence.div(total_per_period, axis=0) * 100
return prevalence_pct
def detect_emerging_resistance(historical_df, new_samples_df):
'''Flag novel or increasing resistance patterns
Alerts for:
1. New AMR gene not seen before
2. Significant increase in prevalence
3. New combinations of resistance
'''
historical_genes = set(historical_df['Gene symbol'].unique())
new_genes = set(new_samples_df['Gene symbol'].unique())
novel = new_genes - historical_genes
if novel:
print(f'ALERT: Novel resistance genes detected: {novel}')
return novelClinical Interpretation
# Drug-gene relationships for interpretation
AMR_INTERPRETATION = {
'bla_CTX-M': {
'class': 'Beta-lactam',
'affects': ['Cephalosporins (3rd gen)', 'Penicillins'],
'clinical': 'ESBL producer - avoid cephalosporins'
},
'bla_KPC': {
'class': 'Beta-lactam',
'affects': ['Carbapenems', 'Cephalosporins', 'Penicillins'],
'clinical': 'Carbapenemase - limited treatment options'
},
'mcr-1': {
'class': 'Polymyxin',
'affects': ['Colistin'],
'clinical': 'Plasmid-mediated colistin resistance - critical'
},
'vanA': {
'class': 'Glycopeptide',
'affects': ['Vancomycin', 'Teicoplanin'],
'clinical': 'VRE - infection control measures required'
}
}
def interpret_amr_profile(genes):
'''Generate clinical interpretation of AMR profile'''
interpretations = []
for gene in genes:
for pattern, info in AMR_INTERPRETATION.items():
if pattern in gene:
interpretations.append({
'gene': gene,Other skills on openclaw-medical-skills.
adaptyv
Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental…
adhd-daily-planner
Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time…
aeon
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting,…
agent-browser
Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extract data,…
More skills from other plugins.
paddleocr-doc-parsing
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
13c-metabolic-flux
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…
Questions about bio-epidemiological-genomics-amr-surveillance.
- Which coding agents can use bio-epidemiological-genomics-amr-surveillance?
- bio-epidemiological-genomics-amr-surveillance installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

