I have timeseries RNA-seq data that I am trying to analyze using DESeq2. The conditions and time points are as follows:
Condition Rep1 Rep2 Rep3
DMSO 0h 1 2 3
DMSO 1h 1 2 3
DMSO 2h 1 2 3
DMSO 6h 1 2 3
DMSO 24h 1 2 3
Drug1 1h 1 2 3
Drug1 2h 1 2 3
Drug1 6h 1 2 3
Drug1 24h 1 2 3
Drug2 1h 1 2 3
Drug2 2h 1 2 3
Drug2 6h 1 2 3
Drug2 24h 1 2 3
I want to compare the gene expression between the drug and DMSO at each time point (1, 2, 6, 24 hours) and also between the time points.
For example, how geneA changes across the time and with different drug treatment.
My questions:
1) Is my design correct w.r.t the information I am looking for from my data?
2) How do I extract the results for time.condition?
The design I used :
> deseq_dataset <- DESeqDataSetFromMatrix(countData = count_matrix,
colData = sampletable,
design = ~ time + condition + time:condition)
> deseq_dataset2 <- DESeq(deseq_dataset, test="LRT", reduced = ~ time + condition)
> resultsNames(deseq_dataset2)
[1] "Intercept" "time_24h_vs_1h" "time_2h_vs_1h"
[4] "time_6h_vs_1h" "condition_Drug1_vs_DMSO" "condition_Drug2_vs_DMSO"
[7] "time24h.conditionDrug1" "time2h.conditionDrug1" "time6h.conditionDrug1"
[10] "time24h.conditionDrug2" "time2h.conditionDrug2" "time6h.conditionDrug2"
> # extract results for condition_Drug1_vs_DMSO
> de_Drug1_vs_DMSO <- results(object = deseq_dataset2,
name="condition_Drug1_vs_DMSO", contrast = c("condition","Drug1", "DMSO"))
> sessionInfo( )
R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] grid parallel stats4 stats graphics grDevices utils datasets
[9] methods base
other attached packages:
[1] gridExtra_2.3 DOSE_3.12.0 clusterProfiler_3.14.3
[4] org.Mm.eg.db_3.10.0 AnnotationDbi_1.48.0 RColorBrewer_1.1-2
[7] pheatmap_1.0.12 biomaRt_2.42.1 forcats_0.5.1
[10] stringr_1.4.0 dplyr_1.0.5 purrr_0.3.4
[13] readr_1.4.0 tidyr_1.1.3 tibble_3.1.0
[16] tidyverse_1.3.0 plotly_4.9.3 ggplot2_3.3.3
[19] DESeq2_1.26.0 SummarizedExperiment_1.16.1 DelayedArray_0.12.3
[22] BiocParallel_1.20.1 matrixStats_0.58.0 Biobase_2.46.0
[25] GenomicRanges_1.38.0 GenomeInfoDb_1.22.1 IRanges_2.20.2
[28] S4Vectors_0.24.4 BiocGenerics_0.32.0
loaded via a namespace (and not attached):
[1] readxl_1.3.1 backports_1.2.1 Hmisc_4.5-0
[4] fastmatch_1.1-0 BiocFileCache_1.10.2 plyr_1.8.6
[7] igraph_1.2.6 lazyeval_0.2.2 splines_3.6.3
[10] urltools_1.7.3 digest_0.6.27 htmltools_0.5.1.1
[13] GOSemSim_2.12.1 viridis_0.5.1 GO.db_3.10.0
[16] fansi_0.4.2 magrittr_2.0.1 checkmate_2.0.0
[19] memoise_2.0.0 cluster_2.1.1 annotate_1.64.0
[22] graphlayouts_0.7.1 modelr_0.1.8 askpass_1.1
[25] enrichplot_1.6.1 prettyunits_1.1.1 jpeg_0.1-8.1
[28] colorspace_2.0-0 blob_1.2.1 rvest_1.0.0
[31] rappdirs_0.3.3 ggrepel_0.9.1 haven_2.3.1
[34] xfun_0.22 crayon_1.4.1 RCurl_1.98-1.3
[37] jsonlite_1.7.2 genefilter_1.68.0 survival_3.2-10
[40] glue_1.4.2 polyclip_1.10-0 gtable_0.3.0
[43] zlibbioc_1.32.0 XVector_0.26.0 scales_1.1.1
[46] DBI_1.1.1 Rcpp_1.0.6 viridisLite_0.3.0
[49] xtable_1.8-4 progress_1.2.2 htmlTable_2.1.0
[52] gridGraphics_0.5-1 europepmc_0.4 foreign_0.8-75
[55] bit_4.0.4 Formula_1.2-4 htmlwidgets_1.5.3
[58] httr_1.4.2 fgsea_1.12.0 ellipsis_0.3.1
[61] pkgconfig_2.0.3 XML_3.99-0.3 farver_2.1.0
[64] nnet_7.3-15 dbplyr_2.1.1 locfit_1.5-9.4
[67] utf8_1.2.1 ggplotify_0.0.5 tidyselect_1.1.0
[70] rlang_0.4.10 reshape2_1.4.4 munsell_0.5.0
[73] cellranger_1.1.0 tools_3.6.3 cachem_1.0.4
[76] cli_2.4.0 generics_0.1.0 RSQLite_2.2.5
[79] ggridges_0.5.3 broom_0.7.6 fastmap_1.1.0
[82] knitr_1.31 bit64_4.0.5 fs_1.5.0
[85] tidygraph_1.2.0 ggraph_2.0.5 DO.db_2.9
[88] xml2_1.3.2 compiler_3.6.3 rstudioapi_0.13
[91] curl_4.3 png_0.1-7 reprex_2.0.0
[94] tweenr_1.0.2 geneplotter_1.64.0 stringi_1.5.3
[97] lattice_0.20-41 Matrix_1.3-2 vctrs_0.3.7
[100] pillar_1.5.1 lifecycle_1.0.0 BiocManager_1.30.12
[103] triebeard_0.3.0 cowplot_1.1.1 data.table_1.14.0
[106] bitops_1.0-6 qvalue_2.18.0 R6_2.5.0
[109] latticeExtra_0.6-29 MASS_7.3-53.1 assertthat_0.2.1
[112] openssl_1.4.3 withr_2.4.1 GenomeInfoDbData_1.2.2
[115] hms_1.0.0 rpart_4.1-15 rvcheck_0.1.8
[118] ggforce_0.3.3 lubridate_1.7.10 base64enc_0.1-3