bulik / ldsc

LD Score Regression (LDSC)
GNU General Public License v3.0
601 stars 331 forks source link

NotImplementedError: iLocation based boolean indexing on an integer type is not available #422

Open XochitlDiaz opened 2 months ago

XochitlDiaz commented 2 months ago

Hi, Im trying to run something like

ldsc.py --bfile 1000G.EUR --l2 --ld-wind-cm 1 --yes-really --annot $annot_dir.$chrom.annot.gz --print-snps hm.$chrom.snp --out $annot_dir.$chrom

It's important to mention I'm using LDSC obtained though pip install ldsc for pyhton 3.11.4, so the version that is only available through pip install

How ever, I encountered the following error:

File "/software/python/Python-3.11.4/bin/ldsc.py", line 343, in ldscore
    df = df.iloc[df.SNP.isin(print_snps.SNP),:]

I believe the expression df.SNP.isin(print_snps.SNP) would give back a boolean series, so for python 3 the appropriate way to write it would be with df.locinstead of df.iloc, so

 df = df.loc[df.SNP.isin(print_snps.SNP),:]