Hi,
I'm trying to run a differential abundance analysis using DESeq 2. When trying to create the DESeq object from a matrix of counts, I am coming up against the following error:
> dds_skin <- DESeqDataSetFromMatrix(countData = count_data,
+ colData = coldata,
+ design = ~ health + subject2:health)
Error in checkFullRank(modelMatrix) :
the model matrix is not full rank, so the model cannot be fit as specified.
Levels or combinations of levels without any samples have resulted in
column(s) of zeros in the model matrix.
As described in the vignette (section 3.12.2), this is because my model results in columns with only zeros. As per the vignette, I have manually created the model matrix, and edited it to remove those columns.
However, I'm unclear on how to pass this matrix to the DESeq full argument, as I can't create a DESeq object (I'm using a matrix of counts to do this) without getting the above error. I'm also unclear which option within the DESeq command I would use to pass the matrix in.
Any help would be greatly appreciated!
Cath
> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.9.5 (Mavericks)
locale:
[1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8
attached base packages:
[1] parallel stats4 stats graphics grDevices utils datasets methods
[9] base
other attached packages:
[1] DESeq2_1.8.1 RcppArmadillo_0.5.100.1.0 Rcpp_0.11.6
[4] GenomicRanges_1.20.3 GenomeInfoDb_1.4.0 IRanges_2.2.1
[7] S4Vectors_0.6.0 BiocGenerics_0.14.0 ggplot2_1.0.1
[10] phyloseq_1.13.2
loaded via a namespace (and not attached):
[1] locfit_1.5-9.1 ape_3.2 lattice_0.20-31
[4] Biostrings_2.36.1 digest_0.6.8 foreach_1.4.2
[7] biom_0.3.12 plyr_1.8.2 chron_2.3-45
[10] futile.options_1.0.0 acepack_1.3-3.3 RSQLite_1.0.0
[13] zlibbioc_1.14.0 data.table_1.9.4 annotate_1.46.0
[16] vegan_2.2-1 rpart_4.1-9 Matrix_1.2-0
[19] proto_0.3-10 splines_3.2.0 BiocParallel_1.2.1
[22] geneplotter_1.46.0 stringr_1.0.0 foreign_0.8-63
[25] igraph_0.7.1 munsell_0.4.2 multtest_2.24.0
[28] mgcv_1.8-6 nnet_7.3-9 gridExtra_0.9.1
[31] Hmisc_3.16-0 codetools_0.2-11 XML_3.98-1.1
[34] permute_0.8-4 MASS_7.3-40 grid_3.2.0
[37] nlme_3.1-120 xtable_1.7-4 gtable_0.1.2
[40] DBI_0.3.1 magrittr_1.5 scales_0.2.4
[43] stringi_0.4-1 XVector_0.8.0 reshape2_1.4.1
[46] genefilter_1.50.0 latticeExtra_0.6-26 futile.logger_1.4.1
[49] Formula_1.2-1 lambda.r_1.1.7 RColorBrewer_1.1-2
[52] iterators_1.0.7 tools_3.2.0 RJSONIO_1.3-0
[55] ade4_1.7-2 Biobase_2.28.0 survival_2.38-1
[58] AnnotationDbi_1.30.1 colorspace_1.2-6 cluster_2.0.1
Thank you!!