Open guohuangda opened 1 year ago
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!
@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.
Perhaps, u can install pandas first, then numpy. Numpy version will match to pandas automatically. Remember using Py 2.7 environment~Sent from my phone-------- Original message --------From: AEAEAESSC @.>Date: Thu, Dec 7, 2023, 16:12To: huwenboshi/hess @.>Cc: guohuangda @.>, Mention @.>Subject: Re: [huwenboshi/hess] Error in HESS step 1 (Issue #29) @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.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
@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."
I met this problem too. It was that your column A1 and A2 has some characters like D or I, meaning it was not a SNP. Remove them and it works.Sent from my phone-------- Original message --------From: AEAEAESSC @.>Date: Sun, Dec 10, 2023, 18:46To: huwenboshi/hess @.>Cc: guohuangda @.>, Mention @.>Subject: Re: [huwenboshi/hess] Error in HESS step 1 (Issue #29) @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."
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
我也遇到了这个问题。这是因为您的列 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.
I was in trouble in step 1, seeing below:
[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?