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

Index out of range #1

Open
msarguru opened this issue Aug 14, 2024 · 1 comment
Open

Index out of range #1

msarguru opened this issue Aug 14, 2024 · 1 comment

Comments

@msarguru
Copy link

Hi, thank you for the iLDSC. Trying it on a sumstat.gz that works for LDSC, returns the index out of range error. and I am using the following syntax.
Any suggestions, would be greatly appreciated.
./ldsc.py
--h2 ../sumstats/PSS.EUR.pdt10.nomerge.sumstats.gz
--ref-ld-chr ./EUR_1000G/Full_cisLD/
--out WMH_EUR_ildsc
--w-ld-chr ../ldsc/eur_w_ld_chr/
--print-coefficients

Beginning analysis at Wed Aug 14 20:19:44 2024
Reading summary statistics from ../sumstats/PSS.EUR.pdt10.nomerge.sumstats.gz ...
Read summary statistics for 5355832 SNPs.
Reading reference panel LD Score from ./EUR_1000G/Full_cisLD/[1-22] ... (ldscore_fromlist)
Traceback (most recent call last):
File "ildsc.py", line 651, in
sumstats.estimate_h2(args, log)
File "/annotation/ldsc-F/ildsc/ldscore/sumstats.py", line 329, in estimate_h2
args, log, args.h2)
File "/annotation/ldsc-F/ildsc/ldscore/sumstats.py", line 245, in _read_ld_sumstats
ref_ld = _read_ref_ld(args, log)
File "/annotation/ldsc-F/ildsc/ldscore/sumstats.py", line 82, in _read_ref_ld
'reference panel LD Score', ps.ldscore_fromlist)
File "/annotation/ldsc-F/ildsc/ldscore/sumstats.py", line 154, in _read_chr_split_files
out = parsefunc(_splitp(chr_arg), _N_CHR, **kwargs)
File "/annotation/ldsc-F/ildsc/ldscore/parse.py", line 103, in ldscore_fromlist
y = ldscore(fh, num)
File "/annotation/ldsc-F/ildsc/ldscore/parse.py", line 147, in ldscore
first_fh = sub_chr(fh, chrs[0]) + suffix
IndexError: list index out of range

Analysis finished at Wed Aug 14 20:19:53 2024
Total time elapsed: 9.15s
Traceback (most recent call last):
File "ildsc.py", line 651, in
sumstats.estimate_h2(args, log)
File "/annotation/ldsc-F/ildsc/ldscore/sumstats.py", line 329, in estimate_h2
args, log, args.h2)
File "/annotation/ldsc-F/ildsc/ldscore/sumstats.py", line 245, in _read_ld_sumstats
ref_ld = _read_ref_ld(args, log)
File "/annotation/ldsc-F/ildsc/ldscore/sumstats.py", line 82, in _read_ref_ld
'reference panel LD Score', ps.ldscore_fromlist)
File "/annotation/ldsc-F/ildsc/ldscore/sumstats.py", line 154, in _read_chr_split_files
out = parsefunc(_splitp(chr_arg), _N_CHR, **kwargs)
File "/annotation/ldsc-F/ildsc/ldscore/parse.py", line 103, in ldscore_fromlist
y = ldscore(fh, num)
File "/annotation/ldsc-F/ildsc/ldscore/parse.py", line 147, in ldscore
first_fh = sub_chr(fh, chrs[0]) + suffix
IndexError: list index out of range

@msarguru
Copy link
Author

Update. Got this sorted, turned out issue with the filenaming.. also few suggestions on the readme for git.. one has to use
git sparse-checkout set --no-cone *
to get all the required ldscore files.

Would love an addition on the interpretation of the output.. what each column refers to, etc. Thanks again

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

1 participant