Open wanghf0501 opened 2 years ago
I met the same problem, I changed the line:
dat.loc[~jj, [i for i in dat.columns if i != 'SNP']] = float('nan')
to the following in the mtag_munge.py script and run successfully:
dat.loc[~jj.astype('bool'), [i for i in dat.columns if i != 'SNP']] = float('nan')
I get error message "KeyError: u"None of [Int64Index([-2, -2, -2, -2, -2, -2, -2, -2, -2, -1,\n ...\n -1, -2, -2, -2, -2, -2, -2, -2, -2, -2],\n dtype='int64', length=1217311)] are in the [index]"", when I run mtag_munge.py on the example data ( python ldsc/mtag_munge.py --sumstats example/GWAS_EA_excl23andMe.txt --merge-alleles data/ldsc/w_hm3.snplist --n-value 766345 --keep-pval --p PVAL --out example/EA3_Lee2018). Does anyone know how to fix it?