precimed/mixer

runtime_error: csr_ld_val_index_[r2_index] == csr_ld_val_index_[r2_index + 1]

JujiaoKang opened this issue · 1 comments

Hi there,

I followed the tutorial from the README page and got error.
The following is log file. Could you help me figure it out? I also try to solve this problem myself.
Thank you very much!

Best,
Jujiao

The following is SCZ52.fit.rep1.log.

20221006 12:58:07.359755 ============= new session =============
20221006 12:58:07.359824 =***********************************************************************
20221006 12:58:07.359837 =* mixer.py: Univariate and Bivariate Causal Mixture for GWAS
20221006 12:58:07.359847 =* Version 1.2.0
20221006 12:58:07.359857 =* (c) 2016-2020 Oleksandr Frei, Alexey A. Shadrin, Dominic Holland
20221006 12:58:07.359866 =* Norwegian Centre for Mental Disorders Research / University of Oslo
20221006 12:58:07.359876 =* Center for Multimodal Imaging and Genetics / UCSD
20221006 12:58:07.359886 =* GNU General Public License v3
20221006 12:58:07.359896 =***********************************************************************
20221006 12:58:07.359905 =Call:
20221006 12:58:07.359915 =./mixer.py fit1
20221006 12:58:07.359925 = --out /home1/mixer/univariate/SCZ52.fit.rep1
20221006 12:58:07.359935 = --lib /home1/mixer/mixer/src/build/lib/libbgmg.so
20221006 12:58:07.359944 = --bim-file /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.@.bim
20221006 12:58:07.359954 = --ld-file /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.@.run4.ld
20221006 12:58:07.359964 = --trait1-file /home1/mixer/mixer/daner_PGC_SCZ52_qc_noMHC.csv.gz
20221006 12:58:07.359973 = --extract /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.prune_maf0p05_rand2M_r2p8.rep1.snps
20221006 12:58:07.360005 Dispose context (id=0)
20221006 12:58:07.361355 Create new context (id=0)
20221006 12:58:07.361394 >init(bim_file=/home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.@.bim, frq_file=, chr_labels=1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22, trait1_file=/home1/mixer/mixer/daner_PGC_SCZ52_qc_noMHC.csv.gz, trait2_file=, exclude=, extract=/home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.prune_maf0p05_rand2M_r2p8.rep1.snps);
20221006 12:58:07.364420 Construct reference from 22 files...
20221006 12:58:13.250436 Found 221626 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.20.bim
20221006 12:58:13.440920 Found 232363 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.19.bim
20221006 12:58:14.430453 Found 269222 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.17.bim
20221006 12:58:14.713468 Found 287001 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.15.bim
20221006 12:58:15.217333 Found 316981 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.16.bim
20221006 12:58:15.468114 Found 285156 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.18.bim
20221006 12:58:15.557167 Found 324698 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.14.bim
20221006 12:58:16.708565 Found 138712 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.21.bim
20221006 12:58:16.837415 Found 141123 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.22.bim
20221006 12:58:16.871494 Found 366200 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.13.bim
20221006 12:58:18.321342 Found 438106 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.9.bim
20221006 12:58:19.023072 Found 480110 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.12.bim
20221006 12:58:19.241991 Found 493922 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.11.bim
20221006 12:58:19.806063 Found 779354 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.1.bim
20221006 12:58:19.855807 Found 510501 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.10.bim
20221006 12:58:20.550229 Found 549971 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.8.bim
20221006 12:58:20.753392 Found 589569 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.7.bim
20221006 12:58:20.833331 Found 633015 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.5.bim
20221006 12:58:20.997366 Found 706350 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.3.bim
20221006 12:58:21.020067 Found 664016 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.6.bim
20221006 12:58:21.074413 Found 729645 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.4.bim
20221006 12:58:21.340316 Found 839590 variants in /home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.2.bim
20221006 12:58:23.411918 Found 9997231 variants in total.
20221006 13:03:09.365770 Found 7224084 variants with well-defined Z and N in /home1/mixer/mixer/daner_PGC_SCZ52_qc_noMHC.csv.gz. Other statistics:
20221006 13:03:09.366850 10101001 lines found (including header)
20221006 13:03:09.366873 87950 lines matched via CHR:BP:A1:A2 code (not SNP rs#)
20221006 13:03:09.366886 8 lines were ignored as they contain duplicated RS# (or chr:bp:a1:a2 code).
20221006 13:03:09.366898 1581518 lines were ignored as RS# (or chr:bp:a1:a2 code) did not match reference file.
20221006 13:03:09.366909 452 variants were ignored as they had A1/A2 alleles that do not match reference.
20221006 13:03:09.366921 1294938 variants were ignored as they are strand-ambiguous.
20221006 13:03:09.366932 3153731 variants had flipped A1/A2 alleles; sign of z-score was flipped.
20221006 13:03:09.491275 constrain analysis to 7224084 tag variants (due to trait1_file='/home1/mixer/mixer/daner_PGC_SCZ52_qc_noMHC.csv.gz')
20221006 13:03:25.548669 constrain analysis to 477675 tag variants (due to extract='/home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.prune_maf0p05_rand2M_r2p8.rep1.snps')
20221006 13:03:25.980833 set_tag_indices(num_snp=9997231, num_tag=477675);
20221006 13:03:26.026896 >set_chrnumvec(9997231);
20221006 13:03:26.054880 <set_chrnumvec(9997231);
20221006 13:03:26.054927 >LdMatrixCsr::init_chunks();
20221006 13:03:26.295795 highest chr label: 22
20221006 13:03:26.359740 <LdMatrixCsr::init_chunks();
20221006 13:03:26.391217 set_zvec(trait=1); num_undef=0
20221006 13:03:26.393121 set_nvec(trait=1); num_undef=0
20221006 13:03:26.394581 <init(bim_file=/home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.@.bim, frq_file=, chr_labels=1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22, trait1_file=/home1/mixer/mixer/daner_PGC_SCZ52_qc_noMHC.csv.gz, trait2_file=, exclude=, extract=/home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.prune_maf0p05_rand2M_r2p8.rep1.snps); elapsed time 319033ms
20221006 13:03:26.405640 set_option(r2min=0);
20221006 13:03:26.405729 set_option(kmax=20000);
20221006 13:03:26.405752 clear_state
20221006 13:03:26.405775 set_option(seed=123);
20221006 13:03:26.405818 set_option(cubature_rel_error=1e-05);
20221006 13:03:26.405847 set_option(cubature_max_evals=1000);
20221006 13:03:26.405926 initialize mafvec
20221006 13:03:26.424220 >load_ld_matrix(filename=/home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.1.run4.ld)
20221006 13:03:26.968016 <load_ld_matrix(filename=/home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.1.run4.ld), format version 1
20221006 13:03:26.968087 set_ld_r2_coo(filename=/home1/mixer/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.1.run4.ld, numel=142187412)...
20221006 13:03:30.243134 >set_ld_r2_coo(chr_label=1, length=142187412);
20221006 13:03:30.730743 LdMatrixCsr::init_diagonal(chr_label=1) added 36123 tag (out of 779354 snps) elements with r2=1.0 to the diagonal of LD r2 matrix
20221006 13:03:43.896126 <set_ld_r2_coo: done; (new_elements: 11113771), elapsed time 13182 ms
20221006 13:03:45.534413 >set_ld_r2_csr(chr_label=1);
20221006 13:03:45.534486 sorting ld r2 elements...
20221006 13:03:47.072870 pss::parallel_stable_sort took 1538ms.
20221006 13:03:47.341376 >validate_ld_r2_csr();
20221006 13:03:47.358324 runtime_error: csr_ld_val_index_[r2_index] == csr_ld_val_index_[r2_index + 1]