I'm trying to run limma-vooom on a Nanostring experiment. The experiment design is multiple patients, each assessed before and after treatment. So the targets structure look something like this (only more lines):
SampleID patient Sex Status 1 C15-1 C15 F Before Treatment 2 C15-2 C15 F After Relapse 3 C30-1 C30 M Before Treatment 4 C30-2 C30 M After Relapse 5 C40-1 C40 M Before Treatment 6 C40-2 C40 M After Relapse
I've set up my design matrix the following manner
mm <- model.matrix(~0 + patient + Status, sampleDetails)
Then I've processed the data using
y <- voom(digital, design = mm, plot=T)
And I plan to run the rest of the limma pipeline (lmFit, topTable) to find differentially expressed genes by the treatment.
Three questions 0) Are there any mistakes I've made so far? 1) Do I need to set up a contrast matrix to focus on treatment? I don't think so, since it is already in my model 2) I am interested in seeing if there are treatment effects specific to Sex, but I'm not sure how to tease them out besides doing a manual comparison. I think I can focus on it using a contrast matrix, but I'm not sure how to do so. How should I go about doing that?
Thank you very much.
Uri David Akavia
sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS 10.14.6 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib locale:  en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8 attached base packages:  stats graphics grDevices utils datasets methods base other attached packages:  stringr_1.4.0 readxl_1.3.1 readr_1.3.1 dplyr_0.8.3 edgeR_3.24.3 limma_3.38.3 ggplot2_3.2.1 loaded via a namespace (and not attached):  Rcpp_1.0.2 pillar_1.4.2 compiler_3.5.1 cellranger_1.1.0 BiocManager_1.30.4  tools_3.5.1 zeallot_0.1.0 tibble_2.1.3 gtable_0.3.0 lattice_0.20-38  pkgconfig_2.0.3 rlang_0.4.0 cli_1.1.0 rstudioapi_0.10 yaml_2.2.0  xfun_0.9 withr_2.1.2 knitr_1.25 vctrs_0.2.0 hms_0.5.1  locfit_1.5-9.1 grid_3.5.1 tidyselect_0.2.5 glue_1.3.1 R6_2.4.0  fansi_0.4.0 purrr_0.3.2 magrittr_1.5 scales_1.0.0 backports_1.1.4  assertthat_0.2.1 colorspace_1.4-1 utf8_1.1.4 stringi_1.4.3 lazyeval_0.2.2  munsell_0.5.0 crayon_1.3.4