Using DEP package with continuous variable for condition, rather than categorical in SummarizedExperiment object
Entering edit mode
Last seen 3.5 years ago

I have a question about the DEP r package. I didn't find the answer by looking at the documentation or the vignette (though I'm not an experienced r user, so I apologise if I missed it or didn't understand).

I would like to use a continuous variable in the condition column of my SummarizedExperiment object, rather than a categorical one (as in the example of the vignette).

The motivation is as follows: I have a number of different cell lines that I treat with different doses of a damaging agent. Using time-lapse microscopy I then track the motion of the cells of each type and at each dose level. I wish to see if cellular motility exhibits a dose dependence within cell lines and whether this putative positive/negative/no association between dose and speed (say) can be explained by comparing protein (and gene) expression. The level of correlation between speed and dose is a continuous variable between -1 and 1. I wish to use this continuous variable as the basis for my comparison (as the condition in my SummarizedExperiment object).

I could in principle discretise my continuous condition data into groups, but if I do that in the natural way for this example (positive association/negative association/uncorrelated) then one of the subgroups only has one member cell line (and no replicates of protein expression data), which I've been advised is a bad idea and information about the relative strengths of association is being lost.

Is it possible to run the analysis regressing against a continuous variable rather than categorical groups for the condition? This can, for instance, be done with the DEseq2 package - see my example code snippet below:

    cts <- data

    condition <- c(0.01,0.21,-0.26,-0.12,0.11,-0.19,0.02,0.06,-0.39,-0.33)

    lines <- c("A498","A549","H460","HCT116","LOXIMVI",

    coldata <-,condition)

    dds <- DESeqDataSetFromMatrix(countData = cts, colData = coldata, design= ~condition)

    dds <- DESeq(dds)


    res <- results(dds, name="condition")

I would appreciate any help and apologise in advance if any of this made no sense or I completely misunderstood something.

dep • 844 views
Entering edit mode
Last seen 11 weeks ago

This does not seem to be possible at the moment with DEP. If you look at this issue, there have been other request to allow more flexibility in the contrasts formula accepted by DEP, but there has been no answer so far. If you had your example to that issue, maybe the developer will be tempted to address this (more interest in the feature).

In principle one could modify the code, in the background the differential analysis uses limma, but it might be a bit of mess to extract the results in some reasonable manner.

Login before adding your answer.

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