I am trying to get know if a gene is down in Condition A vs B.While using results function, I am trying to know if I am doing this correctly. Because, I am not able to see how it is done internally. So my questions are as follows. In my case ( Condition = TNBC status, A = QNBC, B= TNBC ARP.
What is the difference if we use contrast=c("condition", "A", "B")) vs contrast=c("condition", "B", "A"))
In the colData and TNBC status condition, only few patients are QNBC and TNBC ARP. The remaining samples do not fall in this category. So, for those samples ( the TNBC condition raw is empty, is not assigned as NA.) My question here is if we specify the contrast argument , then it only compares two groups right?
The results names here in my output looks different. It does not give QNBCVsTNBCARP.
Thanks so much in advance, Anusha.
dds <- DESeqDataSetFromMatrix(countData = cts, colData = coldata, design = ~ TNBCstatus) dds <- DESeq(dds)
results
resultsNames(dds) [1] "Intercept" "TNBCstatusQNBCvs" "TNBCstatusTNBCARPvs"
res <- results(dds, contrast=c("TNBCstatus", "QNBC", "TNBCARP")) res log2 fold change (MLE): TNBCstatus QNBC vs TNBCARP Wald test p-value: TNBCstatus QNBC vs TNBCARP
sessionInfo() R version 3.5.2 (2018-12-20) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LCCOLLATE=EnglishUnited States.1252 LCCTYPE=EnglishUnited States.1252
[3] LCMONETARY=EnglishUnited States.1252 LCNUMERIC=C
[5] LCTIME=English_United States.1252
attached base packages:
[1] parallel stats4 stats graphics grDevices utils datasets methods
[9] base
other attached packages:
[1] DESeq21.20.0 SummarizedExperiment1.10.1
[3] DelayedArray0.6.6 BiocParallel1.14.2
[5] matrixStats0.54.0 Biobase2.40.0
[7] GenomicRanges1.32.7 GenomeInfoDb1.16.0
[9] IRanges2.14.12 S4Vectors0.18.3
[11] BiocGenerics0.26.0 BiocInstaller1.30.0
loaded via a namespace (and not attached):
[1] locfit1.5-9.1 Rcpp1.0.0 lattice0.20-38
[4] digest0.6.18 plyr1.8.4 backports1.1.3
[7] acepack1.4.1 RSQLite2.1.1 ggplot23.1.0
[10] pillar1.3.1 zlibbioc1.26.0 rlang0.3.1
[13] lazyeval0.2.1 rstudioapi0.9.0 data.table1.12.0
[16] annotate1.58.0 blob1.1.1 rpart4.1-13
[19] Matrix1.2-15 checkmate1.9.1 splines3.5.2
[22] geneplotter1.58.0 stringr1.3.1 foreign0.8-71
[25] htmlwidgets1.3 RCurl1.95-4.11 bit1.1-14
[28] munsell0.5.0 compiler3.5.2 xfun0.4
[31] pkgconfig2.0.2 base64enc0.1-3 htmltools0.3.6
[34] nnet7.3-12 tibble2.0.1 gridExtra2.3
[37] htmlTable1.13.1 GenomeInfoDbData1.1.0 Hmisc4.2-0
[40] XML3.98-1.16 crayon1.3.4 bitops1.0-6
[43] grid3.5.2 xtable1.8-3 gtable0.2.0
[46] DBI1.0.0 magrittr1.5 scales1.0.0
[49] stringi1.2.4 XVector0.20.0 genefilter1.62.0
[52] latticeExtra0.6-28 Formula1.2-3 RColorBrewer1.1-2
[55] tools3.5.2 bit640.9-7 survival2.43-3
[58] AnnotationDbi1.42.1 colorspace1.4-0 cluster2.0.7-1
[61] memoise1.1.0 knitr1.21
Thanks a million for answering the question. This link is very helpful. mcols(res, use.names = TRUE) is helpful to know.