Warnings when using "ashr" in lfcshrinkage for DESeq2
2
0
Entering edit mode
@andrebolerbarros-16788
Last seen 6 months ago
Portugal

Hi everyone,

I'm currently getting some warnings when using lfcshrinkage with "ashr", regarding solve().

Example

Code should be placed in three backticks as shown below

library(zebrafishRNASeq)

data(zfGenes)

dds <- DESeqDataSetFromMatrix(countData = zfGenes,
                              colData = data.frame(group=rep(c("Ctl","Trt"),each=3)),
                              design= ~ group)
dm<-dm[rowSums(counts(dm)) > 0 , ] #remove the genes w/ 0 reads
dds <- DESeq(dds)
res <- results(dds, contrast = c("group", "Trt","Ctl"))
ashr_res<-lfcShrink(dds, contrast = c("group", "Trt","Ctl"),type="ashr")

This leads to the production of the corresponding output:

warning: solve(): system is singular (rcond: 4.77692e-17); attempting approx solution

warning: solve(): system is singular (rcond: 6.21768e-17); attempting approx solution

warning: solve(): system is singular (rcond: 9.89691e-17); attempting approx solution

warning: solve(): system is singular (rcond: 6.62855e-17); attempting approx solution

warning: solve(): system is singular (rcond: 7.63405e-17); attempting approx solution

warning: solve(): system is singular (rcond: 7.66601e-17); attempting approx solution

warning: solve(): system is singular (rcond: 7.91531e-17); attempting approx solution

warning: solve(): system is singular (rcond: 8.20337e-17); attempting approx solution

Is there anyone getting the same error?

sessionInfo():

R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7600)

Matrix products: default

locale:
[1] LC_COLLATE=Portuguese_Portugal.1252  LC_CTYPE=Portuguese_Portugal.1252   
[3] LC_MONETARY=Portuguese_Portugal.1252 LC_NUMERIC=C                        
[5] LC_TIME=Portuguese_Portugal.1252    

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

other attached packages:
 [1] zebrafishRNASeq_1.14.0      RUVSeq_1.28.0               edgeR_3.36.0               
 [4] limma_3.50.3                EDASeq_2.28.0               ShortRead_1.52.0           
 [7] GenomicAlignments_1.30.0    Rsamtools_2.10.0            Biostrings_2.62.0          
[10] XVector_0.34.0              BiocParallel_1.28.3         openxlsx_4.2.5             
[13] xlsx_0.6.5                  ggprism_1.0.3               vsn_3.62.0                 
[16] gridExtra_2.3               stringr_1.4.0               readxl_1.4.0               
[19] genefilter_1.76.0           ggplot2_3.3.6               org.Mm.eg.db_3.14.0        
[22] AnnotationDbi_1.56.2        RColorBrewer_1.1-3          pheatmap_1.0.12            
[25] DESeq2_1.34.0               SummarizedExperiment_1.24.0 Biobase_2.54.0             
[28] MatrixGenerics_1.6.0        matrixStats_0.62.0          GenomicRanges_1.46.1       
[31] GenomeInfoDb_1.30.1         IRanges_2.28.0              S4Vectors_0.32.4           
[34] BiocGenerics_0.40.0        

loaded via a namespace (and not attached):
  [1] backports_1.4.1        aroma.light_3.24.0     BiocFileCache_2.2.1   
  [4] splines_4.1.2          inline_0.3.19          digest_0.6.29         
  [7] invgamma_1.1           htmltools_0.5.2        SQUAREM_2021.1        
 [10] fansi_1.0.3            magrittr_2.0.3         memoise_2.0.1         
 [13] annotate_1.72.0        RcppParallel_5.1.5     R.utils_2.11.0        
 [16] prettyunits_1.1.1      jpeg_0.1-9             colorspace_2.0-3      
 [19] rappdirs_0.3.3         blob_1.2.3             xfun_0.31             
 [22] dplyr_1.0.9            callr_3.7.0            crayon_1.5.1          
 [25] RCurl_1.98-1.6         survival_3.3-1         glue_1.6.2            
 [28] gtable_0.3.0           zlibbioc_1.40.0        DelayedArray_0.20.0   
 [31] car_3.0-13             pkgbuild_1.3.1         rstan_2.21.5          
 [34] abind_1.4-5            scales_1.2.0           DBI_1.1.2             
 [37] rstatix_0.7.0          Rcpp_1.0.8.3           progress_1.2.2        
 [40] xtable_1.8-4           bit_4.0.4              preprocessCore_1.56.0 
 [43] StanHeaders_2.21.0-7   truncnorm_1.0-8        httr_1.4.3            
 [46] modeltools_0.2-23      ellipsis_0.3.2         pkgconfig_2.0.3       
 [49] loo_2.5.1              XML_3.99-0.9           rJava_1.0-6           
 [52] R.methodsS3_1.8.1      flexmix_2.3-17         farver_2.1.0          
 [55] dbplyr_2.1.1           nnet_7.3-17            locfit_1.5-9.5        
 [58] utf8_1.2.2             tidyselect_1.1.2       labeling_0.4.2        
 [61] rlang_1.0.2            munsell_0.5.0          cellranger_1.1.0      
 [64] tools_4.1.2            cachem_1.0.6           cli_3.2.0             
 [67] generics_0.1.2         RSQLite_2.2.14         broom_0.8.0           
 [70] evaluate_0.15          fastmap_1.1.0          yaml_2.3.5            
 [73] processx_3.5.3         knitr_1.39             bit64_4.0.5           
 [76] zip_2.2.0              purrr_0.3.4            KEGGREST_1.34.0       
 [79] R.oo_1.24.0            xml2_1.3.3             biomaRt_2.50.3        
 [82] compiler_4.1.2         rstudioapi_0.13        filelock_1.0.2        
 [85] curl_4.3.2             png_0.1-7              affyio_1.64.0         
 [88] ggsignif_0.6.3         tibble_3.1.6           geneplotter_1.72.0    
 [91] stringi_1.7.6          ps_1.7.0               GenomicFeatures_1.46.5
 [94] lattice_0.20-45        Matrix_1.4-1           vctrs_0.4.1           
 [97] pillar_1.7.0           lifecycle_1.0.1        BiocManager_1.30.17   
[100] cowplot_1.1.1          bitops_1.0-7           irlba_2.3.5           
[103] rtracklayer_1.54.0     BiocIO_1.4.0           R6_2.5.1              
[106] latticeExtra_0.6-29    affy_1.72.0            hwriter_1.3.2.1       
[109] codetools_0.2-18       MASS_7.3-57            assertthat_0.2.1      
[112] xlsxjars_0.6.1         rjson_0.2.21           withr_2.5.0           
[115] GenomeInfoDbData_1.2.7 hms_1.1.1              parallel_4.1.2        
[118] grid_4.1.2             tidyr_1.2.0            rmarkdown_2.14        
[121] carData_3.0-5          ashr_2.2-54            ggpubr_0.4.0          
[124] mixsqp_0.3-43          lubridate_1.8.0        restfulr_0.0.13

Thanks in advance!

RNASeq DESeq2 • 2.7k views
ADD COMMENT
2
Entering edit mode
ATpoint ★ 4.5k
@atpoint-13662
Last seen 6 hours ago
Germany

The error comes from the mixsqp package, see https://github.com/stephens999/ashr/issues/131. Upgrading the package to the most recent 0.3.47 via remotes::install_github("stephenslab/mixsqp") solved the issue for me. If you are on Windows you probably need to have both Rtools and the pkgbuild installed as the package requires some compilation when pulling directly via GitHub.

ADD COMMENT
0
Entering edit mode

Upgrading the package solved the issue, thanks!

ADD REPLY
0
Entering edit mode

Hi andrebolerbarros, Do you use windows? If yes, How did you update the mixsqp package please?

Thanks!

ADD REPLY
0
Entering edit mode

Exactly as above, there is no difference in Windows. Do you meet any problems?

ADD REPLY
0
Entering edit mode

It's solved now after restarting R. Many thanks

ADD REPLY
1
Entering edit mode
@mikelove
Last seen 10 hours ago
United States

Note sure why it's having difficulty converging.

You could use apeglm?

ADD COMMENT
0
Entering edit mode

Hi Michael,

I'm using the "contrast" parameter, so I cannot use apeglm with that, as far as I know. The "coef" will not allow me to do every comparison I need.

ADD REPLY
0
Entering edit mode

Sorry, I haven't seen this. Maybe try filtering low count genes?

keep <- rowSums(counts(dds) >= 10) >= X
dds <- dds[keep,]
# then run DESeq
ADD REPLY
0
Entering edit mode

Thanks for the suggestion.

I ran the following filtering criteria:

keep <- rowSums(counts(dds) >= 10) >= 5
dds <- dds[keep,]

It gave the following errors:

warning: solve(): system is singular (rcond: 1.54281e-17); attempting approx solution

warning: solve(): system is singular (rcond: 2.06738e-17); attempting approx solution

warning: solve(): system is singular (rcond: 5.18223e-17); attempting approx solution

warning: solve(): system is singular (rcond: 5.51318e-17); attempting approx solution

warning: solve(): system is singular (rcond: 8.45586e-17); attempting approx solution

warning: solve(): system is singular (rcond: 1.01227e-16); attempting approx solution
ADD REPLY

Login before adding your answer.

Traffic: 590 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6