1. 安裝ldsc
cd ~/software
mkdir ldsc
git clone https://github.com/bulik/ldsc.git
cd ldsc
conda env create --file environment.yml
source activate ldsc
./ldsc.py -h
./munge_sumstats.py -h
2. 開(kāi)始計(jì)算遺傳力
需要提前準(zhǔn)備好GWAS的結(jié)果文件summary.txt為GWAS的summary數(shù)據(jù)纹烹,
包含rs編號(hào)、染色體編號(hào)、位置、A1(效應(yīng)等位基因)希痴、A2(無(wú)效等位基因)邻薯、效應(yīng)值(OR或BETA)棒掠、P值
格式如下:
munge_sumstats.py --sumstats summary.txt --N 17115 --out scz --merge-alleles w_hm3.snplist
同時(shí)計(jì)算遺傳相關(guān)性
for i in $(seq 0 4); do
echo $i
nohup ldsc.py --rg trait${i%}.sumstats.gz,trait1.sumstats.gz,trait2.sumstats.gz,trait3.sumstats.gz,trait4.sumstats.gz --ref-ld-chr chr/ --w-ld-chr chr/ --out --out trait${i%}linearcorr &
done
把所有的SNP位點(diǎn)納入分析厉萝,那么采用這個(gè)命令: munge_sumstats.py --sumstats summary.txt --N 17115 --out scz
參考
https://github.com/bulik/ldsc/wiki/Heritability-and-Genetic-Correlation
https://mp.weixin.qq.com/s?__biz=Mzg2MDA2MDQzMQ==&mid=2247483972&idx=1&sn=6abb84404d5c1e98ef496d9ee71c688e&chksm=ce2d6c24f95ae532c5d12fec895763dafbf3c9afe6a8056b3c044621d5f7a9befd01f3941438&scene=21#wechat_redirect
https://www.cnblogs.com/chenwenyan/p/13865970.html