1. 为什么要做SMR?
GWAS找到了表型相关SNP后,需要找到SNP相关基因和通路,解释SNP如何影响表型。
2. 千人计划数据下载
下载相应染色体的数据,每条染色体均有.vcf.gz和.vcf.gz.tbi(索引)两个文件。如果用plink操作,只要.vcf.gz就可,好像bcftools需要.tbi
3. QTL数据下载
打开虚拟机、终端。下载Linux版本
wget --no-check-certificate https://cnsgenomics.com/software/smr/download/smr_Linux.zip
unzip smr_Linux.zip
如果想在windows运行,就下载对应的Windows版本,然后在cmd窗口,cd到文件夹下。写语句时调用对应版本的文件。如
C:\Users\lenovo\Documents\SMR\smr_Win>SMR_x86 --bfile mydata --gwas-summary mygwas.ma --beqtl-summary myeqtl --out mysmr --thread-num 10
命令解释
在yanglab就可以下载三种QTL数据;下载、解压
这个网站也可以下载:
eQTL
wget --no-check-certificate https://cnsgenomics.com/data/SMR/westra_eqtl_hg19.zip
unzip westra_eqtl_hg19.zip ##10.3mb
wget --no-check-certificate https://cnsgenomics.com/data/SMR/cage_eqtl_data_lite_hg19.tar.gz
##Lite version of the CAGE data (only SNPs with P < 1e-5 are included; 86.1 MB)
tar -zxvf cage_eqtl_data_lite_hg19.tar.gz
wget --no-check-certificate https://yanglab.westlake.edu.cn/data/SMR/GTEx_V8_cis_sqtl_summary_lite.tar
tar -zxvf GTEx_V8_cis_sqtl_summary_lite.tar
报错
因为报错这个压缩包就是没用gzip格式压缩,所以不用加z指令
直接使用:
tar -xvf GTEx_V8_cis_sqtl_summary_lite.tar
解压之后进入文件夹,还要继续解压
如果wget失败,可以直接在网页下载
mQTL
wget --no-check-certificate https://yanglab.westlake.edu.cn/data/SMR/LBC_BSGS_meta_lite.tar.gz
还有一个是云盘里的,wget不了,手动下。
unzip US_mQTLS_SMR_format.zip
也有一个数据库QTLbase,可以检索和下载多种类型QTL:http://mulinlab.org/qtlbase/index.html
好像没有分类下载,全部打包下载有10个压缩吧,每个都在2G内。内容很杂,需要自己仔细分类以及找到对应数据的文献。
注意:
- SMR的QTL使用的是hg19的chr和bp。
- 事先装好plink,因为在1000 genome project下载的是vcf.gz,而SMR要求的是plink的bed格式。
4. eQTL共定位
- 准备mygwas.ma,里面是GWAS的summary data
Important: “A1” needs to be the effect allele with “A2” being the other allele and “freq” needs to be the frequency of “A1”
- PLINK(bed)格式的SNP genotyp data,把你人群中要做共定位的SNP的信息提出来就好了。
注意:修改bim文件
修改bp为hg19版,和改snp名称为rs号
–bfile reads individual-level SNP genotype data (in PLINK binary format) from a reference sample for LD estimation, i.e. .bed, .bim, and .fam files.
- 这里演示westra和GTEx V8的cis-QTL
smr_Linux --bfile SNP25 --gwas-summary mygwas.ma --beqtl-summary westra_eqtl_hg19 --diff-freq 1 --diff-freq-prop 1 --out ./out/westra --thread-num 10
for i in 1 2 6 11 16 21; do smr_Linux --bfile SNP25 --gwas-summary mygwas.ma --beqtl-summary ./GTEx_V8_cis_sqtl_summary_lite/sQTL_besd_lite/sQTL_Heart_Left_Ventricle.lite.chr$i --diff-freq 1 --diff-freq-prop 1 --out ./out/sQTL_Heart_Left_Ventricle.lite.chr$i; done
参数说明文件
log解释:
- For each probe, the analysis will only include SNPs with eQTL p-values < 1.565400e-03——避免弱工具变量影响。
- then exclude SNPs with LD r-squared between top-SNP > 0.90 or < 0.05, and further exclude one of each pair of the remaining SNPs with LD r-squared > 0.90——强LD会影响HEIDI检验。
- –diff-freq 和 --diff-freq-prop 属于QC,用于检验GWAS summary、LD reference panel和QTL population之间SNP的freqency的差异。可以通过设为最大值1对其进行suppress。建议使用同一人种的QTL,但如果没有或同人种的样本量、cell type和组织等不足,也可使用国外的;可行性仍需文献支持。
结果解释
- p_SMR:阈值为0.05/(number of probers);probe数看运算过程的log,SMR结果不输出log文件。
资料和致谢
资料来源
- Z. Zhu et al., Integration of summary data from GWAS and eQTL studies predicts complex trait gene targets. Nat. Genet. 48, 481–487 (2016).
- 谢谢大佬 橙子牛奶糖的教程
解压之后,smr_Linux:未找到命令 这是怎么回事?