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
187 stars 89 forks source link

Terminate called after throwing an instance of 'std::runtime_error' #355

Open ahasuni opened 7 months ago

ahasuni commented 7 months ago

Hi there,

I am getting the same issue that others have reported previously on github. I am running PRSice on ukbb imputed data using first --no-regress, and after the bgen files are loaded in and clumping begins the program crashes on the server.

    "terminate called after throwing an instance of 'std::runtime_error'
    terminate called recursively
    Error:  Execution halted"

I am submitting this job with a runtime of 8 days, with 10 cores and 30GB of RAM assigned to each core (total of 300GB of RAM). At first I assumed this was was a memory issue, but now I'm beginning to think it might be something else, but unfortunately the log isn't telling me much. The final number of SNPs included after reading bgen files is 7047232, making these operations computationally expensive, however I'm not entirely sure what the solution would be here? Any suggestions would be greatly appreciated. Perhaps I need to reduce the number of final SNPs?

Full log:

PRSice 2.3.5 (2021-09-20) https://github.com/choishingwan/PRSice (C) 2016-2020 Shing Wan (Sam) Choi and Paul F. O'Reilly GNU General Public License v3 If you use PRSice in any published work, please cite: Choi SW, O'Reilly PF. PRSice-2: Polygenic Risk Score Software for Biobank-Scale Data. GigaScience 8, no. 7 (July 1, 2019) 2024-04-18 06:39:42 ./PRSice \ --a1 effect_allele \ --a2 noneffect_allele \ --bar-levels 0.001,0.05,0.1,0.2,0.3,0.4,0.5,1 \ --base trait.website.txt \ --beta \ --binary-target T \ --bp bp_hg19 \ --chr chr \ --clump-kb 250kb \ --clump-p 1.000000 \ --clump-r2 0.800000 \ --extract clumping_trait_ratio_euro.valid \ --ignore-fid \ --interval 5e-05 \ --keep PRS_Training_IDS.txt \ --lower 5e-08 \ --no-regress \ --num-auto 22 \ --out clumping_trait_ratio_euro \ --print-snp \ --pvalue p_dgc \ --seed 1539639884 \ --snp markername \ --stat beta \ --target ukb22828_c#_b0_v3,ukb22828_c11_b0_v3_s487164.sample \ --thread 10 \ --type bgen \ --upper 0.5

Initializing Genotype file: ukb22828_c#_b0_v3 (bgen) With external fam file: ukb22828_c11_b0_v3_s487164.sample

Start processing trait.website ==================================================

SNP extraction/exclusion list contains 5 columns, will assume first column contains the SNP ID

Base file: trait.website.txt Header of file is:

markername chr bp_hg19 effect_allele noneffect_allele effect_allele_freq median_info model beta se_dgc p_dgc het_pvalue n_studies

Reading 100.00% 9455778 variant(s) observed in base file, with: 2408546 variant(s) excluded based on user input 7047232 total variant(s) included from base file

Loading Genotype info from target ==================================================

487409 people (222939 male(s), 264225 female(s)) observed 243422 founder(s) included

86038605 variant(s) not found in previous data 9786 variant(s) with mismatch information 7047232 variant(s) included

Start performing clumping

terminate called after throwing an instance of 'std::runtime_error' terminate called recursively Error: Execution halted

Some additional information that might be help is that I installed the most recent PRSice version (PRSice 2.3.5) using CMake: git clone https://github.com/choishingwan/PRSice.git cd PRSice mkdir build cd build cmake ../ make