【以下問題是在虛擬機ubantu18.04上操作是遇到的問題】
安裝轉換GWAS summary data.txt文件為.sumstats文件的軟件LDSC:
- 1、git clone 下載提示錯誤:
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
原因:git clone 緩存不夠,網速限制
解決方法:增加postBuffer : git config --global http.postBuffer 5242880000
(5000 * 1024 * 1024),這里給了5G,可視情況而定,下載時關閉其他應用
- 2、創建依賴環境
conda env create --file environment.yml
提示錯誤:
Preparing transaction: done Verifying transaction: / WARNING conda.core.path_actions:verify(963): Unable to create environments file. Path not writable. environment location: /home/codedancing/.conda/environments.txt
Executing transaction: \ WARNING conda.core.envs_manager:register_env(52): Unable to register environment. Path not writable or missing. environment location: /usr/local/anaconda3/envs/python3.6 registry file: /home/codedancing/.conda/environments.txt
原因:注意軟件權限問題,安裝anaconda時自動以root賬戶創建了~/.conda,而當前用戶權限不足,需要修改權限
解決方法:ubantu的直接sudo chmod 777 ~/.conda/*
或 sudo chmod 777 -R /home/gwm/anaconda3
(注意安裝路徑)
- 3、./munge_sumstats.py -h提示錯誤:
- bash環境下操作:
File "./munge_sumstats.py", line 583
if args.daner_n:
TabError: inconsistent use of tabs and spaces in indentation
原因:對比ldsc環境已安裝的包與environment.yml文件里的包之間的差異,發現環境ldsc中缺少scipy包
解決方法:conda install scipy
安裝Fusion依賴plink2R
- plink2R有個問題就是plink2R無法在R3.6.1以上的版本中運行,並且此軟件也不打算更新,而安裝GitHub軟件用到的R包devtools只能在R3.6.1以上的版本中運行!!!
- 之前有人對plink2R進行了改進,使得plink2R可以在R3.6.1以上版本中運行,可以使用下面的方法進行安裝:
sudo apt install r-base=3.6.3-2
進入R
install.packages("devtools")
library(devtools)
devtools::install_github("carbocation/plink2R/plink2R", ref="carbocation-permit-r361")
- 但現在那個更改后的plink2R軟件已被修改作者刪除,所以需要使用plink2R可以試試以下操作:
- 有之前下載過修改后的plink2R包的話,可以直接放在R包目錄下,然后library(plink2R),再安裝提示的依賴包即可,這是我之前下載的plink2R包(於2020年04月)[鏈接:(https://pan.baidu.com/s/1zi-LtpZRqHtY1cVCM8BGdA),提取碼:opvx]
- 自己修改一下之前的plink2R包(可以參考這個回答> Windows環境下解決plink2R的安裝error)
- 用另外的包,如BEDMatrix代替
- 換個方法吧,基於GWAS summary data的TWAS框架下有許多方法,如MetaXcan,UTMOST,MR-TJI,SMR等