Skip to main content 홈 크리에이터 biotender-max awesome-bio-agent-skills bio-workflows-outbreak-pipeline
bio-workflows-outbreak-pipeline End-to-end outbreak investigation from pathogen isolates to transmission networks. Orchestrates MLST typing, AMR surveillance, phylodynamic dating, and transmission inference with TransPhylo. Use when investigating disease outbreaks or tracking pathogen transmission chains.
설치로 이동 Skills Marketplace 커뮤니티가 만든 AI 스킬을 발견하고 탐색하세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/BioTender-max/awesome-bio-agent-skills --skill bio-workflows-outbreak-pipeline명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Zip 다운로드 다운로드 중... 이 저장소의 다른 Skills Discover and invoke 1,676 deduplicated biomedical AI agent skills from the Awesome Bio Agent Skills repository (20 source repos, 15 categories). Use this skill as a router whenever a user needs a bioinformatics/biomedical task (genomics, transcriptomics, single-cell, proteomics, protein design, clinical, epigenomics, multi-omics, pathway, metagenomics, database queries, visualization, workflows): search the index, locate the best-matching skill, fetch its SKILL.md, and follow it.
bio-comparative-genomics-ortholog-inference Infer orthologous genes and gene families across species using OrthoFinder3 (HOG-based phylogenetic orthology), SonicParanoid2, Broccoli, ProteinOrtho, OMA / FastOMA hierarchical orthologous groups, eggNOG-mapper, JustOrthologs, and TOGA whole-genome-alignment orthology. Use when building single-copy ortholog sets for phylogenomics, classifying co-orthologs and in/out-paralogs after gene duplication, propagating functional annotation via orthology with awareness of the ortholog conjecture, distinguishing speciation from duplication via gene-tree species-tree reconciliation, computing Quest-for-Orthologs benchmark performance, or running synteny-aware ortholog detection in WGD-affected lineages.
eqtl-catalogue-region-fetch Fetch a region of cis-eQTL summary statistics from EBI eQTL Catalogue v7+
via tabix-on-FTP. Use when an agent needs eQTL beta / SE / p-value for
every variant in a window around a gene's TSS for one specific dataset
(study × tissue × quantification method). Input: dataset_id, chromosome,
start, end, optional molecular_trait_id. Output: harmonised TSV slice.
name bio-workflows-outbreak-pipeline description End-to-end outbreak investigation from pathogen isolates to transmission networks. Orchestrates MLST typing, AMR surveillance, phylodynamic dating, and transmission inference with TransPhylo. Use when investigating disease outbreaks or tracking pathogen transmission chains. tool_type mixed primary_tool mlst workflow true depends_on ["epidemiological-genomics/pathogen-typing","epidemiological-genomics/amr-surveillance","epidemiological-genomics/phylodynamics","epidemiological-genomics/transmission-inference","epidemiological-genomics/variant-surveillance"] qc_checkpoints [{"after_typing":"Valid ST assigned, cgMLST distance matrix computed"},{"after_amr":"AMR genes identified with >90% identity"},{"after_phylodynamics":"Root-to-tip R2 >0.5, clock rate plausible"},{"after_transmission":"Transmission pairs consistent with epi data"}]
Version Compatibility
Reference examples tested with: AMRFinderPlus 3.12+, BioPython 1.83+, IQ-TREE 2.2+, Nextclade 3.3+, TreeTime 0.11+, matplotlib 3.8+, mlst 2.23+, pandas 2.2+, scanpy 1.10+
Before using code patterns, verify installed versions match. If versions differ:
Python: pip show <package> then help(module.function) to check signatures
R: packageVersion('<pkg>') then ?function_name to verify parameters
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.
Outbreak Pipeline
"Characterize a pathogen outbreak from my isolate sequences" → Orchestrate MLST typing, SNP phylogeny, TreeTime time-scaled tree construction, TransPhylo transmission inference, AMR profiling, and variant surveillance for genomic epidemiology.
Complete workflow for genomic epidemiology: from pathogen isolates to transmission networks and outbreak characterization.
Workflow Overview
Pathogen Isolate Genomes (FASTA/FASTQ)
|
v
+---------+---------+
| |
v v
[1a. MLST Typing] [1b. AMR Detection] <-- Parallel execution
| |
+--------+----------+
|
v
[2. Core Genome Alignment] --> snippy / ParSNP
|
v
[3. Phylodynamics] --> TreeTime / BEAST2
|
v
[4. Transmission Inference] --> TransPhylo
|
v
Transmission Network + R0 Estimates + Timeline
Prerequisites
conda install -c bioconda mlst abricate snippy iqtree fasttree
pip install treetime transphylo biopython pandas matplotlib
Rscript -e "install.packages('TransPhylo')"
Primary Path: Bacterial Outbreak Investigation
Step 1a: MLST Typing (Parallel)
#!/bin/bash
ISOLATES="isolate1.fasta isolate2.fasta isolate3.fasta"
OUTDIR="outbreak_results"
mkdir -p ${OUTDIR} /{mlst,amr,alignment,phylo,transmission}
echo "=== MLST Typing ==="
fasta ;
sample=$( .fasta)
mlst > /mlst/ .mlst.txt
/mlst/*.mlst.txt > /mlst/all_mlst.tsv
for
in
$ISOLATES
do
basename
$fasta
$fasta
${OUTDIR}
${sample}
done
cat
${OUTDIR}
${OUTDIR}
echo
"MLST complete: ${OUTDIR} /mlst/all_mlst.tsv"
Step 1b: AMR Detection (Parallel) echo "=== AMR Detection ==="
for fasta in $ISOLATES ; do
sample=$(basename $fasta .fasta)
abricate --db ncbi $fasta > ${OUTDIR} /amr/${sample} .amr.tsv
done
abricate --summary ${OUTDIR} /amr/*.amr.tsv > ${OUTDIR} /amr/amr_summary.tsv
echo "AMR summary: ${OUTDIR} /amr/amr_summary.tsv"
Step 2: Core Genome Alignment echo "=== Core Genome Alignment ==="
REFERENCE="reference.gbk"
for fasta in $ISOLATES ; do
sample=$(basename $fasta .fasta)
snippy --outdir ${OUTDIR} /alignment/snippy_${sample} \
--ref $REFERENCE \
--ctgs $fasta \
--cpus 8
done
snippy-core --ref $REFERENCE ${OUTDIR} /alignment/snippy_*
mv core.* ${OUTDIR} /alignment/
echo "Core alignment: ${OUTDIR} /alignment/core.aln"
Step 3: Phylodynamics with TreeTime import subprocess
from Bio import Phylo, AlignIO
import pandas as pd
import matplotlib.pyplot as plt
from pathlib import Path
outdir = Path('outbreak_results' )
subprocess.run([
'iqtree2' , '-s' , str (outdir / 'alignment/core.aln' ),
'-m' , 'GTR+G' , '-B' , '1000' , '-bnni' , '-T' , 'AUTO' ,
'--prefix' , str (outdir / 'phylo/outbreak' )
], check=True )
metadata = pd.DataFrame({
'name' : ['isolate1' , 'isolate2' , 'isolate3' , 'isolate4' , 'isolate5' ],
'date' : ['2024-01-15' , '2024-01-22' , '2024-02-01' , '2024-02-10' , '2024-02-15' ]
})
metadata.to_csv(outdir / 'phylo/metadata.tsv' , sep='\t' , index=False )
subprocess.run([
'treetime' ,
'--tree' , str (outdir / 'phylo/outbreak.treefile' ),
'--aln' , str (outdir / 'alignment/core.aln' ),
'--dates' , str (outdir / 'phylo/metadata.tsv' ),
'--outdir' , str (outdir / 'phylo/treetime_output' ),
'--coalescent' , 'skyline' ,
'--clock-filter' , '3'
], check=True )
print ('TreeTime output:' , outdir / 'phylo/treetime_output' )
Step 4: Transmission Inference with TransPhylo library( TransPhylo)
library( ape)
tree <- read.nexus( "outbreak_results/phylo/treetime_output/timetree.nexus" )
dateT <- 2024.2
w_shape <- 2
w_scale <- 7/ 365
res <- inferTTree( tree, dateT = dateT,
w.shape = w_shape, w.scale = w_scale,
mcmcIterations = 10000 ,
startNeg = 1 , startPi = 0.5 )
ttree <- extractTTree( res)
medTTree <- medTTree( res)
pdf( "outbreak_results/transmission/transmission_tree.pdf" , width= 10 , height= 8 )
plotTTree( medTTree)
dev.off( )
wiw <- computeMatWIW( res)
write.csv( wiw, "outbreak_results/transmission/who_infected_whom.csv" )
R0 <- getOffspringMulti( res)
cat( "R0 estimate:" , mean( R0) , "(95% CI:" , quantile( R0, 0.025 ) , "-" , quantile( R0, 0.975 ) , ")\n" )
Python Alternative: TransPhylo via rpy2 import rpy2.robjects as ro
from rpy2.robjects.packages import importr
from rpy2.robjects import pandas2ri
import pandas as pd
from pathlib import Path
pandas2ri.activate()
transphylo = importr('TransPhylo' )
ape = importr('ape' )
outdir = Path('outbreak_results' )
tree = ape.read_nexus(str (outdir / 'phylo/treetime_output/timetree.nexus' ))
date_t = 2024.2
w_shape = 2
w_scale = 7 /365
res = transphylo.inferTTree(tree, dateT=date_t, w_shape=w_shape, w_scale=w_scale,
mcmcIterations=10000 , startNeg=1 , startPi=0.5 )
med_tree = transphylo.medTTree(res)
ro.r(f'''
pdf("{outdir} /transmission/transmission_tree.pdf", width=10, height=8)
plotTTree(medTTree({res} ))
dev.off()
''' )
print (f'Transmission tree saved to {outdir} /transmission/' )
Visualization: Outbreak Timeline import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from datetime import datetime
metadata = pd.read_csv('outbreak_results/phylo/metadata.tsv' , sep='\t' )
metadata['date' ] = pd.to_datetime(metadata['date' ])
mlst = pd.read_csv('outbreak_results/mlst/all_mlst.tsv' , sep='\t' , header=None ,
names=['file' , 'scheme' , 'ST' ] + [f'locus{i} ' for i in range (7 )])
mlst['sample' ] = mlst['file' ].apply(lambda x: x.split('/' )[-1 ].replace('.fasta' , '' ))
amr = pd.read_csv('outbreak_results/amr/amr_summary.tsv' , sep='\t' )
combined = metadata.merge(mlst[['sample' , 'ST' ]], left_on='name' , right_on='sample' )
fig, ax = plt.subplots(figsize=(12 , 6 ))
colors = {'ST11' : 'red' , 'ST258' : 'blue' , 'ST307' : 'green' }
for st in combined['ST' ].unique():
subset = combined[combined['ST' ] == st]
ax.scatter(subset['date' ], [1 ]*len (subset), label=f'ST{st} ' ,
s=100 , c=colors.get(f'ST{st} ' , 'gray' ), alpha=0.7 )
ax.set_xlabel('Date' )
ax.set_ylabel('' )
ax.set_title('Outbreak Timeline by Sequence Type' )
ax.legend()
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y-%m-%d' ))
plt.xticks(rotation=45 )
plt.tight_layout()
plt.savefig('outbreak_results/outbreak_timeline.pdf' )
Parameter Recommendations Step Parameter Value Rationale snippy --mincov 10 Minimum coverage for variant call IQ-TREE -m GTR+G General time-reversible model TreeTime --clock-filter 3 Remove temporal outliers >3 IQR TransPhylo w.shape, w.scale 2, 7/365 Generation time ~7 days for many bacteria TransPhylo mcmcIterations 10000+ Ensure convergence
Troubleshooting Issue Likely Cause Solution No MLST match Novel ST or poor assembly Check assembly quality, submit novel ST Poor temporal signal Insufficient sampling, recombination Remove recombination with Gubbins, check dates TreeTime clock-filter removes many Wrong root, contamination Re-root tree, check sample quality TransPhylo non-convergence Wrong generation time Adjust w.shape/w.scale, increase iterations Missing AMR genes Database mismatch Try multiple databases (ncbi, card, resfinder)
Output Files File Description mlst/all_mlst.tsvSequence types for all isolates amr/amr_summary.tsvAMR gene presence/absence matrix alignment/core.alnCore genome SNP alignment phylo/outbreak.treefileML phylogenetic tree phylo/treetime_output/Dated tree and molecular clock transmission/transmission_tree.pdfInferred transmission network transmission/who_infected_whom.csvTransmission probability matrix
Related Skills
database-access/sra-data - Download outbreak FASTQ from SRA / ENA
database-access/ncbi-datasets-cli - Bulk-pull pathogen reference genomes (e.g. datasets download virus)
epidemiological-genomics/pathogen-typing - MLST and cgMLST details
epidemiological-genomics/amr-surveillance - AMRFinderPlus, ResFinder
epidemiological-genomics/phylodynamics - TreeTime, BEAST2 parameters
epidemiological-genomics/transmission-inference - TransPhylo configuration
epidemiological-genomics/variant-surveillance - Nextclade for viral outbreaks
phylogenetics/modern-tree-inference - IQ-TREE2 model selection