Github开源生信云平台 DEMO
--exposure
--outcome
不是。要看你设计这个 gwas-mr 命令时,参数代表什么。
gwas-mr
如果按照我上一条建议的设计:
gwas-mr \ --exposure microbiome.tsv.gz \ --outcome disease.tsv.gz \ --method ivw,egger,weighted-median \ --clump-r2 0.001 \ --clump-kb 10000
这里更合理的含义是:
--clump-r2
--clump-kb
也就是说,不是要求用户提前把工具变量全部筛好。
exposure GWAS │ ↓ P < threshold 筛选 SNP │ ↓ LD clumping │ ↓ ┌─────────────────┐ │ Instrument SNPs │ └─────────────────┘ │ ┌──────┴──────┐ ↓ ↓ exposure βX outcome βY │ │ └──────┬──────┘ ↓ harmonization ↓ MR
所以:
不是“已经筛好的工具变量”,而应该是:
候选工具变量所在的 exposure GWAS summary statistics。
程序自己根据:
--p-threshold 5e-8 --clump-r2 0.001 --clump-kb 10000
筛选。
Outcome 通常不需要先筛选成显著 SNP。
例如你研究:
Bacteroides → 心肌梗死
你从 microbiome GWAS 中筛选:
SNP1 SNP2 SNP3 ...
作为工具变量。
然后去 MI GWAS 中提取这些 SNP:
Microbiome GWAS │ ↓ 筛选工具变量 │ SNP1 SNP2 SNP3 │ ↓ MI GWAS 中找 SNP1 SNP2 SNP3 │ ↓ βY
因此 outcome GWAS 不应该做:
P < 5e-8
这样的筛选。
因为你关心的是:
这些 SNP 对 outcome 的效应是多少?
即使:
SNP1 → MI P = 0.4
也完全可以使用。
实际上,如果 outcome SNP 必须自己也满足 P < 5e-8,会严重改变 MR 的设计。
我会把命令设计成:
gwas-mr \ --exposure microbiome.tsv.gz \ --outcome disease.tsv.gz \ --exposure-p 5e-8 \ --clump-r2 0.001 \ --clump-kb 10000 \ --method ivw,egger,weighted-median
程序内部:
exposure.tsv │ ├── P < 5e-8 │ ↓ 候选 SNP │ ├── LD clumping │ ↓ 独立 instruments │ ├───────────────────┐ ↓ ↓ exposure βX outcome βY ↑ │ outcome.tsv │ ↓ 按 SNP 提取 │ ↓ harmonization │ ↓ MR
如果你是在设计 Rust GWAS 工具,我反而建议不要把所有东西硬塞进 gwas-mr:
# 第一步:筛选 exposure SNP gwas extract \ --input microbiome.tsv.gz \ --p 5e-8 \ --output instruments.tsv # 第二步:LD clumping gwas clump \ --input instruments.tsv \ --reference 1000G_EUR \ --r2 0.001 \ --kb 10000 \ --output instruments.clumped.tsv # 第三步:从 outcome 提取相同 SNP gwas extract-snps \ --input disease.tsv.gz \ --snps instruments.clumped.tsv \ --output outcome.snps.tsv # 第四步:MR gwas mr \ --exposure instruments.clumped.tsv \ --outcome outcome.snps.tsv \ --method ivw,egger,weighted-median
这样设计的好处是每一步的输入/输出都明确,也特别适合你之前设计的 biox-core / biox-tsv / biox-vcf 这种模块化 Rust 架构。
biox-core / biox-tsv / biox-vcf