-
Notifications
You must be signed in to change notification settings - Fork 349
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 error/ list index out of range #466
Comments
Most interestingly, chr1 and chr2 can run the script, but it failed from the thrid chromosome, |
Hi, so I was running into the same issue, but I was able to resolve it by removing the ${chr} value. I was attempting to submit a job that would run in parallel per each chr, but it looks like the heritability estimate is one command that runs through each chromosome. e.g. in your call: ./ldsc.py Don't include the 3. So run it like so: Not sure if that's what you were doing as well, but that's how I resolved the error on my end. |
I have run the script you provide successfully,thank you very much!!!
…---- Replied Message ----
| From | ***@***.***> |
| Date | 11/26/2024 09:06 |
| To | ***@***.***> |
| Cc | ***@***.***>***@***.***> |
| Subject | Re: [bulik/ldsc] Index error/ list index out of range (Issue #466) |
Hi, so I was running into the same issue, but I was able to resolve it by removing the ${chr} value. I was attempting to submit a job that would run in parallel per each chr, but it looks like the heritability estimate is one command that runs through each chromosome. e.g. in your call:
./ldsc.py
--h2 hearta.sumstats.gz
--ref-ld-chr aCM/Add_all.chr3
--out aCM--print-coefficients
--overlap-annot
--frqfile-chr 1000G_Phase3_frq/1000G.EUR.QC.3
--w-ld-chr 1000G_Phase3_weights_hm3_no_MHC/weights.hm3_noMHC.3
Don't include the 3. So run it like so:
./ldsc.py
--h2 hearta.sumstats.gz
--ref-ld-chr aCM/Add_all.chr
--out aCM--print-coefficients
--overlap-annot
--frqfile-chr 1000G_Phase3_frq/1000G.EUR.QC.
--w-ld-chr 1000G_Phase3_weights_hm3_no_MHC/weights.hm3_noMHC.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I am trying to calculate heritability and getting this error:
Call:
./ldsc.py
--h2 hearta.sumstats.gz
--ref-ld-chr aCM/Add_all.chr3
--out aCM--print-coefficients
--overlap-annot
--frqfile-chr 1000G_Phase3_frq/1000G.EUR.QC.3
--w-ld-chr 1000G_Phase3_weights_hm3_no_MHC/weights.hm3_noMHC.3
Beginning analysis at Mon Nov 18 19:47:34 2024
Reading summary statistics from hearta.sumstats.gz ...
Read summary statistics for 1151077 SNPs.
Reading reference panel LD Score from aCM/Add_all.chr3[1-22] ... (ldscore_fromlist)
Traceback (most recent call last):
File "./ldsc.py", line 644, in
sumstats.estimate_h2(args, log)
File "/home/data/t070533/hrm/New_SSC/ldsc/ldscore/sumstats.py", line 326, in estimate_h2
args, log, args.h2)
File "/home/data/t070533/hrm/New_SSC/ldsc/ldscore/sumstats.py", line 243, in _read_ld_sumstats
ref_ld = _read_ref_ld(args, log)
File "/home/data/t070533/hrm/New_SSC/ldsc/ldscore/sumstats.py", line 82, in _read_ref_ld
'reference panel LD Score', ps.ldscore_fromlist)
File "/home/data/t070533/hrm/New_SSC/ldsc/ldscore/sumstats.py", line 152, in _read_chr_split_files
out = parsefunc(_splitp(chr_arg), _N_CHR, **kwargs)
File "/home/data/t070533/hrm/New_SSC/ldsc/ldscore/parse.py", line 103, in ldscore_fromlist
y = ldscore(fh, num)
File "/home/data/t070533/hrm/New_SSC/ldsc/ldscore/parse.py", line 147, in ldscore
first_fh = sub_chr(fh, chrs[0]) + suffix
IndexError: list index out of range
Thanks for all!!
The text was updated successfully, but these errors were encountered: