lfcShrink and alpha value
1
0
Entering edit mode
cropero • 0
@c94739c9
Last seen 3 hours ago
The Netherlands

I am trying to perform DGE analysis and to do so I want to calculate the Shrink log2 fold changes with the lfcShrink considering an alpha value of 0.05.

When I perform the analysis without considering the lfcShrink the code is as follows and works nicely:

res_wt_glu_vs_nocar <- results(dds, contrast = c("conditions", "wild_type_114_2_no_carbon", "wild_type_114_2_glucose"), alpha = 0.05)
summary(res_wt_glu_vs_nocar)

However, when wanting to perform the contrast calculating rhe Shrink log2 fold changes I get the results for default alpha 0.1 and not the 0.05:

res <- lfcShrink(dds, contrast = c("conditions", "wild_type_114_2_no_carbon", "wild_type_114_2_glucose"), type = "ashr", alpha = 0.05)
summary(res)
Then I get:

> summary(res)

out of 9010 with nonzero total read count
adjusted p-value < 0.1
LFC > 0 (up)       : 3516, 39%
LFC < 0 (down)     : 3283, 36%
outliers [1]       : 1, 0.011%
low counts [2]     : 0, 0%
(mean count < 2)
[1] see 'cooksCutoff' argument of ?results
[2] see 'independentFiltering' argument of ?results

```r

# include your problematic code here with any corresponding output 
# please also include the results of running the following in an R session

Should I instead perform the analysis as follows (first the non-lfcShrink and then perform the lfcShrink) if I want to consider alpha 0.05 and not the default?

res <- lfcShrink(dds, res=res_wt_glu_vs_nocar, type = "ashr")

I thought the ashr method allowed the perform the DEG analysis directly calculating the shrinking values without performing the non-shrink fc analysis before.

sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Ventura 13.6.7

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] ashr_2.2-63                 DESeq2_1.36.0               SummarizedExperiment_1.26.1 Biobase_2.56.0              MatrixGenerics_1.8.1        matrixStats_1.2.0          
 [7] GenomicRanges_1.48.0        GenomeInfoDb_1.32.4         IRanges_2.30.1              S4Vectors_0.34.0            BiocGenerics_0.42.0        

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.11            locfit_1.5-9.8         invgamma_1.1           lattice_0.22-5         png_0.1-8              Biostrings_2.64.1      utf8_1.2.4            
 [8] truncnorm_1.0-9        R6_2.5.1               RSQLite_2.3.4          httr_1.4.7             ggplot2_3.5.1          pillar_1.9.0           zlibbioc_1.42.0       
[15] rlang_1.1.2            irlba_2.3.5.1          rstudioapi_0.17.1      annotate_1.74.0        blob_1.2.4             Matrix_1.5-4.1         splines_4.2.1         
[22] BiocParallel_1.30.4    geneplotter_1.74.0     mixsqp_0.3-54          RCurl_1.98-1.13        bit_4.0.5              munsell_0.5.1          DelayedArray_0.22.0   
[29] compiler_4.2.1         pkgconfig_2.0.3        SQUAREM_2021.1         tidyselect_1.2.0       KEGGREST_1.36.3        tibble_3.2.1           GenomeInfoDbData_1.2.8
[36] codetools_0.2-20       XML_3.99-0.16          fansi_1.0.6            crayon_1.5.3           dplyr_1.1.4            bitops_1.0-7           grid_4.2.1            
[43] xtable_1.8-4           gtable_0.3.6           lifecycle_1.0.4        DBI_1.2.3              magrittr_2.0.3         scales_1.3.0           cli_3.6.2             
[50] cachem_1.0.8           XVector_0.36.0         genefilter_1.78.0      vctrs_0.6.5            generics_0.1.3         RColorBrewer_1.1-3     tools_4.2.1           
[57] bit64_4.0.5            glue_1.6.2             parallel_4.2.1         fastmap_1.1.1          survival_3.5-7         AnnotationDbi_1.58.0   colorspace_2.1-0      
[64] memoise_2.0.1
lfcShrink DESeq2 • 52 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 5 hours ago
United States

summary() is just printing a particular alpha, but you can do:

summary(res, alpha = ...)
ADD COMMENT

Login before adding your answer.

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