-
Notifications
You must be signed in to change notification settings - Fork 11
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
Comments
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: ***@***.***>
|
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] @----------------------------------------------------------@
| 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?
The text was updated successfully, but these errors were encountered: