Dynamic allocations possible when building DESeq object?
Entering edit mode
bas_work ▴ 10
Last seen 9 weeks ago


As we are trying to build a pipeline in KNIME, I was wondering if it is at all possible to dynamically allocate a string to the design when building a DESeq. To clarify:

In dds <- DESeqDataSetFromMatrix(countData = counts, colData = sample, design= ~ condition)

we would like to allow other users to change the design parameter to for example "genotype", assuming that there is a column "genotype" in the sample metadata. There are ways to in KNIME to dynamically change input, but we do not get it to work in this specific case. Is it at all possible? Many thanks in advance for your input.

Kind regards, Bas

deseq2 • 184 views
Entering edit mode
Last seen 7 hours ago
United States

Are you going to call DESeqDataSetFromMatrix() within another function?

I'd recommend using a design matrix in the design slot in that case and not a formula.

If you create a formula variable inside of a function, it's difficult (impossible?) to prevent the function from bundling up all the objects into the formula (and so bloating the dataset). I've looked into this but I haven't found a solution, aside from pushing the formula creation to the user (so outside of the function and in the global environment). This is what happens in DESeq2, and so there is no dataset bloat.

In order to allow other developers to programmatically run DESeqDataSetFromMatrix() inside of a function, I modified DESeq2 a while ago so that design can be a matrix as created by model.matrix().

Entering edit mode

No, we are not trying to call DESeqDataSetFromMatrix() within another function and we have come to the conclusion that it is not really possible. Anyway, thanks for your thoughtful response.

Kind regards, Bas


Login before adding your answer.

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