Hello,
I am getting an error (log below) when running PANTHER. This error seems related to the AFR GWAS for neutrophil count from the million veterans program (GCST90475528 - download link of GWAS catalogue). The error does not occur for other chromosomes, or when using other GWAS.
Do you have advice on how this can be resolved?
Many thanks,
Oliver
- Cross-population Weighting (X-Wing)
- Version 1.0.0
- Step2: Polygenic prediction using Bayesian annotation-dependent horseshoe regression (PANTHER)
- (C) Jiacheng Miao and Hanmin Guo
- University of Wisconsin-Madison and Tsinghua University
- https://github.com/qlu-lab/X-Wing
- GNU General Public License v3
Options in effect:
python PANTHER.py
--ref_dir=resources/data/prscs_ref/1kg
--bim_prefix=/scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/ref.chr1
--anno_file=['/scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/LOGODetect/targ_EUR_annot_EUR.txt', '/scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/LOGODetect/targ_EUR_annot_AFR.txt']
--sumstats=['/scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/GWAS_sumstats_1_temp.txt', '/scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/GWAS_sumstats_2_temp.txt']
--phi=None
--n_gwas=[295807, 73258]
--pop=['EUR', 'AFR']
--target_pop=EUR
--n_iter=2000
--n_burnin=1000
--thin=5
--out_dir=/scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/PANTHER/post_targ_EUR
--out_name=output
--chrom=['1']
--pst_pop=AFR
--seed=1 \
process chromosome 1
--- munge reference file: resources/data/prscs_ref/1kg/snpinfo_mult_1kg_hm3
--- 109168 SNPs on chromosome 1 read from resources/data/prscs_ref/1kg/snpinfo_mult_1kg_hm3
--- munge bim file: /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/ref.chr1.bim
--- 99905 SNPs on chromosome 1 read from /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/ref.chr1.bim
--- munge EUR annotation file: /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/LOGODetect/targ_EUR_annot_EUR.txt
--- 89842 SNPs on chromosome 1 read from /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/LOGODetect/targ_EUR_annot_EUR.txt
--- munge AFR annotation file: /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/LOGODetect/targ_EUR_annot_AFR.txt
--- 92593 SNPs on chromosome 1 read from /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/LOGODetect/targ_EUR_annot_AFR.txt
--- munge EUR sumstats file: /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/GWAS_sumstats_1_temp.txt
--- 1082925 SNPs read from /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/GWAS_sumstats_1_temp.txt
--- 84959 overlapping SNPs in the EUR reference panel, EUR annotation matrix, EUR sumstats, and target sample
--- munge AFR sumstats file: /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/GWAS_sumstats_2_temp.txt
--- 1128931 SNPs read from /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/GWAS_sumstats_2_temp.txt
--- 87375 overlapping SNPs in the AFR reference panel, AFR annotation matrix, AFR sumstats, and target sample
--- munge EUR LD matrix on chromosome 1
--- munge AFR LD matrix on chromosome 1
--- align LD matrix on chromosome 1 across populations
--- 93315 SNPs remained across populations
Run MCMC to obtain SNP posterior effects for AFR population
--- Begin MCMC
... iter-100 ...
... iter-200 ...
... iter-300 ...
... iter-400 ...
... iter-500 ...
... iter-600 ...
... iter-700 ...
... iter-800 ...
... iter-900 ...
... iter-1000 ...
... iter-1100 ...
Traceback (most recent call last):
File "resources/software/xwing/PANTHER.py", line 237, in
main()
File "resources/software/xwing/PANTHER.py", line 214, in main
param_dict['out_dir'], param_dict['out_name'], param_dict['seed'])
File "/cephfs/volumes/hpc_data_prj/oliverpainfel/2fd316b8-548d-450d-a56b-a5d85eb3f04c/Software/MyGit/GenoPred/pipeline/resources/software/xwing/gibbs_sampler.py", line 290, in gibbs_fb_other
phi = 1.0/random.gamma((p_all+1.0)/2.0, 1.0/(1.0/v + zz))
File "mtrand.pyx", line 1998, in mtrand.RandomState.gamma
ValueError: scale < 0
/cephfs/volumes/hpc_data_prj/oliverpainfel/2fd316b8-548d-450d-a56b-a5d85eb3f04c/Software/MyGit/GenoPred/pipeline/resources/software/xwing/munge_data.py:241: FutureWarning: read_table is deprecated, use read_csv instead.
df = pd.read_table(anno_file, delimiter='\s+')
/cephfs/volumes/hpc_data_prj/oliverpainfel/2fd316b8-548d-450d-a56b-a5d85eb3f04c/Software/MyGit/GenoPred/pipeline/resources/software/xwing/gibbs_sampler.py:261: RuntimeWarning: overflow encountered in multiply
diag_tmp = np.array([max(1, x) for x in (1.0/(psi_pp[idx_blk]phih_prod_pp[idx_blk]).T[0])])
/cephfs/volumes/hpc_data_prj/oliverpainfel/2fd316b8-548d-450d-a56b-a5d85eb3f04c/Software/MyGit/GenoPred/pipeline/resources/software/xwing/gibbs_sampler.py:274: RuntimeWarning: divide by zero encountered in true_divide
xx[idx_dict[pp]] += n[pp]beta[pp]*2/(2 phi * sigma[pp] * h_prod[pp])
/cephfs/volumes/hpc_data_prj/oliverpainfel/2fd316b8-548d-450d-a56b-a5d85eb3f04c/Software/MyGit/GenoPred/pipeline/resources/software/xwing/gibbs_sampler.py:278: RuntimeWarning: divide by zero encountered in true_divide
psi[jj] = 1.0/random.gamma(0.5n_grp[jj] + 0.5, 1.0/(1.0/c[jj] + xx[jj])) # Add *h_prod[jj]
/cephfs/volumes/hpc_data_prj/oliverpainfel/2fd316b8-548d-450d-a56b-a5d85eb3f04c/Software/MyGit/GenoPred/pipeline/resources/software/xwing/gibbs_sampler.py:288: RuntimeWarning: invalid value encountered in true_divide
zz += n[pp]*sum(beta[pp]**2/(psi[idx_dict[pp]]*h_prod[pp]))/(2.0 * sigma[pp])
Hello,
I am getting an error (log below) when running PANTHER. This error seems related to the AFR GWAS for neutrophil count from the million veterans program (GCST90475528 - download link of GWAS catalogue). The error does not occur for other chromosomes, or when using other GWAS.
Do you have advice on how this can be resolved?
Many thanks,
Oliver
Options in effect:
python PANTHER.py
--ref_dir=resources/data/prscs_ref/1kg
--bim_prefix=/scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/ref.chr1
--anno_file=['/scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/LOGODetect/targ_EUR_annot_EUR.txt', '/scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/LOGODetect/targ_EUR_annot_AFR.txt']
--sumstats=['/scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/GWAS_sumstats_1_temp.txt', '/scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/GWAS_sumstats_2_temp.txt']
--phi=None
--n_gwas=[295807, 73258]
--pop=['EUR', 'AFR']
--target_pop=EUR
--n_iter=2000
--n_burnin=1000
--thin=5
--out_dir=/scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/PANTHER/post_targ_EUR
--out_name=output
--chrom=['1']
--pst_pop=AFR
--seed=1 \
process chromosome 1
--- munge reference file: resources/data/prscs_ref/1kg/snpinfo_mult_1kg_hm3
--- 109168 SNPs on chromosome 1 read from resources/data/prscs_ref/1kg/snpinfo_mult_1kg_hm3
--- munge bim file: /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/ref.chr1.bim
--- 99905 SNPs on chromosome 1 read from /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/ref.chr1.bim
--- munge EUR annotation file: /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/LOGODetect/targ_EUR_annot_EUR.txt
--- 89842 SNPs on chromosome 1 read from /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/LOGODetect/targ_EUR_annot_EUR.txt
--- munge AFR annotation file: /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/LOGODetect/targ_EUR_annot_AFR.txt
--- 92593 SNPs on chromosome 1 read from /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/LOGODetect/targ_EUR_annot_AFR.txt
--- munge EUR sumstats file: /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/GWAS_sumstats_1_temp.txt
--- 1082925 SNPs read from /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/GWAS_sumstats_1_temp.txt
--- 84959 overlapping SNPs in the EUR reference panel, EUR annotation matrix, EUR sumstats, and target sample
--- munge AFR sumstats file: /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/GWAS_sumstats_2_temp.txt
--- 1128931 SNPs read from /scratch/prj/oliverpainfel/tmp/RtmpGyEm0J/GWAS_sumstats_2_temp.txt
--- 87375 overlapping SNPs in the AFR reference panel, AFR annotation matrix, AFR sumstats, and target sample
--- munge EUR LD matrix on chromosome 1
--- munge AFR LD matrix on chromosome 1
--- align LD matrix on chromosome 1 across populations
--- 93315 SNPs remained across populations
Run MCMC to obtain SNP posterior effects for AFR population
--- Begin MCMC
... iter-100 ...
... iter-200 ...
... iter-300 ...
... iter-400 ...
... iter-500 ...
... iter-600 ...
... iter-700 ...
... iter-800 ...
... iter-900 ...
... iter-1000 ...
... iter-1100 ...
Traceback (most recent call last):
File "resources/software/xwing/PANTHER.py", line 237, in
main()
File "resources/software/xwing/PANTHER.py", line 214, in main
param_dict['out_dir'], param_dict['out_name'], param_dict['seed'])
File "/cephfs/volumes/hpc_data_prj/oliverpainfel/2fd316b8-548d-450d-a56b-a5d85eb3f04c/Software/MyGit/GenoPred/pipeline/resources/software/xwing/gibbs_sampler.py", line 290, in gibbs_fb_other
phi = 1.0/random.gamma((p_all+1.0)/2.0, 1.0/(1.0/v + zz))
File "mtrand.pyx", line 1998, in mtrand.RandomState.gamma
ValueError: scale < 0
/cephfs/volumes/hpc_data_prj/oliverpainfel/2fd316b8-548d-450d-a56b-a5d85eb3f04c/Software/MyGit/GenoPred/pipeline/resources/software/xwing/munge_data.py:241: FutureWarning: read_table is deprecated, use read_csv instead.
df = pd.read_table(anno_file, delimiter='\s+')
/cephfs/volumes/hpc_data_prj/oliverpainfel/2fd316b8-548d-450d-a56b-a5d85eb3f04c/Software/MyGit/GenoPred/pipeline/resources/software/xwing/gibbs_sampler.py:261: RuntimeWarning: overflow encountered in multiply
diag_tmp = np.array([max(1, x) for x in (1.0/(psi_pp[idx_blk]phih_prod_pp[idx_blk]).T[0])])
/cephfs/volumes/hpc_data_prj/oliverpainfel/2fd316b8-548d-450d-a56b-a5d85eb3f04c/Software/MyGit/GenoPred/pipeline/resources/software/xwing/gibbs_sampler.py:274: RuntimeWarning: divide by zero encountered in true_divide
xx[idx_dict[pp]] += n[pp]beta[pp]*2/(2 phi * sigma[pp] * h_prod[pp])
/cephfs/volumes/hpc_data_prj/oliverpainfel/2fd316b8-548d-450d-a56b-a5d85eb3f04c/Software/MyGit/GenoPred/pipeline/resources/software/xwing/gibbs_sampler.py:278: RuntimeWarning: divide by zero encountered in true_divide
psi[jj] = 1.0/random.gamma(0.5n_grp[jj] + 0.5, 1.0/(1.0/c[jj] + xx[jj])) # Add *h_prod[jj]
/cephfs/volumes/hpc_data_prj/oliverpainfel/2fd316b8-548d-450d-a56b-a5d85eb3f04c/Software/MyGit/GenoPred/pipeline/resources/software/xwing/gibbs_sampler.py:288: RuntimeWarning: invalid value encountered in true_divide
zz += n[pp]*sum(beta[pp]**2/(psi[idx_dict[pp]]*h_prod[pp]))/(2.0 * sigma[pp])