biostat0903 / DBSLMM

Deterministic Bayesian Sparse Linear Mixed Model
https://biostat0903.github.io/DBSLMM/
5 stars 3 forks source link

Error in calcBlock function #10

Closed brycerowland closed 4 years ago

brycerowland commented 4 years ago

Good afternoon,

I've been working with DBSLMM on a toy dataset and I am running in to trouble with the estimation step in the C++ code. It seems that the first time the code gets to line 222 in dbslmmfit.cpp (copied below), it throws the following error.

terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create

// output small effect cout << num_s_block << endl; for(int i = 0; i < num_s_block; i++) { EFF eff_s; cout << "point a" << endl eff_s.snp = info_s_block[i]->snp; cout << "point b" << endl; eff_s.a1 = info_s_block[i]->a1; eff_s.maf = info_s_block[i]->maf; eff_s.beta = beta_s(i); eff_s_block[i] = eff_s; }

It seems that the program is expecting a string from info_s_block[i]->snp. However when I run cout << info_s_block[i]->snp << endl; just before the code is executed, the print out is an excess of whitespace. I'm not sure what would be helpful to give you a reproducible example, but I think it's got something to do with the matchRef function reading the data incorrectly for either summary statistics or the LD ref panel.

Thanks for your help getting me unstuck and we really look forward to getting your method to run on our data!

Best, Bryce

biostat0903 commented 4 years ago

Hi, We have fixed the bug. Please download the new version. Thanks for your attention. Best, Sheng

brycerowland commented 4 years ago

Hi Sheng, Thanks for your help! This fixed the issue that I was having. Best, Bryce