choishingwan / PRSice

A software package for calculating, applying, evaluating and plotting the results of polygenic risk scores
http://prsice.info
GNU General Public License v3.0
180 stars 85 forks source link

[BUG]std::runtime_error when clumping #341

Open jraikist opened 1 year ago

jraikist commented 1 year ago

Hi! Thank you for all the hard work!

I'm getting this weird error message after PRSice starts clumping: `PRSice --a1 ALT --a2 REF --or OR --bp POS --chr "#CHROM" --snp ID --pvalue P --stat OR --binary-target T --memory 10000 --thread 3 --type bgen --pheno my_phenotype.psam --pheno-col my_phenotype -b plink2.my_phenotype.glm.logistic.hybrid --target /path/to/bgenCHROM#

PRSice 2.3.3 (2020-08-05) PRSice --a1 ALT --a2 REF --bar-levels 0.001,0.05,0.1,0.2,0.3,0.4,0.5,1 --binary-target T --bp POS --chr #CHROM --clump-kb 250kb --clump-p 1.000000 --clump-r2 0.100000 --interval 5e-05 --lower 5e-08 --memory 10000 --num-auto 22 --or --out PRSice --pheno my_phenotype.psam --pheno-col my_phenotype --pvalue P --seed 1829857522 --snp ID --stat OR --target /path/to/bgenCHROM # --thread 3 --type bgen --upper 0.5 Initializing Genotype file: /path/to/bgenCHROM# (bgen) Start processing plink2.my_phenotype.glm.logistic

Base file: plink2.my_phenotype.glm.logistic.hybrid Header of file is:

CHROM POS ID REF ALT A1 FIRTH? TEST OBS_CT OR LOG(OR)_SE Z_STAT P ERRCODE

Reading 100% 21321942 variant(s) observed in base file, with: 812866 variant(s) located on haploid chromosome 1242079 NA stat/p-value observed 2729205 ambiguous variant(s) excluded 16526892 total variant(s) included from base file Loading Genotype info from target

273681 people (0 male(s), 0 female(s)) observed 273681 founder(s) included 1617K SNPs processed in /path/to/bgen_CHROM_1.bgen 1756K SNPs processed in /path/to/bgen_CHROM_2.bgen 1465K SNPs processed in /path/to/bgen_CHROM_3.bgen 1463K SNPs processed in /path/to/bgen_CHROM_4.bgen 1326K SNPs processed in /path/to/bgen_CHROM_5.bgen 1318K SNPs processed in /path/to/bgen_CHROM_6.bgen 1197K SNPs processed in /path/to/bgen_CHROM_7.bgen 1135K SNPs processed in /path/to/bgen_CHROM_8.bgen 896K SNPs processed in /path/to/bgen_CHROM_9.bgen 1024K SNPs processed in /path/to/bgen_CHROM_10.bgen 1004K SNPs processed in /path/to/bgen_CHROM_11.bgen 976K SNPs processed in /path/to/bgen_CHROM_12.bgen 738K SNPs processed in /path/to/bgen_CHROM_13.bgen 671K SNPs processed in /path/to/bgen_CHROM_14.bgen 592K SNPs processed in/path/to/bgen_CHROM_15.bgen 661K SNPs processed in /path/to/bgen_CHROM_16.bgen 572K SNPs processed in /path/to/bgen_CHROM_17.bgen 580K SNPs processed in /path/to/bgen_CHROM_18.bgen 463K SNPs processed in /path/to/bgen_CHROM_19.bgen 466K SNPs processed in /path/to/bgen_CHROM_20.bgen 273K SNPs processed in /path/to/bgen_CHROM_21.bgen 289K SNPs processed in /path/to/bgen_CHROM_22.bgen 3926184 variant(s) not found in previous data 16512892 variant(s) included Phenotype file: my_phenotype.psam Column Name of Sample ID: #FID+IID Note: If phenotype file does not contain a header, the column name will be displayed as the sample ID which is expected. There are a total of 1 phenotype to process. Start performing clumping terminate called after throwing an instance of 'std::runtime_error' what(): Error: Cannot read the bgen file! Aborted`

The my_phenotype.psam looks like this:

FID IID PAT MAT SEX my_phenotype

ID00001 ID00001 0 0 0 1 ID00002 ID00002 0 0 0 1 ID00003 ID00003 0 0 0 2 ID00004 FID00004 0 0 0 1

my_phenotype.psam is ordered according to bgen files' sample order.

Any ideas?

choishingwan commented 1 year ago

Think it was a bug with 2.3.3. Try and see if 2.3.5 solved the problem

On Mon, Sep 11, 2023, 1:43 PM jraikist @.***> wrote:

Assigned #341 https://github.com/choishingwan/PRSice/issues/341 to @choishingwan https://github.com/choishingwan.

— Reply to this email directly, view it on GitHub https://github.com/choishingwan/PRSice/issues/341#event-10337180315, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJTRYRBC33S2GISDDKO24LXZ5EUTANCNFSM6AAAAAA4TV56K4 . You are receiving this because you were assigned.Message ID: @.***>