Dear Jason and Jim,

thanks for the fast reply, but although there are three tables 
successfully created in the report, all three contain the exact same 
results, which is the results of the last coefficient.
I have tried this both on a DESeq2 result including results coming from 
running dds <- DESeq(dds), but also from ddsNoPrior <- DESeq(dds, 
betaPrior=FALSE) and I'm still getting the same behaviour :-/
Do you have any idea why this is happening? Or do you have some mock 
RNA-seq data where it has worked for you (more than 2 conditions) that I 
could test it on?

Additionally, when I was mentioning having all results in one report, I 
did not clarify I meant having all results in one table.
What many scientists I have been analyzing RNAseq data for keep 
requesting is one big table that contains all common expressed genes 
between different tests, say like:

Gene_ID (incl. some additional info from biomart), Mut1/Ctrl (incl. 
logFC, p-value, padj), Mut2/Ctrl (incl. logFC, p-value, padj), Mut3/Ctrl 
(incl. logFC, p-value, padj)

Once they have this, they can easily click through it and add their 
additional filters (e.g., look for genes that are upregulated in 
Mut1/Ctrl and downregulated in Mut2/Ctrl, but do not change expression 
level in Mut3/Ctrl), like they are doing so far in Excel.
Do you think this would be something implemented in the future (input to 
pubilsh() a DESeqDataSet dds and an option for presenting all results in 
one table)?

In fact, I have such a data frame which I could publish at the end of 
the day (instead of the dds object), but I still like the boxplots that 
are generated when using the dds object as input.
Is there a way of adding such boxplots once a data frame is used as 
input to publish()?

Thanks again for your help,
Dimitra



On 01/22/2014 05:58 PM, Jason Hackney wrote:
> Hi Dimitra,
>
> Jim is completely correct about using `coef' to pull out the different 
> terms from your model.  I just wanted to add that in addition to the 
> one page-per result workflow he showed, you can call publish multiple 
> times on the same object and same report  using the different 
> coefficients, ending up with one page with multiple tables. So instead 
> of this:
>
>
>     So you want to do the paradigmatic
>
>     html <- HTMLReport(args go here)
>     publish(object, html, coef=2)
>     finish(html)
>
>     html <- HTMLReport(args go here)
>     publish(object, html, coef=3)
>     finish(html)
>
>
> You can just do:
> html <- HTMLReport(args go here)
> publish(object, html, coef = 2)
> publish(object, html, coef = 3)
> finish(html)
>
> Hope that's helpful,
>
> Jason
>
>
>     and like that until you have done all coefficients. Alternatively,
>     you can construct a vector of the short names for the html pages,
>     and the more descriptive names and run through using lapply():
>
>     sn <- resultNames(dds)[-1]
>     ln <- paste("Mutation", 1:3, "versus Control")
>
>     out <- lapply(1:3, function(x) {
>     tmp <- HTMLReport(sn[x], ln[x], basePath = myOutdir,
>     reportDirectory = "./DEreports")
>     publish(dds, tmp, coef = x+1, pvalueCutoff=0.1, factor =
>     colData(dds)$condition)
>     return(finish(tmp))})
>
>     Then you can make an index page to tie it all together
>
>     indx <- HTMLReport("index", "Look at these sweet results!")
>     publish(Link(out, report = indx), indx)
>     finish(index)
>
>     Best,
>
>     Jim
>
>
>
>
>         finish(desReport)
>
>         The above returns by default results for the last coefficient
>         from resultsNames, in my case: "condition_Mut3_vs_Ctrl".
>
>         Is there a way to by-pass this default behaviour and output
>         either:
>         a. all results in one report, or
>         b. each one of the results in a separate report, specifying
>         this somehow to publish(), e.g.:
>         publish(dds,name="condition_Mut2_vs_Ctrl", desReport,
>         pvalueCutoff=0.1, factor=colData(dds)$condition)
>         Or do I need to create a new dds_Mut2_over_Ctrl, subsetting
>         the initial dds (which I don't know how to do and this would
>         be my next question, especially to the DESeq2 people).
>         I would like to avoid breaking the analysis into 3 comparisons
>         from the beginning (meaning constructing 3 different
>         DESeqDataSets and running the differential expression analysis
>         on them).
>
>         Thanks in advance,
>         Dimitra
>
>
>     -- 
>     James W. MacDonald, M.S.
>     Biostatistician
>     University of Washington
>     Environmental and Occupational Health Sciences
>     4225 Roosevelt Way NE, # 100
>     Seattle WA 98105-6099
>
>
>     _______________________________________________
>     Bioconductor mailing list
>     Bioconductor@r-project.org <mailto:Bioconductor@r-project.org>
>     https://stat.ethz.ch/mailman/listinfo/bioconductor
>     Search the archives:
>     http://news.gmane.org/gmane.science.biology.informatics.conductor
>
>
>
>
> -- 
> Jason A. Hackney, Ph.D.
> Bioinformatics and Computational Biology
> Genentech
> hackney.jason@gene.com <mailto:hackney.jason@gene.com>
> 650-467-5084
>
>
>
>
> On Wed, Jan 22, 2014 at 7:02 AM, James W. MacDonald <jmacdon@uw.edu 
> <mailto:jmacdon@uw.edu>> wrote:
>
>     Hi Dimitra,
>
>
>
>     On 1/22/2014 6:29 AM, Dimitra Alexopoulou wrote:
>
>         Dear all,
>
>         I've been happily using ReportingTools to publish an html
>         report of my DESeq2 results so far having only two conditions
>         to compare (i.e. WT to KO).
>         I now have one Ctrl condition and three different mutations
>         (say Mut1, Mut2 and Mut3):
>
>         levels(condition) # my 4 different conditions
>         # [1] "Ctrl" "Mut1" "Mut2" "Mut3"
>
>         dds # my DESeqDataset, including the results
>         # class: DESeqDataSet
>         # dim: 24791 12
>         # exptData(0):
>         # assays(3): counts mu cooks
>         # rownames(24791): ENSMUSG00000000001 ENSMUSG00000000028 ...
>         ENSMUSG00000093778 ENSMUSG00000093789
>         # rowData metadata column names(31): baseMean baseVar ...
>         deviance maxCooks
>         # colnames(12): Ctrl_1 Ctrl_2 ... Mut3_2 Mut3_3
>         # colData names(2): condition sizeFactor
>
>         resultsNames(dds) # the results I have from DESeq2 saved in
>         the dds
>         # [1] "Intercept" "condition_Mut1_vs_Ctrl"
>         "condition_Mut2_vs_Ctrl" "condition_Mut3_vs_Ctrl"
>
>
>         When I want to create the html report of the DESeq2 results
>         obtained, I do the following:
>
>         # Creating the html report using ReportingTools:
>         desReport <- HTMLReport(shortName = "Blah_over_Ctrl_DEGs",
>         title = 'Blah detailed results',
>         basePath = myOutdir,
>         reportDirectory = "./DEreports"
>         )
>         publish(dds, desReport, pvalueCutoff=0.1, factor =
>         colData(dds)$condition)
>
>
>     From ?publish:
>
>     DESeqDataSet:
>     ‘publish(object, publicationType, factor = NULL, n = 1000,
>     pvalueCutoff = 0.01, lfc = 0, coef = NULL, make.plots = TRUE,
>     ..., name)’ To coerce a ‘DESeqDataSet’ to a ‘data.frame’, we
>     use the ‘results’ function from the ‘DESeq2’ package,
>     therefore one of ‘DESeq’, or something similar must be run
>     prior to ‘publish’. By default, the last coefficient from
>     ‘resultsNames’ is reported. Log fold changes, p-values and
>     adjusted p-values are taken directly from the DESeqDataSet.
>     Stripplots showing the expression values for each transcript
>     are produced based on the normalized counts from the
>     ‘DESeqDataSet’, grouped by the levels in ‘factor’.
>
>     So you want to do the paradigmatic
>
>     html <- HTMLReport(args go here)
>     publish(object, html, coef=2)
>     finish(html)
>
>     html <- HTMLReport(args go here)
>     publish(object, html, coef=3)
>     finish(html)
>
>     and like that until you have done all coefficients. Alternatively,
>     you can construct a vector of the short names for the html pages,
>     and the more descriptive names and run through using lapply():
>
>     sn <- resultNames(dds)[-1]
>     ln <- paste("Mutation", 1:3, "versus Control")
>
>     out <- lapply(1:3, function(x) {
>     tmp <- HTMLReport(sn[x], ln[x], basePath = myOutdir,
>     reportDirectory = "./DEreports")
>     publish(dds, tmp, coef = x+1, pvalueCutoff=0.1, factor =
>     colData(dds)$condition)
>     return(finish(tmp))})
>
>     Then you can make an index page to tie it all together
>
>     indx <- HTMLReport("index", "Look at these sweet results!")
>     publish(Link(out, report = indx), indx)
>     finish(index)
>
>     Best,
>
>     Jim
>
>
>
>
>         finish(desReport)
>
>         The above returns by default results for the last coefficient
>         from resultsNames, in my case: "condition_Mut3_vs_Ctrl".
>
>         Is there a way to by-pass this default behaviour and output
>         either:
>         a. all results in one report, or
>         b. each one of the results in a separate report, specifying
>         this somehow to publish(), e.g.:
>         publish(dds,name="condition_Mut2_vs_Ctrl", desReport,
>         pvalueCutoff=0.1, factor=colData(dds)$condition)
>         Or do I need to create a new dds_Mut2_over_Ctrl, subsetting
>         the initial dds (which I don't know how to do and this would
>         be my next question, especially to the DESeq2 people).
>         I would like to avoid breaking the analysis into 3 comparisons
>         from the beginning (meaning constructing 3 different
>         DESeqDataSets and running the differential expression analysis
>         on them).
>
>         Thanks in advance,
>         Dimitra
>
>
>     -- 
>     James W. MacDonald, M.S.
>     Biostatistician
>     University of Washington
>     Environmental and Occupational Health Sciences
>     4225 Roosevelt Way NE, # 100
>     Seattle WA 98105-6099
>
>
>     _______________________________________________
>     Bioconductor mailing list
>     Bioconductor@r-project.org <mailto:Bioconductor@r-project.org>
>     https://stat.ethz.ch/mailman/listinfo/bioconductor
>     Search the archives:
>     http://news.gmane.org/gmane.science.biology.informatics.conductor
>
>
>
>
> -- 
> Jason A. Hackney, Ph.D.
> Bioinformatics and Computational Biology
> Genentech
> hackney.jason@gene.com <mailto:hackney.jason@gene.com>
> 650-467-5084
>
>


-- 
Dimitra Alexopoulou, PhD
Deep Sequencing Group - SFB655
Affiliation:
DFG Research Center for Regenerative Therapies (CRTD)
Biotechnology Center (Biotec)
Technische Universität Dresden

postal address:
Deep Sequencing Group - SFB655
c/o
DFG-Center for Regenerative Therapies Dresden
Cluster of Excellence / TU Dresden
Fetscherstraße 105
01307 Dresden

Phone: +49 (351) 458 82362
Email: dimitraa(at)biotec.tu-dresden.de
Web: http://www.biotec.tu-dresden.de/

we are supported by:
SFB 655, CRTD, Biotec, EU FP7, EFRE


	[[alternative HTML version deleted]]

