Design matrix: DESeq2
1
0
Entering edit mode
@gyan-prakash-mishra-8555
Last seen 6 months ago
INDIA

Hi all,

I have 20 samples, four genotype , three stimulation with two replicate each sequenced in two batch please see below table.

Screenshot-from-2019-03-10-15-10-00

coldata <- data.frame(row.names=colnames(countdata),genotype,Rep,stimulation,batch)
coldata$group<- factor(paste0(coldata$stimulation,"_",coldata$genotype))
dds <- DESeqDataSetFromMatrix(countData=countdata, colData=coldata, design=~group)

I used group for the design first but as I have sample from two different batch, I also would like to include batch effect into the model. I thought I would include batch as

dds <- DESeqDataSetFromMatrix(countData=countdata, colData=coldata, design=~batch+group)

but I am getting error

the model matrix is not full rank, so the model cannot be fit as specified.

Can somebody help in understanding how can i create design matrix to include batch effect in my design matrix.

I would appreciate any help Thanks

deseq2 • 1.2k views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 17 hours ago
United States

Group is nested within batch. So controlling for batch and group is not possible. Take a look at the section of the vignette that the complete error message directs you to. Here you should just change the design to ~group

ADD COMMENT
0
Entering edit mode

Thanks Michael for reply !

Yes I understood that it would be difficult to model batch and group since it is nested. so I guess using only ~group in design should take care of variance and depth across the sample.

I did pca analysis using vst, I think its the sample looks fine here. please comment your views

vsd <- vst(dds, blind=FALSE)
plotPCA(vsd, intgroup=c("genotype","condition", "Rep"))

PCA-plot

ADD REPLY
0
Entering edit mode

I’m unfortunately too busy these days to provide such feedback on analyses. I reserve my support site time for questions about software and try to distinguish between those and questions about analysis. I’d recommend collaborating with a bioinformatician with experience in RNA-seq for more detailed feedback.

ADD REPLY

Login before adding your answer.

Traffic: 594 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6