Why is the number of DEG different when comparing A versus B and B versus A?
1
0
Entering edit mode
@192f9264
Last seen 2.8 years ago
Thailand

I'm running a Deseq2 with RNA seq data to compare between test and control which every condition has 3 duplicated. But when I compare between test vs. control I got 1797 DEG but control against test I got 1760 genes.

res<-results(dds, contrast = c("dex", "T0", "T20"),alpha = 0.05)
res2 <- lfcShrink(dds=dds, coef="dex_T0_vs_T20")
sig <- res2[ which(res2$padj < 0.05), ]
summary(sig)

out of 1797 with nonzero total read count
adjusted p-value < 0.05
LFC > 0 (up)       : 952, 53%
LFC < 0 (down)     : 845, 47%

res<-results(dds, contrast = c("dex", "T20", "T0"),alpha = 0.05)
res2 <- lfcShrink(dds=dds, coef="dex_T20_vs_T0")
sig <- res2[ which(res2$padj < 0.05), ]
summary(sig)

out of 1760 with nonzero total read count
adjusted p-value < 0.1
LFC > 0 (up)       : 929, 53%
LFC < 0 (down)     : 831, 47%


sessionInfo( )
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=Thai_Thailand.874  LC_CTYPE=Thai_Thailand.874   
[3] LC_MONETARY=Thai_Thailand.874 LC_NUMERIC=C                 
[5] LC_TIME=Thai_Thailand.874    

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

other attached packages:
 [1] RColorBrewer_1.1-2          Biostrings_2.56.0          
 [3] XVector_0.28.0              stringr_1.4.0              
 [5] dplyr_1.0.2                 DESeq2_1.28.1              
 [7] SummarizedExperiment_1.18.2 DelayedArray_0.14.1        
 [9] matrixStats_0.57.0          Biobase_2.48.0             
[11] GenomicRanges_1.40.0        GenomeInfoDb_1.24.2        
[13] IRanges_2.22.2              S4Vectors_0.26.1           
[15] BiocGenerics_0.34.0        

loaded via a namespace (and not attached):
 [1] bdsmatrix_1.3-4        Rcpp_1.0.5             locfit_1.5-9.4        
 [4] mvtnorm_1.1-1          apeglm_1.10.0          lattice_0.20-41       
 [7] digest_0.6.25          plyr_1.8.6             R6_2.4.1              
[10] emdbook_1.3.12         coda_0.19-4            RSQLite_2.2.1         
[13] ggplot2_3.3.2          pillar_1.4.6           zlibbioc_1.34.0       
[16] rlang_0.4.7            rstudioapi_0.11        annotate_1.66.0       
[19] blob_1.2.1             Matrix_1.2-18          bbmle_1.0.23.1        
[22] splines_4.0.2          BiocParallel_1.22.0    geneplotter_1.66.0    
[25] RCurl_1.98-1.2         bit_4.0.4              munsell_0.5.0         
[28] tinytex_0.26           numDeriv_2016.8-1.1    compiler_4.0.2        
[31] xfun_0.18              pkgconfig_2.0.3        tidyselect_1.1.0      
[34] tibble_3.0.3           GenomeInfoDbData_1.2.3 XML_3.99-0.5          
[37] crayon_1.3.4           MASS_7.3-51.6          bitops_1.0-6          
[40] grid_4.0.2             xtable_1.8-4           gtable_0.3.0          
[43] lifecycle_0.2.0        DBI_1.1.0              magrittr_1.5          
[46] scales_1.1.1           stringi_1.5.3          genefilter_1.70.0     
[49] ellipsis_0.3.1         vctrs_0.3.4            generics_0.0.2        
[52] tools_4.0.2            bit64_4.0.5            glue_1.4.2            
[55] purrr_0.3.4            survival_3.1-12        AnnotationDbi_1.50.3  
[58] colorspace_1.4-1       memoise_1.1.0
DESeq2 • 472 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 14 hours ago
United States

There can be slight variation when you relevel in a design with more than a two level factor. I recommend to keep the reference level set for comparisons involving the reference level, and only relevel to compare against non-reference level conditions.

ADD COMMENT

Login before adding your answer.

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