gaoisbest / FastEPRR

My published program for estimating the population recombination rate.
http://www.picb.ac.cn/evolgen/publications/papers/2016Gao_G3.pdf
4 stars 1 forks source link

FastEPRR_step2 Error #9

Open jiangzy26 opened 5 months ago

jiangzy26 commented 5 months ago

Hi, I got this problem, Could you share your help? Thank you very much.

R version 4.3.2 (2023-10-31) -- "Eye Holes" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit)

R是自由软件,不带任何担保。 在某些条件下你可以将其自由散布。 用'license()'或'licence()'来看散布的详细条件。

R是个合作计划,有许多人为之做出了贡献. 用'contributors()'来看合作者的详细情况 用'citation()'会告诉你如何在出版物中正确地引用R或R程序包。

用'demo()'来看一些示范程序,用'help()'来阅读在线帮助文件,或 用'help.start()'通过HTML浏览器来看帮助文件。 用'q()'退出R.

library(FastEPRR)

FastEPRR_VCF_step2(srcFolderPath="/data2/other_one_project/result/6-recombination_rate/FastEPRR_result/Chr01/step1", jobNumber = 1, currJob = 1, getCI = FALSE,

  • trainingSet1 = "0;0.5;1;5;10;25;50;80;120;170;250", trainingSet2 = "260;300;350;450",DXOutputFolderPath = "/data2/other_one_project/result/6-recombination_rate/FastEPRR_result/Chr01/step2") Total job: 1 Current job: 1 载入需要的程辑包:mboost 载入需要的程辑包:parallel 载入需要的程辑包:stabs Total DXs in this job: 881, current DX: 1 Curr dton: 0 xton: 9 0 0.5 1 5 10 25 50 80 120 170 250 260 300 350 450 Total DXs in this job: 881, current DX: 2 Curr dton: 1 xton: 6 0 0.5 1 5 10 25 50 80 120 170 250 260 300 350 450 Total DXs in this job: 881, current DX: 3 Curr dton: 1 xton: 10 0 0.5 1 5 10 25 50 80 120 170 250 260 300 350 450 Total DXs in this job: 881, current DX: 4 Curr dton: 1 xton: 5 0 0.5 1 5 10 25 50 80 120 170 250 Total DXs in this job: 881, current DX: 5 Curr dton: 0 xton: 11 0 0.5 1 5 10 25 50 80 120 170 250 Total DXs in this job: 881, current DX: 6 Curr dton: 6 xton: 22 0 0.5 1 5 10 25 50 80 120 170 250 Total DXs in this job: 881, current DX: 7 Curr dton: 3 xton: 5 0 0.5 1 5 10 25 50 80 120 170 250 260 300 350 450 Total DXs in this job: 881, current DX: 8 Curr dton: 3 xton: 13 0 0.5 1 5 10 25 50 80 120 170 250 Total DXs in this job: 881, current DX: 9 Curr dton: 1 xton: 2 0 0.5 1 5 10 25 50 80 120 170 250 Error in .local(A, ...) : leading principal minor of order 4 is zero Calls: FastEPRR_VCF_step2 ... -> Cholesky -> Cholesky -> .local -> .Call 此外: There were 50 or more warnings (use warnings() to see the first 50) 停止执行
k-hench commented 4 months ago

Hi @jiangzy26 and @gaoisbest :wave: , I believe I run into the same issue, with FastEPRR failing in step 2 with the error:

Error in .local(A, ...) : leading principal minor of order X is zero

I am running the following command:

library(FastEPRR)
FastEPRR_VCF_step2(srcFolderPath = "results/recombination/fasteprr_1",
                                      jobNumber = 31,
                                      currJob=5,
                                      DXOutputFolderPath = "results/recombination/fasteprr_2" )

which leads to the this output in my log file:

Total job: 31
Current job: 5
Loading required package: mboost
Loading required package: parallel
Loading required package: stabs
Total DXs in this job: 1, current DX: 1
Curr dton: 1 xton: 2
0 0.5 1 2 5 10 20 40 70 110 170 
Error in .local(A, ...) : leading principal minor of order 2 is zero
Calls: FastEPRR_VCF_step2 ... <Anonymous> -> Cholesky -> Cholesky -> .local -> .Call
In addition: Warning messages:
1: In .qr.rank.def.warn(r) :
  matrix is structurally rank deficient; using augmented matrix with additional 12 row(s) of zeros
2: In .local(A, ...) :
  CHOLMOD warning 'not positive definite' at file 'Cholesky/t_cholmod_rowfac_worker.c', line 449
Execution halted

The same R script appears to work alright for most of the other currjob values (all but 1,4,5,6,7,13). For those problematic values, the error message is similar, but X in the order [X] is zero value differs:

grep "Err" logs/fasteprr/step2_*
logs/fasteprr/step2_1.log:Error in .local(A, ...) : leading principal minor of order 4 is zero
logs/fasteprr/step2_13.log:Error in .local(A, ...) : leading principal minor of order 3 is zero
logs/fasteprr/step2_4.log:Error in .local(A, ...) : leading principal minor of order 4 is zero
logs/fasteprr/step2_5.log:Error in .local(A, ...) : leading principal minor of order 2 is zero
logs/fasteprr/step2_6.log:Error in .local(A, ...) : leading principal minor of order 2 is zero
logs/fasteprr/step2_7.log:Error in .local(A, ...) : leading principal minor of order 2 is zero

Do you have any idea what is off here? :eyes:

The R environment I am using is bundled within a the docker container khench/r_recrate:v0.2:

library(FastEPRR)
sessionInfo()
R version 4.4.0 (2024-04-24)
Platform: x86_64-pc-linux-gnu
Running under: Debian GNU/Linux 11 (bullseye)

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3 
LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3;  LAPACK version 3.9.0

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
 [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
 [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
[10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   

time zone: UTC
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] FastEPRR_2.0

loaded via a namespace (and not attached):
[1] compiler_4.4.0
zhou-sumei commented 4 months ago

Sorry for the late reply. Thank you for your interest in FastEPRR! We haven't encounter this error before, we will debug it.

We have noticed some inadaptation when run FastEPRR2.0 with R4.x.x. At present, R3.6.3 is a stable version to run FastEPRR2.0, maybe this will be a solution, sorry for the inconvenience. Please let me know if you have any question.

k-hench commented 3 months ago

Thanks @zhou-sumei for the advice regarding the R version. Unfortunately, downgrading the R version does not seem to help: :grimacing:

All that changes is that I now get a different error message at the same step:

Total job: 31
Current job: 5
Loading required package: mboost
Loading required package: parallel
Loading required package: stabs
Total DXs in this job: 1, current DX: 1
Curr dton: 1 xton: 2
0 0.5 1 2 5 10 20 40 70 110 170
Error in Cholesky(forceSymmetric(XtX)) :
  internal_chm_factor: Cholesky factorization failed
Calls: FastEPRR_VCF_step2 ... FUN -> dpp.blg -> <Anonymous> -> Cholesky -> Cholesky
In addition: Warning message:
In Cholesky(forceSymmetric(XtX)) :
  Cholmod warning 'not positive definite' at file ../Cholesky/t_cholmod_rowfac.c, line 431
Execution halted

This consistently pops up in the same jobs that also had issues before:

grep "Err" logs/fasteprr/step2_*
logs/fasteprr/step2_1.log:Error in Cholesky(forceSymmetric(XtX)) :
logs/fasteprr/step2_13.log:Error in Cholesky(forceSymmetric(XtX)) :
logs/fasteprr/step2_4.log:Error in Cholesky(forceSymmetric(XtX)) :
logs/fasteprr/step2_5.log:Error in Cholesky(forceSymmetric(XtX)) :
logs/fasteprr/step2_6.log:Error in Cholesky(forceSymmetric(XtX)) :
logs/fasteprr/step2_7.log:Error in Cholesky(forceSymmetric(XtX)) :

Again, the R environment I am using is bundled within a docker container: khench/r_recrate:v0.3:

R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 11 (bullseye)

Matrix products: default
BLAS:   /usr/local/lib/R/lib/libRblas.so
LAPACK: /usr/local/lib/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
 [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
 [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
[10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] FastEPRR_2.0

loaded via a namespace (and not attached):
[1] compiler_3.6.3

As a side note:

Curiously, FastEPRR v1 (as installed in khench/r_recrate:v0.0) successfully runs on the same input data :shrug:

R version 4.4.0 (2024-04-24)
Platform: x86_64-pc-linux-gnu
Running under: Debian GNU/Linux 11 (bullseye)

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3 
LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3;  LAPACK version 3.9.0

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
 [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
 [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
[10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   

time zone: UTC
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] FastEPRR_1.0

loaded via a namespace (and not attached):
[1] compiler_4.4.0