Question: Design definition with multiple conditions in DESeqDataSetFromMatrix
gravatar for silvia.morini01
7 months ago by
silvia.morini010 wrote:

Hi, I am using the DESeq2 package to analyze RNA-seq data. I have two conditions: treatmentand cell_type, and I would like the provide the function DESeqDataSetFromMatrix with a design that allows me to compute the results for every possible combination of treatmentand cell_type; To be clearer, if A, B and C are the treatment and 1, 2 the cell types: A1:A2 B1:B2 C1:C2 A1:B1 A1:C1 B1:A1 B1:C1 C1:A1 C1:B1 ... and so on.

I have read through the documentation but still haven't found a way to do this. I would also be willingly to manually define the contrasts I need (since I don't need them all, but what I need is pretty random and I want it to be flexible, so I can't define it exactly in the design) prior or after calling the DESeqDataSetFromMatrix, but I am not sure on how to do this; I have tried a couple of options but nothing seems to produce the output I want.

cds <- DESeqDataSetFromMatrix(countData =count.table, colData =m, design = ~ ?)

What should I have instead of the ?

I thank you very much in advance for any help!

R version 3.5.1 (2018-07-02)
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS

Matrix products: default
BLAS/LAPACK: /path/to/anaconda3/lib/R/lib/

 [1] LC_CTYPE=en_US.UTF-8          LC_NUMERIC=de_DE.UTF-8        LC_TIME=de_DE.UTF-8          
 [4] LC_COLLATE=en_US.UTF-8        LC_MONETARY=de_DE.UTF-8       LC_MESSAGES=en_US.UTF-8      
 [7] LC_PAPER=de_DE.UTF-8          LC_NAME=de_DE.UTF-8           LC_ADDRESS=de_DE.UTF-8       

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

other attached packages:
 [1] hexbin_1.27.2               svglite_1.2.1               pheatmap_1.0.12            
 [4] gplots_3.0.1.1              vsn_3.50.0                  plyr_1.8.4                 
 [7] ggplot2_3.1.0               DESeq2_1.22.2               SummarizedExperiment_1.12.0
[10] DelayedArray_0.8.0          BiocParallel_1.16.6         matrixStats_0.54.0         
[13] GenomicRanges_1.34.0        GenomeInfoDb_1.18.2         genefilter_1.64.0          
[16] reshape2_1.4.3              RColorBrewer_1.1-2          AnnotationDbi_1.44.0       
[19] IRanges_2.16.0              S4Vectors_0.20.1            Biobase_2.42.0             
[22] dplyr_0.8.0.1               clusterProfiler_3.10.1      AnnotationHub_2.14.4       
[25] BiocGenerics_0.28.0         biomaRt_2.38.0             

loaded via a namespace (and not attached):
  [1] backports_1.1.3               Hmisc_4.2-0                   fastmatch_1.1-0              
  [4] igraph_1.2.4                  lazyeval_0.2.1                splines_3.5.1                
  [7] urltools_1.7.2                digest_0.6.18                 htmltools_0.3.6              
 [10] GOSemSim_2.8.0                viridis_0.5.1                 GO.db_3.7.0                  
 [13] gdata_2.18.0                  magrittr_1.5                  checkmate_1.9.1              
 [16] memoise_1.1.0                 cluster_2.0.7-1               limma_3.38.3                 
 [19] annotate_1.60.1               enrichplot_1.2.0              prettyunits_1.0.2            
 [22] colorspace_1.4-0              blob_1.1.1                    ggrepel_0.8.0                
 [25] xfun_0.5                      crayon_1.3.4                  RCurl_1.95-4.12              
 [28] jsonlite_1.6                  survival_2.43-3               glue_1.3.0                   
 [31] polyclip_1.9-1                gtable_0.2.0                  zlibbioc_1.28.0              
 [34] XVector_0.22.0                UpSetR_1.3.3                  scales_1.0.0                 
 [37] DOSE_3.8.2                    DBI_1.0.0                     Rcpp_1.0.0                   
 [40] viridisLite_0.3.0             xtable_1.8-3                  progress_1.2.0               
 [43] htmlTable_1.13.1              gridGraphics_0.3-0            foreign_0.8-71               
 [46] bit_1.1-14                    europepmc_0.3                 preprocessCore_1.44.0        
 [49] Formula_1.2-3                 htmlwidgets_1.3               httr_1.4.0                   
 [52] fgsea_1.8.0                   acepack_1.4.1                 pkgconfig_2.0.2              
 [55] XML_3.98-1.19                 farver_1.1.0                  nnet_7.3-12                  
 [58] locfit_1.5-9.1                ggplotify_0.0.3               tidyselect_0.2.5             
 [61] labeling_0.3                  rlang_0.3.1                   later_0.8.0                  
 [64] munsell_0.5.0                 tools_3.5.1                   RSQLite_2.1.1                
 [67] ggridges_0.5.1                stringr_1.4.0                 yaml_2.2.0                   
 [70] knitr_1.22                    bit64_0.9-7                   caTools_1.17.1.2             
 [73] purrr_0.3.1                   ggraph_1.0.2                  mime_0.6                     
 [76] DO.db_2.9                     xml2_1.2.0                    compiler_3.5.1               
 [79] rstudioapi_0.9.0              curl_3.3                      interactiveDisplayBase_1.20.0
 [82] affyio_1.52.0                 tibble_2.0.1                  tweenr_1.0.1                 
 [85] geneplotter_1.60.0            stringi_1.3.1                 gdtools_0.1.7                
 [88] lattice_0.20-38               Matrix_1.2-16                 pillar_1.3.1                 
 [91] BiocManager_1.30.4            triebeard_0.3.0               data.table_1.12.0            
 [94] cowplot_0.9.4                 bitops_1.0-6                  httpuv_1.4.5.1               
 [97] qvalue_2.14.1                 R6_2.4.0                      latticeExtra_0.6-28          
[100] affy_1.60.0                   promises_1.0.1                KernSmooth_2.23-15           
[103] gridExtra_2.3                 MASS_7.3-51.1                 gtools_3.8.1                 
[106] assertthat_0.2.0              withr_2.1.2                   GenomeInfoDbData_1.2.0       
[109] hms_0.4.2                     grid_3.5.1                    rpart_4.1-13                 
[112] tidyr_0.8.3                   rvcheck_0.1.3                 ggforce_0.2.0                
[115] shiny_1.2.0                   base64enc_0.1-3
deseq2 • 106 views
ADD COMMENTlink modified 7 months ago • written 7 months ago by silvia.morini010
Answer: Design definition with multiple conditions in DESeqDataSetFromMatrix
gravatar for Michael Love
7 months ago by
Michael Love25k
United States
Michael Love25k wrote:

In the vignette section on interactions, we have some code that should allow you to make these comparisons. You want to combine the two variables into a single factor, which will allow you to do pairwise comparisons of any combination.

ADD COMMENTlink written 7 months ago by Michael Love25k
Answer: Design definition with multiple conditions in DESeqDataSetFromMatrix
gravatar for silvia.morini01
7 months ago by
silvia.morini010 wrote:

Thank you for the quick answer!

ADD COMMENTlink written 7 months ago by silvia.morini010
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 304 users visited in the last hour