Question: DESeq2 DESeqDataSetFromTximport design formula
0
gravatar for stephensmith
2.4 years ago by
stephensmith0 wrote:

Hi,

I am doing some RNA-seq analysis and am running into the Matrix is not full rank error.

It has 16 samples, 8 different treatments so 2 samples per treatment

If i run this

ddsTxi= DESeqDataSetFromTximport( txi, colData= samples, design= ~condition)

it works but anything other than this, e.g.,

ddsTxi= DESeqDataSetFromTximport( txi, colData= samples, design= ~condition + eya1six1)

give the error.

 

Would it be best to just go with one column (condition) then paste together whichever factors I want to compare further down the line?

Thanks,

Stephen

 

deseq2 • 2.0k views
ADD COMMENTlink modified 2.4 years ago by sina.nassiri70 • written 2.4 years ago by stephensmith0
Answer: DESeq2 DESeqDataSetFromTximport design formula
0
gravatar for sina.nassiri
2.4 years ago by
sina.nassiri70
Switzerland/Lausanne
sina.nassiri70 wrote:

Not sure what you mean by "paste together whichever factors I want to compare further down the line", but the problem with matrix not being full rank is that the columns for condition and eya1six1 are linearly dependent in the design matrix, i.e. condition and eya1six1 are confounding. What's your end goal here?

PS: You can check whether your design matrix is full rank or not using is.fullrank() from the limma package.

 

ADD COMMENTlink modified 2.4 years ago • written 2.4 years ago by sina.nassiri70

I guess what I'd like to do is to be able to compare all samples which are expressing six1, eya1, or six1eya1 with the rest in order to increase my statistical significance.

So when I run contast I can call "six1eya1", "y", "n" or contrast= c("six1", "y", "n") etc.

I'm starting to think it might be easier to just run multiple DESeq2 tests with different design matrices for this.

ADD REPLYlink written 2.4 years ago by stephensmith0

You can load the data at first with design=~1, and then change the design as you like. After changing the design, you need to re-run DESeq() to have the estimates updated.

ADD REPLYlink written 2.4 years ago by Michael Love25k

Ah very nice. That means I won't have to rerun tximport every time.

Thank you very much Michael.

Finding salmon, tximport, deseq2 a very nice pipeline!

ADD REPLYlink written 2.4 years ago by stephensmith0
Thanks!
ADD REPLYlink written 2.4 years ago by Michael Love25k

Very new user. Thank you for the great work! I am wondering how can you change the design after you already import date using tximport? Could you give an example? Thank you!

ADD REPLYlink written 15 months ago by lorymoon20120

You can use design(dds) <- ~ ...

The important thing is only that you have to re-run DESeq() after you change the design.

ADD REPLYlink written 15 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: 176 users visited in the last hour