bulik/ldsc

lsdc :IndexError: list index out of range

chirrie opened this issue · 6 comments

I am try to generate LD scores using below command

./ldsc.py
--ref-ld-chr LDSCORE.1000G_AFR.tab.gz
--out FG_T2D24
--rg FG.sumstats.gz,T2D_EUR.sumstats.gz
--w-ld-chr LDSCORE.1000G_AFR.tab.gz

I get below error
File "/home/chebii/Awi-gen/FG_raw/boltlmm/ldsc/ldscore/sumstats.py", line 397, in estimate_rg
alleles=True, dropna=True)
File "/home/chebii/Awi-gen/FG_raw/boltlmm/ldsc/ldscore/sumstats.py", line 243, in _read_ld_sumstats
ref_ld = _read_ref_ld(args, log)
File "/home/chebii/Awi-gen/FG_raw/boltlmm/ldsc/ldscore/sumstats.py", line 82, in _read_ref_ld
'reference panel LD Score', ps.ldscore_fromlist)
File "/home/chebii/Awi-gen/FG_raw/boltlmm/ldsc/ldscore/sumstats.py", line 152, in _read_chr_split_files
out = parsefunc(_splitp(chr_arg), _N_CHR, **kwargs)
File "/home/chebii/Awi-gen/FG_raw/boltlmm/ldsc/ldscore/parse.py", line 103, in ldscore_fromlist
y = ldscore(fh, num)
File "/home/chebii/Awi-gen/FG_raw/boltlmm/ldsc/ldscore/parse.py", line 147, in ldscore
first_fh = sub_chr(fh, chrs[0]) + suffix
IndexError: list index out of range

I am getting the same error, using the same flags. Have you been able to find a solution?

mvab commented

most likely you forgot to download the ref files; the provided links in README don't work. Download it from here: https://zenodo.org/records/8182036 and tar -jxvf eur_w_ld_chr.tar.gz

@chirrie You need to use --ref-ld and --w-ld, not --ref-ld-chr and --w-ld-chr

The flags -chr are for input files that are split by chromosome.