Skip to content
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

lsdc :IndexError: list index out of range #421

Open
chirrie opened this issue Mar 10, 2024 · 6 comments
Open

lsdc :IndexError: list index out of range #421

chirrie opened this issue Mar 10, 2024 · 6 comments

Comments

@chirrie
Copy link

chirrie commented Mar 10, 2024

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

@sophk1
Copy link

sophk1 commented Mar 12, 2024

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

@chirrie
Copy link
Author

chirrie commented Mar 12, 2024 via email

@mvab
Copy link

mvab commented Apr 5, 2024

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
Copy link
Author

chirrie commented Apr 5, 2024 via email

@aksarkar
Copy link

aksarkar commented May 5, 2024

@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.

@chirrie
Copy link
Author

chirrie commented May 5, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants