huwenboshi/hess

Step 1 Error

bperry089 opened this issue · 3 comments

Hi,

I'm receiving an error when looping through chromosomes and I wondered if you could help me figure it out?

[INFO] Loaded 133 partitions on chromosome 1
[INFO] Average window size is 1873901
[INFO] 39728178 SNPs read from reference panel
[INFO] Loaded 589535 SNPs with rs IDs and single-letter alleles on chromosome 1 from the GWAS summary data file
[INFO] 501348 SNPs left after filtering
[INFO] Loaded 183464 SNPs with rs IDs and single-letter alleles on chromosome 1 from the GWAS summary data file
Traceback (most recent call last):
File "hess.py", line 217, in
main()
File "hess.py", line 45, in main
argmap['out'])
File "/Users/benjaminperry/HESS/src/estimation.py", line 392, in local_rhog_step1
sumstats2.filter_sumstats(refpanel.get_map())
File "/Users/benjaminperry/HESS/src/sumstats.py", line 168, in filter_sumstats
elif a1a0 in reverse[a1a2]: flip.append(i)
KeyError: 'ag'

The same error is appearing on each chromosome as it loops through.

would really appreciate the advice!

Thanks

Hi bperry089,

It seems some of the alleles in your summary stats file are in lower cases.

Please change those to upper cases, and see if the issue persists.

Sincerely,

Huwenbo Shi

Hi

Thanks so much for the quick response. You are correct, one of the files had alleles in lower-case. I amended that and the script seems to progress, but there is a new error. I wonder if you could give your advice?

[INFO] 39728178 SNPs read from reference panel
[INFO] Loaded 638081 SNPs with rs IDs and single-letter alleles on chromosome 2 from the GWAS summary data file
[INFO] 537262 SNPs left after filtering
[INFO] Loaded 211326 SNPs with rs IDs and single-letter alleles on chromosome 2 from the GWAS summary data file
[INFO] 177488 SNPs left after filtering
[INFO] Loading fam file 1kg_phase1_all.fam
[INFO] Loading bim file 1kg_phase1_all.bim
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pysnptools/pstreader/_subset.py:58: DtypeWarning: Columns (0) have mixed types. Specify dtype option on import or set low_memory=False.
self._run_once()
[INFO] bed file is open 1kg_phase1_all.bed
Killed: 9

Thanks so much