bulik / ldsc

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

lsdc :IndexError: list index out of range #421

Open chirrie opened 2 months ago

chirrie commented 2 months ago

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 commented 2 months ago

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

chirrie commented 2 months ago

No, not yet. it seems it is a common problem but no solution

On Tue, Mar 12, 2024 at 8:57 PM sophk1 @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/bulik/ldsc/issues/421#issuecomment-1992339022, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZTQ2XLARWKKTHYUVKXHC3YX5FYFAVCNFSM6AAAAABEOXKSOGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJSGMZTSMBSGI . You are receiving this because you authored the thread.Message ID: @.***>

--

Vivien Chebii, Ph.D. Post doctoral Scientist (Bioinformatics)

Sydney Brenner Institute for Molecular Biosciences,

Wits University, South Africa

Email: @. @.>*; @.***

Mobile: +254 722 712 248

Linkedin: www.linkedin.com/in/viviennechebii/

mvab commented 1 month ago

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 commented 1 month ago

The reference works for non_European cohort as well. My assumption was that I will.ise the reference from respective ancestry of the study cohort

On Fri, 5 Apr 2024, 17:52 Marina Vabistsevits, @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/bulik/ldsc/issues/421#issuecomment-2040001057, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZTQ2WS6QOCJ2XNOOYU5UDY323CPAVCNFSM6AAAAABEOXKSOGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBQGAYDCMBVG4 . You are receiving this because you authored the thread.Message ID: @.***>

aksarkar commented 1 week ago

@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 commented 1 week ago

Thanks , let me try

On Sun, 5 May 2024, 23:25 Abhishek Sarkar, @.***> wrote:

@chirrie https://github.com/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.

— Reply to this email directly, view it on GitHub https://github.com/bulik/ldsc/issues/421#issuecomment-2094937418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZTQ2QH3KX7WOEH3DPAVMDZA2IURAVCNFSM6AAAAABEOXKSOGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUHEZTONBRHA . You are receiving this because you were mentioned.Message ID: @.***>