Problem in removing batch effect by DeSeq2
0
2
Entering edit mode
23 months ago

Dear all,

I have faced a problem with DESeqDataSetFromMatrix() function in DeSeq2. Here are a few rows of my coldata file.

Condition   Type
Patient1    Cancer  TCGA-13
Patient2    Cancer  TCGA-24
Patient3    Cancer  TCGA-24
Patient4    Cancer  TCGA-24
Patient5    Cancer  TCGA-24
Patient6    Cancer  TCGA-31
Patient7    Cancer  f4034d75-d533

and the following are a last few rows of it:

Normal171   Normal  GTEX-171
Normal172   Normal  GTEX-172
Normal173   Normal  GTEX-173
Normal174   Normal  GTEX-174
Normal175   Normal  GTEX-175
Normal176   Normal  GTEX-176
Normal177   Normal  GTEX-177
Normal178   Normal  GTEX-178
Normal179   Normal  GTEX-179
Normal180   Normal  GTEX-180

DESeqDataSetFromMatrix() function produced the following errors:

converting counts to integer mode
Error in checkFullRank(modelMatrix) : 
  the model matrix is not full rank, so the model cannot be fit as specified.
  One or more variables or interaction terms in the design formula are linear
  combinations of the others and must be removed.

  Please read the vignette section 'Model matrix not full rank':

  vignette('DESeq2')
In addition: Warning message:
In DESeqDataSet(se, design = design, ignoreRank) :
  some variables in design formula are characters, converting to factors

I changed the Type column in to 1 and 2 for tumor and normal samples, however I got the same error. Can you guide me how to solve this problem?

Regards
Nazanin

DeSeq2 batch-effect • 870 views
ADD COMMENT
0
Entering edit mode

What is your design?

ADD REPLY
0
Entering edit mode

Here is the command I used and got the error

dds <- DESeqDataSetFromMatrix(countData = cts, colData = coldata, design = ~ Type + Condition)
ADD REPLY
0
Entering edit mode

It's not possible. Each patient has a unique ID, so condition is nested with itself. You cannot correct anything here, all cancer is TCGA and all normals is GTEX, is is confounded by that.

ADD REPLY

Login before adding your answer.

Traffic: 889 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