[BioC] DESeq2 with multiple groups

Michael Love michaelisaiahlove at gmail.com
Tue Jun 18 14:05:15 CEST 2013


hi Lorena,

On Tue, Jun 18, 2013 at 1:40 PM, Lorena Pantano
<lorena.pantano at gmail.com> wrote:
> I have a table with individuals that have two more groups beside the
> condition column: like sex and population. Could I put as formula ~
> conditions +sex +population, and when I retrieve the results from Condition,
> will I get only DE genes that are due to the condition and not due to sex or
> population?
>

Yes, you can use a design formula like you have written to control for
sex and population, and then retrieve the results for only the
'condition' variable. Better would be to put 'condition' at the end of
the design, so that it is the default variable used by results() and
plotMA(). The results function has an argument 'name', which specifies
which variable+factor-level which should be used for constructing the
results DataFrame. By default, the last factor level of the last
variable is used. This is discussed in the vignette and in the man
page for results().

The resultsNames() function will return the possible names which you
can supply to the 'name' argument of results():

resultsNames(dds)

-Mike



More information about the Bioconductor mailing list