Error: insufficient numeric precision during Log fold change shrinkage with apeglm
2
0
Entering edit mode
Juan Pablo • 0
@0370f1ad
Last seen 15 months ago
United States

Hi, I am using apeglm to do Log fold change shrinkage to help during visualization of data, and after running

`lfcShrink(dds, coef="condition_min_vs_control", type="apeglm")``r

I get the following error:

Warning messages: 1: In nbinomGLM(x = x, Y = YNZ, size = size, weights = weightsNZ, offset = offsetNZ, : the line search routine failed, possibly due to insufficient numeric precision 2: In nbinomGLM(x = x, Y = YNZ, size = size, weights = weightsNZ, offset = offsetNZ, : the line search routine failed, possibly due to insufficient numeric precision 3: In nbinomGLM(x = x, Y = YNZ, size = size, weights = weightsNZ, offset = offsetNZ, : the line search routine failed, possibly due to insufficient numeric precision 4: In nbinomGLM(x = x, Y = YNZ, size = size, weights = weightsNZ, offset = offsetNZ, : the line search routine failed, possibly due to insufficient numeric precision

Any idea of why this is happening, and how to fix it? I ran DESeq2.

Thanks;

sessionInfo( ) R version 4.3.0 (2023-04-21 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

time zone: America/New_York tzcode source: internal

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

other attached packages: [1] DESeq2_1.40.2 SummarizedExperiment_1.30.2 Biobase_2.60.0
[4] MatrixGenerics_1.12.3 matrixStats_1.0.0 GenomicRanges_1.52.0
[7] GenomeInfoDb_1.36.1 IRanges_2.34.1 S4Vectors_0.38.1
[10] BiocGenerics_0.46.0

loaded via a namespace (and not attached): [1] utf8_1.2.3 generics_0.1.3 bitops_1.0-7 lattice_0.21-8
[5] magrittr_2.0.3 grid_4.3.0 mvtnorm_1.2-2 plyr_1.8.8
[9] Matrix_1.5-4 BiocManager_1.30.22 fansi_1.0.4 scales_1.2.1
[13] numDeriv_2016.8-1.1 codetools_0.2-19 emdbook_1.3.13 abind_1.4-5
[17] cli_3.6.1 bbmle_1.0.25 rlang_1.1.1 crayon_1.5.2
[21] XVector_0.40.0 munsell_0.5.0 DelayedArray_0.26.7 S4Arrays_1.0.5
[25] tools_4.3.0 parallel_4.3.0 BiocParallel_1.34.2 coda_0.19-4
[29] bdsmatrix_1.3-6 dplyr_1.1.2 colorspace_2.1-0 ggplot2_3.4.3
[33] locfit_1.5-9.8 GenomeInfoDbData_1.2.10 vctrs_0.6.3 R6_2.5.1
[37] lifecycle_1.0.3 zlibbioc_1.46.0 MASS_7.3-58.4 pkgconfig_2.0.3
[41] pillar_1.9.0 gtable_0.3.3 glue_1.6.2 Rcpp_1.0.11
[45] tibble_3.2.1 tidyselect_1.2.0 rstudioapi_0.15.0 apeglm_1.22.1
[49] compiler_4.3.0 RCurl_1.98-1.12 ```

apeglm • 1.5k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 2 days ago
United States

What is your design, sample size?

(Also note this is a warning not an error)

ADD COMMENT
0
Entering edit mode
Bonnie • 0
@21537855
Last seen 15 months ago
United States

Hi, I experienced this warning as well. When I looked at the output I realized that I had not removed all the transcripts with baseMean=0. Once I removed those records, the function ran without warning. Here is my code for keeping the records with more than 1 count:

starting with the RangedSummarizedExperiment object from tximeta()

keep <- rowSums(data.tximeta@assays@data@listData$counts) > 1

data.tximeta1 <- data.tximeta[keep,]

nrow(data.tximeta1) #should see a large reduction in the number of rows

Hope this helps

ADD COMMENT

Login before adding your answer.

Traffic: 643 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