How to reassign DESeqDataSet design to include newly added column to columnData
Entering edit mode
rnavabjj • 0
Last seen 3 months ago
United States

I would like to test for group-specific effects in my dataset. This contains a group, time and individual (ID) factors as is in the DESEQ2 Vignette under "Group-specific condition effects, individuals nested within groups". After adding a 'id.n' column to my dds, the vignette states:

"Now we can reassign our DESeqDataSet a design of ~ grp + grp:ind.n + grp:cnd, before we call DESeq. This new design will result in the following model matrix:"

It provides no information on reassigning the formula. I tried the following but the formula is linked to ibjects and this replaces it with language.

dds@design[[2]] <- 'group + group:ind.n+group:time'

Thank you for you help.

DESeq2 • 405 views
Entering edit mode
Last seen 36 minutes ago
United States

In Bioconductor, often there are dedicated "setter" and "getter" functions:

design(dds) <- ...

Another pointer, there is a way to see what functions are available for a specific object _and_ defined in a specific package, might be useful for you:

> showMethods(classes="DESeqDataSet", where=getNamespace("DESeq2"))


Function: design<- (package BiocGenerics)
object="DESeqDataSet", value="formula"
object="DESeqDataSet", value="matrix"


I was working at one point on trying to simplify retrieving this type of information, but haven't worked on it in a while:

Entering edit mode

Your timely response just saved my dissertation, Dr. Love. Thank you very much.

Entering edit mode

Hi Dr. Love, I'm revisiting this data and am getting the "full model matrix is less than full rank" error when I try to call DEseq2.

My ColData:

> dds.primary@colData
DataFrame with 28 rows and 4 columns
                         time     group          ID     id.n
                     <factor>  <factor> <character> <factor>
trained.11post.txt       post   trained          11       11
trained.11pre.txt        pre    trained          11       11
trained.16post.txt       post   trained          16       16
trained.16pre.txt        pre    trained          16       16
trained.17post.txt       post   trained          17       17
...                       ...       ...         ...      ...
untrained.19pre.txt      pre  untrained          19       19     post untrained           5       5 
untrained.5.pre.txt      pre  untrained           5       5     post untrained           6       6 
untrained.6.pre.txt      pre  untrained           6       6 

My design:

design(dds.primary)<- ~ group + group:id.n + group+time
Entering edit mode

Sorry, I don't have time to help with statistical consultation on the support site. I have to save my time for software related questions. I'd recommend to find a local statistician or someone familiar with linear models in R.


Login before adding your answer.

Traffic: 339 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6