跳到正文
Skillpedia
分析与电子表格51k · #3550

qiime2-amplicon

它能做什么

这个工具可以处理 16S 扩增子测序数据(16S amplicon reads)这类基因序列,识别分类单元(ASVs)并给出它们的分类结果,同时详细记录每一步操作。它还会检查输入数据是否正确,以及是否与 QIIME 2 软件兼容。

适用场景

  • ✓当你需要分析来自环境或生物样本的 DNA 序列时。
  • ✓当你想识别样本中不同种类的细菌时。
  • ✓如果你已经有原始测序数据,并希望把它们整理好以便分析。

技能链接

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/qiime2-amplicon/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/qiime2-amplicon/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我想分析我的 16S 扩增子序列。我的文件是 'sample1_R1.fastq.gz' 和 'sample1_R2.fastq.gz',还有一个元数据文件 'metadata.tsv'。所用引物为 GTGYCAGCMGCCGCGGTAA(正向)和 GGACTACNVGGGTWTCTAAT(反向)。我想把序列分别截取到 220(正向)和 200(反向)个碱基,预期的最大长度为 300 个碱基。我手头的分类器文件是 'classifier.qza'。”

每周 5 个新技能,1 分钟读完。

工作原理

工具会先检查你的数据文件(清单文件和元数据文件)以及引物信息是否正确。然后它调用 QIIME 2 软件处理序列、去除引物、识别分类单元并进行分类注释,同时保留所有步骤的记录。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

QIIME 2 paired-end 16S amplicons

Use for a demultiplexed, paired-end 16S assay with known primers, quality encoding, expected insert length, and sample metadata. This bounded workflow imports reads, removes 5′ primers, denoises with DADA2, classifies ASVs using an explicitly supplied classifier, and retains .qza/.qzv provenance. Do not treat read counts as absolute cell counts or taxonomy assignments as strain identification.

Establish the assay before running

  • Confirm Phred+33, read orientation, primer sequences as sequenced in forward/reverse reads, and whether primers have already been removed. The bundled runner requires primers still present at the 5′ ends; it anchors Cutadapt matching and discards untrimmed pairs. Already trimmed reads need a direct import → DADA2 workflow with that omission recorded in provenance.
  • Choose truncation positions from actual per-base quality and error profiles. trunc-f/r are positions after primer removal. The expected maximum insert length also excludes primers. Require trunc_f + trunc_r - maximum_insert_length >= 12; use a margin for length variation. The check predicts geometrical overlap, not successful biological merging.
  • Choose a classifier whose reference database, taxonomic coverage, orientation and training approach fit the assay. Full-length classifiers are supported; primer-region-specific training is not mandatory. Match its scikit-learn version exactly to the installed environment (the official 2026.7 distribution pins 1.7.1). Record source URL, database version and checksum. QIIME's current data-resources page links externally hosted classifiers for 2026.4 and later; its older downloads are not automatically compatible. Do not automatically fetch an arbitrary “latest” classifier or reuse an incompatible serialized sklearn model. Load sklearn classifier artifacts only from trusted sources: QZA format validation does not make an untrusted serialized model safe.
  • Include extraction blanks, PCR negatives, and a mock community where available. The runner rejects empty FASTQs; preserve empty-control IDs separately and report them rather than silently deleting control evidence. Assess contamination before ecological interpretation.

Input files

Manifest is a tab-separated PairedEndFastqManifestPhred33V2 file with exactly these headers:

sample-id	forward-absolute-filepath	reverse-absolute-filepath
sample1	/data/sample1_R1.fastq.gz	/data/sample1_R2.fastq.gz

This is the helper's deliberately narrow manifest profile. Use actual tab characters, literal absolute paths visible to the runtime (expand environment variables before calling this helper), and one row per sample; no comment/directive rows or additional columns in this manifest. Do not reverse-complement R2 files. Sample metadata is a tab-separated file with first column sample-id, unique IDs matching the manifest, and optional #q2:types annotation. Include covariates and biological replicate IDs needed downstream. The helper checks metadata IDs and row structure; QIIME performs full metadata typing/directive validation during execution. Metadata used by actions persists in artifact provenance, so use de-identified biological replicate IDs.

Execute

The helper lives at scripts/amplicon_workflow.py. Commands below assume the skill directory is the working directory. First validate without QIIME. These example primers and lengths are illustrative, not universal assay settings:

python scripts/amplicon_workflow.py validate \
  --manifest manifest.tsv --metadata sample-metadata.tsv \
  --primer-f GTGYCAGCMGCCGCGGTAA --primer-r GGACTACNVGGGTWTCTAAT \
  --trunc-f 220 --trunc-r 200 --amplicon-max 300

Then run in the QIIME 2 2026.7 environment with a compatible classifier. This study-specific invocation is illustrative; choose lengths using a preceding quality inspection or pilot:

python scripts/amplicon_workflow.py run \
  --manifest manifest.tsv --metadata sample-metadata.tsv \
  --primer-f GTGYCAGCMGCCGCGGTAA --primer-r GGACTACNVGGGTWTCTAAT \
  --trunc-f 220 --trunc-r 200 --amplicon-max 300 \
  --classifier compatible-classifier.qza --threads 4 --output run01

run executes immediately, writes only to a fresh output directory, and stops on a failing QIIME command. It streams through every paired FASTQ record to catch mismatched IDs/order/counts,

…

常见问题

什么是 ASVs?

ASVs(扩增子序列变体)是一条条独特的基因序列,代表不同的物种或同一物种内的变异。它们就像基因上的“指纹”。

什么是 'provenance'?

'provenance'(溯源记录)是对数据处理过程中所有步骤和所用工具的详细记录。它有助于保证分析结果可以被复现,也更值得信赖。

我可以使用任意分类器文件吗?

不可以。分类器必须与你所用的 QIIME 2 版本兼容,并且适用于 16S 数据。请务必使用可信的分类器,并确保 scikit-learn 版本正确。

详情

作者的原始描述

Processes paired-end 16S amplicon reads into QIIME 2 ASVs and taxonomy with retained artifact provenance. Checks paired FASTQ manifests, primer orientation diagnostics, predicted post-trimming overlap, sample IDs, runtime versions and read retention, and guides selection of compatible taxonomic classifiers.

repo: K-Dense-AI/scientific-agent-skills

热度

GitHub 星标
51k
排名
#3550
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能