全基因组关联分析除了找到显著的关联位点,我们还可以做基因优化、geneset富集分析、组织富集分析,下面具体讲一讲怎么利用GWAS的summary数据做这个分析。
summary数据就是关联分析的结果文件
怎么确定系统有没有安装PIP呢,输入命令which pip
,如果没有路径弹出,说明没有PIP,需要安装
pip install intervaltree
或者
conda install -c conda-forge intervaltree
pip install pandas
wget http://www.broadinstitute.org/mpg/depict/depict_download/bundles/DEPICT_v1_rel194.tar.gz
tar -zxvf DEPICT_v1_rel194.tar.gz
cd DEPICT
./src/python/depict.py ./example/ldl_teslovich_nature2010.cfg
如果这一步没有报错,说明环境配置没有问题,可以开始分析自己的数据啦
拷贝yourtrait.cfg文件
cp ldl_teslovich_nature2010.cfg yourtrait.cfg
编辑yourtrait.cfg文件
vi yourtrait.cfg
vi进去后,yourtrait.cfg文件有几处需要修改
gwas_summary_statistics_file: /your/path/to/summary/file/yourtrait.glm.linear
label_for_output_files: yourtrait
pvalue_col_name: P
chr_col_name: Chr
pos_col_name: Pos
plink_executable: /your/path/to/plink/plink
genotype_data_plink_prefix: /your/path/to/genotype/yourtrait_genotype
修改好以上数据后,保存退出文件:wq
./src/python/depict.py yourtrait.cfg
生成的文件分别为loci.txt,geneprioritization.txt, genesetenrichment.txt , tissueenrichment.txt,其中,geneprioritization.txt, genesetenrichment.txt , tissueenrichment.txt即为我们感兴趣的基因优化,geneset富集分析,组织富集分析
Rscript ./DEPICT/src/python/tissue_plot.R ./DEPICT/example/ldl_teslovich_nature2010_tissueenrichment.txt ldl_teslovich