Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in HESS step 1 #29

Open
guohuangda opened this issue Dec 2, 2023 · 6 comments
Open

Error in HESS step 1 #29

guohuangda opened this issue Dec 2, 2023 · 6 comments

Comments

@guohuangda
Copy link

guohuangda commented Dec 2, 2023

I was in trouble in step 1, seeing below:

[INFO] @----------------------------------------------------------@
| HESS | v0.5 | 9/October/2017 |
|----------------------------------------------------------|
| (C) 2017 Huwenbo Shi, GNU General Public License, v3 |
|----------------------------------------------------------|
| For documentation, citation & bug-report instructions: |
| http://bogdan.bioinformatics.ucla.edu/software/hess/ |
@----------------------------------------------------------@
[INFO] Command started at: Sat, 02 Dec 2023 20:38:54
[INFO] Command issued:
/gpfs/share/home/0016173048/software/hess/hess.py
--bfile /gpfs/share/home/0016173048/software/hess/1kg_eur_1pct/1kg_eur_1pct_chr1
--local-rhog /gpfs/share/home/0016173048/ghd/openGWAS/GWAS_result/GWAS_summary_clean/mi_hess.txt /gpfs/share/home/0016173048/ghd/openGWAS/GWAS_result/GWAS_summary_clean/neutrophil_hess.txt
--partition /gpfs/share/home/0016173048/software/hess/genome_partition_file/EUR/fourier_ls-all.bed
--out /gpfs/share/home/0016173048/ghd/openGWAS/hess_out/step1/step1
--chrom 1
[INFO] Loaded 133 partitions on chromosome 1
[INFO] Average window size is 1873901
[INFO] 670954 SNPs read from reference panel
[INFO] Loaded 614326 SNPs with rs IDs and single-letter alleles on chromosome 1 from the GWAS summary data file
[INFO] 504260 SNPs left after filtering
[INFO] Loaded 2350152 SNPs with rs IDs and single-letter alleles on chromosome 1 from the GWAS summary data file
Traceback (most recent call last):
File "/gpfs/share/home/0016173048/software/hess/hess.py", line 217, in
main()
File "/gpfs/share/home/0016173048/software/hess/hess.py", line 45, in main
argmap['out'])
File "/gpfs/share/home/0016173048/software/hess/src/estimation.py", line 399, in local_rhog_step1
sumstats2.filter_sumstats(refpanel.get_map())
File "/gpfs/share/home/0016173048/software/hess/src/sumstats.py", line 168, in filter_sumstats
elif a1a0 in reverse[a1a2]: flip.append(i)
KeyError: 'DI'
[INFO] @----------------------------------------------------------@
| HESS | v0.5 | 9/October/2017 |
|----------------------------------------------------------|
| (C) 2017 Huwenbo Shi, GNU General Public License, v3 |
|----------------------------------------------------------|
| For documentation, citation & bug-report instructions: |
| http://bogdan.bioinformatics.ucla.edu/software/hess/ |
@----------------------------------------------------------@
[INFO] Command started at: Sat, 02 Dec 2023 20:40:21
[INFO] Command issued:
/gpfs/share/home/0016173048/software/hess/hess.py
--bfile /gpfs/share/home/0016173048/software/hess/1kg_eur_1pct/1kg_eur_1pct_chr2
--local-rhog /gpfs/share/home/0016173048/ghd/openGWAS/GWAS_result/GWAS_summary_clean/mi_hess.txt /gpfs/share/home/0016173048/ghd/openGWAS/GWAS_result/GWAS_summary_clean/neutrophil_hess.txt
--partition /gpfs/share/home/0016173048/software/hess/genome_partition_file/EUR/fourier_ls-all.bed
--out /gpfs/share/home/0016173048/ghd/openGWAS/hess_out/step1/step1
--chrom 2
[INFO] Loaded 144 partitions on chromosome 2
[INFO] Average window size is 1688741
[INFO] 724748 SNPs read from reference panel
[INFO] Loaded 643392 SNPs with rs IDs and single-letter alleles on chromosome 2 from the GWAS summary data file
[INFO] 528339 SNPs left after filtering
[INFO] Loaded 2571117 SNPs with rs IDs and single-letter alleles on chromosome 2 from the GWAS summary data file
[INFO] 575703 SNPs left after filtering
[INFO] Loading fam file /gpfs/share/home/0016173048/software/hess/1kg_eur_1pct/1kg_eur_1pct_chr2.fam
[INFO] Loading bim file /gpfs/share/home/0016173048/software/hess/1kg_eur_1pct/1kg_eur_1pct_chr2.bim
[INFO] bed file is open /gpfs/share/home/0016173048/software/hess/1kg_eur_1pct/1kg_eur_1pct_chr2.bed
Traceback (most recent call last):
File "/gpfs/share/home/0016173048/software/hess/hess.py", line 217, in
main()
File "/gpfs/share/home/0016173048/software/hess/hess.py", line 45, in main
argmap['out'])
File "/gpfs/share/home/0016173048/software/hess/src/estimation.py", line 407, in local_rhog_step1
snpmap_locus, snpdata_locus = refpanel.get_locus(start, stop, min_maf)
File "/gpfs/share/home/0016173048/software/hess/src/refpanel.py", line 86, in get_locus
snpdata_locus = self.snpdata[:, start_idx:stop_idx+1].read().val.T
File "/gpfs/share/home/0016173048/miniconda3/envs/py2.7/lib/python2.7/site-packages/pysnptools/snpreader/snpreader.py", line 455, in read
val = self._read(None, None, order, dtype, force_python_only, view_ok)
File "/gpfs/share/home/0016173048/miniconda3/envs/py2.7/lib/python2.7/site-packages/pysnptools/pstreader/_subset.py", line 71, in _read
val = self._internal._read(composed_row_index_or_none, composed_col_index_or_none, order, dtype, force_python_only, view_ok)
File "/gpfs/share/home/0016173048/miniconda3/envs/py2.7/lib/python2.7/site-packages/pysnptools/snpreader/bed.py", line 238, in _read
from pysnptools.snpreader import wrap_plink_parser
File "init.pxd", line 861, in init pysnptools.snpreader.wrap_plink_parser (pysnptools/snpreader/wrap_plink_parser.cpp:8227)
ValueError: numpy.ufunc has the wrong size, try recompiling

and here is my code:

#step 1
for chrom in $(seq 22)
do
python /gpfs/share/home/0016173048/software/hess/hess.py
--local-rhog /gpfs/share/home/0016173048/ghd/openGWAS/GWAS_result/GWAS_summary_clean/mi_hess.txt /gpfs/share/home/0016173048/ghd/openGWAS/GWAS_result/GWAS_summary_clean/neutrophil_hess.txt
--chrom $chrom
--bfile /gpfs/share/home/0016173048/software/hess/1kg_eur_1pct/1kg_eur_1pct_chr$chrom
--partition /gpfs/share/home/0016173048/software/hess/genome_partition_file/EUR/fourier_ls-all.bed
--out /gpfs/share/home/0016173048/ghd/openGWAS/hess_out/step1/step1
done

I do not know what was going wrong? Can you do me a favor?

@guohuangda
Copy link
Author

I know! There were some "I" or "D" in column A1 AND A2, thus make errors. In addition, version conflicts exist in pandas and numpy. After solving these, it works!

@AEAEAESSC
Copy link

@guohuangda hello,May I know which version of numpy and pandas you are referring to? Could you please provide specific instructions on how to do it? Thank you very much.

@guohuangda
Copy link
Author

guohuangda commented Dec 7, 2023 via email

@AEAEAESSC
Copy link

@guohuangdaHello, thank you for your advice. I successfully started running the data, but in the 22 iteration, the first 21 iterations produced results normally, in the 22nd iteration, I encountered a 'KeyError: ID.' I'm not sure where the error is occurring. Can you help me with this? Thank you very much."

@guohuangda
Copy link
Author

guohuangda commented Dec 10, 2023 via email

@AEAEAESSC
Copy link

我也遇到了这个问题。这是因为您的列 A1 和 A2 有一些字符,例如 D 或 I,这意味着它不是 SNP。删除它们,它就可以工作了。从我的手机发送--------原始消息--------发件人:AEAEAESSC @.>日期:10 年 2023 月 18 日星期日 46:1收件人:huwenboshi/hess @.>抄送:guohuangda @.>,提及 @.>主题:回复:[huwenboshi/hess] HESS 步骤 29 中的错误(问题 #22) @guohuangdaHello,谢谢你的建议。我成功地开始运行数据,但在 21 次迭代中,前 22 次迭代正常产生结果,在第 <> 次迭代中,我遇到了“KeyError: ID”,我不确定错误发生在哪里。你能帮我解决这个问题吗?非常感谢。 - 直接回复此电子邮件,在 GitHub 上查看或取消订阅。您收到此邮件是因为有人提到您。邮件 ID:@.***>

Thank you so much. Following your advice, I deleted the relevant lines associated with the issue, and the problem has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants