I have a question, I am working with mRNA-Seq dataset (18 samples) corresponding to different 2 batches and 3 cell types .
Batch_1 has 2 cell types (A and B types), however,
Batch_2 has 3rd cell type (C type). I imported the dataset via
DESeq2 in R., but for some reason (as mentioned below regarding the “the model matrix is not full rank", I cannot perform differential expression and to measure the effect of the Cell_Type, controlling for batch differences.
I would like to export either normalised_counts (OR) vst or rlog, and import it to
limma for differential expression using
limma-trend. Can we use rlog or vst data values in limma for differential expression analysis?
library("DESeq2") dds <- DESeqDataSetFromMatrix(countData = cts, colData = coldata, design = ~ Batch+Cell_Type) dds
“the model matrix is not full rank, so the model cannot be fit as specified.” There are two main reasons for this problem: either one or more columns in the model matrix are linear combinations of other columns, or there are levels of factors or combinations of levels of multiple factors which are missing samples. We address these two problems below and discuss possible solutions:
library("DESeq2") dds <- DESeqDataSetFromMatrix(countData = cts, colData = coldata, design = ~ Cell_Type) dds dds <- DESeq(dds) res <- results(dds) res normalized_counts <- counts(dds, normalized=TRUE) vsd <- vst(dds, blind=FALSE) rld <- rlog(dds, blind=FALSE) head(assay(vsd), 3)