YiPeng-Gao / scDaPars

Dynamic Analysis of Alternative Polyadenylation from single-cell RNA-seq (scDaPars)
10 stars 1 forks source link

Error in qr.coef(qr(a, LAPACK = TRUE), b) : error code 95 from Lapack routine 'dtrtrs' #20

Open yiyisun682 opened 2 years ago

yiyisun682 commented 2 years ago

Hi, I came across this problem when I was running the following command lines: scDaPars.res = scDaPars(raw_PDUI_file = paste0(path,"Dapars2_hspc_combined_all_chr.txt"), out_dir = "./scDaPars_result", filter_gene_thre = 0.2, filter_cell_thre = 0.1)

The output messages are as follows: [1] "Reading in raw PDUI matrix ..." [1] "number of genes in raw count matrix 6276" [1] "number of cells in raw count matrix 1250" [1] "Reading finished!" [1] "Start Processing raw PDUI matrix" [1] "Pre-Processing finished" [1] "Start Imputation Steps ..." [1] "Find potential Neighboring Cells ..." [1] "Number of neighbors(clusters) is 5" [1] "Outliers is/are " [1] "Imputation with neighboring cells ..." [1] 100 [1] 200 Error in qr.coef(qr(a, LAPACK = TRUE), b) : error code 84 from Lapack routine 'dtrtrs' Error in qr.coef(qr(a, LAPACK = TRUE), b) : error code 63 from Lapack routine 'dtrtrs' Error in qr.coef(qr(a, LAPACK = TRUE), b) : error code 347 from Lapack routine 'dtrtrs' Error in qr.coef(qr(a, LAPACK = TRUE), b) : error code 49 from Lapack routine 'dtrtrs' Error in qr.coef(qr(a, LAPACK = TRUE), b) : error code 81 from Lapack routine 'dtrtrs' Error in qr.coef(qr(a, LAPACK = TRUE), b) : error code 74 from Lapack routine 'dtrtrs' .......

Which part of the code in scDaPars calls the qr.coef() function?I can't figure out why this error occurs. Any ideas?

YiPeng-Gao commented 2 years ago

Hi, I think the problem happened during computing the parameters for non-negative linear regression. I used R package "penalized" for this purpose and it may output qr.coef() related error when it is not converged to a local minimum. I personally have never met this problem. I would suggest to run scDaPars step by step using the R code to see which cell is causing the problem (and maybe drop that cell since you have over 1000 cells in your dataset). However, at this point, without looking at your data, I couldn't help you further. Thanks for your interest!

yiyisun682 commented 2 years ago

Thank you for your reply, I have run the R codes in scDaPars. After running the filtering steps and finding the neighboring cells, the cells were divided into 5 clusters. I used the Impuation_model() function to infer the NAs for each cluster, and found that cluster 2 and cluster 3 got the same error messages as before. Some information about these 5 clusters is as follows :

5_clusters Is the proportion of NA values related to the error messages, as the cluster 2 and cluster 3 had fewer NAs ratios? How should I filter the cells in cluster 2 and cluster 3. Any suggestions?