zhilizheng / SBayesRC

GNU General Public License v3.0
25 stars 4 forks source link

Terminate called after throwing an instance of 'char const*' #30

Closed 1667857557 closed 4 months ago

1667857557 commented 5 months ago

Hi Zhili,

Thanks for your excellent work, We encountered an issue in generating the Polygenic risk score, this error is only reported in this data, can you give me some advice? thanks in advance!

Best, Yu-Feng

huang@DESKTOP-929HGEG:/mnt/d/SBayesRC$ cd /mnt/d/SBayesRC/
ma_file="/mnt/d/SBayesRC/Afrcian_BC.ma"               # GWAS summary in COJO format (the only input)
ld_folder="/mnt/d/SBayesRC/ukbAFR_Imputed"        # LD reference (download from "Resources")
annot="/mnt/d/SBayesRC/annot_baseline2.2.txt"         # Functional annotation (download from "Resources")
out_prefix="/mnt/d/SBayesRC/Afrcian_BC"   # Output prefix, e.g. "./test"
threads=20                       # Number of CPU cores

export OMP_NUM_THREADS=$threads # Revise the threads
huang@DESKTOP-929HGEG:/mnt/d/SBayesRC$ Rscript -e "SBayesRC::sbayesrc(mafile='${out_prefix}_imp.ma', LDdir='$ld_folder', \
                  outPrefix='${out_prefix}_sbrc', annot='$annot', log2file=TRUE)"
------------------------------------------
SBayesRC v0.2.5
Developed by Zhili Zheng and Jian Zeng
------------------------------------------
The messages are redirected to /mnt/d/SBayesRC/Afrcian_BC_sbrc.log
  No output here...
terminate called after throwing an instance of 'char const*'
Aborted
zhilizheng commented 5 months ago

Hi @1667857557 ,

Thanks for the report.

Could you share me the contents in /mnt/d/SBayesRC/Afrcian_BC_sbrc.log? The error details were in this file.

Thanks.

Regards, Zhili

teresa-sansan commented 4 months ago

I got the same error terminate called after throwing an instance of 'char const*' Aborted

I checked the _sbrc.log file, and it turned out to be that there are specific columns whose dot product are < than 10e-6. This is the error that's in _sbrc.log file: Running SBayesRC with annotation Annotation column 96 has too small XPX: 0, please remove this column from annotation data or perform re-scale.

I have a lot of columns that have this issue. Do you have any suggestion to report all the problematic columns all at once?

Best, Teresa

zhilizheng commented 4 months ago

Hi @teresa-sansan ,

Thanks for the report. I'm working on the next release 0.2.6, that will report all the issues once. I'm currently testing, hope I can manage to release the new version, that clear all the issues in the github.

Regards, Zhili

teresa-sansan commented 4 months ago

Thanks for your quick response Zhili! Excited for the new version!

Best, Teresa

zhilizheng commented 4 months ago

@teresa-sansan ,

Install the test 0.2.6.1 version by

devtools::install_github("zhilizheng/SBayesRC")

(this version will become v0.2.6 after full test). This should solve your problem. I will have further test to make sure no error.

Let me know if you find any problem.

Regards, Zhili

zhilizheng commented 4 months ago

@teresa-sansan,

Fixed in the 0.2.6.

Regards, Zhili