metagenome-host-removal
Remove host-derived reads from metagenomic samples by aligning to a host reference genome and extracting unmapped pairs.
- License 许可
- MIT
- 最近更新
- 2026-11-03
- Stars
- ★ 4
- Forks
- 1
01 前言 Front Matter
- name
- metagenome-host-removal
- description
- Remove host-derived reads from metagenomic samples by aligning to a host reference genome and extracting unmapped pairs.
02 资源文件 9
- 参考文档agents/claude.yaml324 B
- 参考文档agents/openai.yaml325 B
- 参考文档agents/README.md322 B
- 资产文件assets/.gitkeep—
- 参考文档config.yaml301 B
- 参考文档references/host-depletion.md2.9 KB
- 参考文档references/README.md68 B
- 脚本scripts/batch_run.sh4.8 KB
- 脚本scripts/run.sh5.0 KB
03 SKILL.md 正文
Skill: metagenome-host-removal
Use When
- The user has shotgun metagenomic reads contaminated with host DNA.
- The user wants to remove human, mouse, or other host reads before taxonomic or assembly analysis.
- The user needs to quantify the host contamination rate in a metagenomic sample.
Inputs
- Required:
- FASTQ file(s) — single-end or paired-end reads (
.fastq,.fq,.fastq.gz,.fq.gz). - Host reference genome index — pre-built Bowtie2 or BWA-MEM2 index.
- FASTQ file(s) — single-end or paired-end reads (
- Optional:
--aligner— Aligner to use (bowtie2orbwa-mem2, default:bowtie2).--threads N— Number of threads (default: 4).--outdir DIR— Output directory (default:host_removal_results).--sensitivity— Bowtie2 sensitivity preset (--very-sensitive,--sensitive; default:--very-sensitive).
Workflow
- Align reads to the host reference genome using Bowtie2 or BWA-MEM2.
- Extract unmapped reads (
samtools view -f 4for SE;-f 12for PE unmapped pairs). - Sort unmapped reads by name (
samtools sort -n). - Convert back to FASTQ (
samtools fastq). - Report: total reads, host reads removed, non-host reads retained, host contamination rate.
Output Contract
- Host-depleted FASTQ(s) — One or two FASTQ files with host reads removed (
<outdir>/<sample>_hostdepleted_R1.fastq.gz,_R2.fastq.gzfor PE). - Host contamination summary — Total reads, host reads, non-host reads, host contamination percentage.
Limits
- Bowtie2 or BWA-MEM2 must be installed and available on
$PATH. samtoolsmust be installed and available on$PATH.- Host genome index must be pre-built (use
bowtie2-buildorbwa-mem2 index). - Human reference: GRCh38 (hg38) is recommended for human host removal.
- For clinical samples, host removal rate should be >95%; lower rates suggest index mismatch or sample issues.
- This skill does not build the host index; the user must provide a pre-built index path.
- Common failure cases:
- Host genome index path incorrect or index files incomplete, causing aligner to abort.
- Using the wrong host reference genome (e.g., mouse index for a human-derived sample).
- Paired-end read extraction flags incorrect, producing orphan reads without mates.
04 同仓库更多 Skills
structured-intelligence-skill-creator
Create or update repository skills that conform to local templates, provider metadata requirements, registry rules, and validation workflows.
stat-survival-analysis
Estimate and compare survival functions using Kaplan-Meier curves and log-rank test, with optional Cox proportional hazards regression.
stat-pca
Perform PCA on a numeric data matrix to reduce dimensionality, visualize sample structure, and identify top contributing features.
stat-pairwise-correlation
Compute pairwise correlations and significance tests across all numeric variables, and produce a correlation heatmap.
stat-nonlinear-embedding
Embed high-dimensional data into 2D using t-SNE or UMAP for exploratory visualization of sample or cell relationships.
stat-logistic-regression
Fit a logistic regression model for binary outcomes, report odds ratios and model performance (AUC-ROC, confusion matrix).