Question: Design matrix: DESeq2
0
gravatar for Gyan Prakash Mishra
7 months ago by
INDIA
Gyan Prakash Mishra0 wrote:

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 • 158 views
ADD COMMENTlink modified 7 months ago • written 7 months ago by Gyan Prakash Mishra0
Answer: Design matrix: DESeq2
1
gravatar for Michael Love
7 months ago by
Michael Love25k
United States
Michael Love25k wrote:

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 COMMENTlink written 7 months ago by Michael Love25k

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 REPLYlink written 7 months ago by Gyan Prakash Mishra0

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 REPLYlink written 7 months ago by Michael Love25k
Please log in to add an answer.

Help
Access

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