Problem on annotation of Deseq2 on reportingtools
3
0
Entering edit mode
@jarod_v6liberoit-6654
Last seen 5.8 years ago
Italy

Dear all!,

I use this code:

dds <- DESeq(ddHTSeq)
res <-results(dds)
#reporting
library(ReportingTools)
library("org.Hs.eg.db")
des2Report <- HTMLReport(shortName ='RNAseq_analysis_DESeq2.html',title ='RNA-seq analysis of differential expression using DESeq2 ',reportDirectory = "./Reports")
#publish(dds,des2Report,pvalueCutoff=0.05,annotation.db="org,Hs.eg.db")
publish(dds,des2Report,pvalueCutoff=0.01,annotation.db="org.Hs.egENSEMBL2EG",factor=colData(dds)$condition,categorySize=5)
finish(des2Report)

and I have this error:
Error in results(object, resultName) :
  'contrast', as a character vector of length 3, should have the form:
contrast = c('factorName','numeratorLevel','denominatorLevel'),
see the manual page of ?results for more information


is.factor(colData(dds)$condition)
[1] TRUE
>
What can I do?

 sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8      
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8  
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C             
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C      

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods   base    

other attached packages:
 [1] pvclust_1.2-2             gplots_2.13.0             genefilter_1.44.0       
 [4] ReportingTools_2.2.0      knitr_1.6                 org.Hs.eg.db_2.10.1     
 [7] RSQLite_0.11.4            DBI_0.2-7                 annotate_1.40.1         
[10] AnnotationDbi_1.24.0      Biobase_2.22.0            biomaRt_2.18.0          
[13] DESeq2_1.4.5              RcppArmadillo_0.4.300.8.0 Rcpp_0.11.2             
[16] GenomicRanges_1.14.4      XVector_0.2.0             IRanges_1.20.7          
[19] BiocGenerics_0.8.0      

loaded via a namespace (and not attached):
 [1] AnnotationForge_1.4.4    Biostrings_2.30.1        biovizBase_1.10.8      
 [4] bitops_1.0-6             BSgenome_1.30.0          Category_2.28.0        
 [7] caTools_1.17             cluster_1.15.3           colorspace_1.2-4       
[10] dichromat_2.0-0          digest_0.6.4             edgeR_3.4.2            
[13] evaluate_0.5.5           formatR_0.10             Formula_1.1-1          
[16] gdata_2.13.3             geneplotter_1.40.0       GenomicFeatures_1.14.5 
[19] ggbio_1.10.16            ggplot2_1.0.0            GO.db_2.10.1           
[22] GOstats_2.28.0           graph_1.40.1             grid_3.1.1             
[25] gridExtra_0.9.1          GSEABase_1.24.0          gtable_0.1.2           
[28] gtools_3.4.1             Hmisc_3.14-4             hwriter_1.3            
[31] KernSmooth_2.23-13       lattice_0.20-29          latticeExtra_0.6-26    
[34] limma_3.18.13            locfit_1.5-9.1           MASS_7.3-34            
[37] Matrix_1.1-4             munsell_0.4.2            PFAM.db_2.10.1         
[40] plyr_1.8.1               proto_0.3-10             RBGL_1.38.0            
[43] RColorBrewer_1.0-5       RCurl_1.95-4.1           reshape2_1.4           
[46] R.methodsS3_1.6.1        R.oo_1.18.0              Rsamtools_1.14.3       
[49] rtracklayer_1.22.7       R.utils_1.32.4           scales_0.2.4           
[52] splines_3.1.1            stats4_3.1.1             stringr_0.6.2          
[55] survival_2.37-7          tools_3.1.1              VariantAnnotation_1.8.13
[58] XML_3.98-1.1             xtable_1.7-3             zlibbioc_1.8.0
Deseq2 reportingtools • 2.0k views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 6 days ago
United States

The problem might be that your package versions are not consistent.

Bioc 2.14 had DESeq2 v1.4 and ReportingTools v2.4

Bioc 3.0 (current release) has DESeq2 v1.6 and ReportingTools v2.6

You have: DESeq2 v1.4 and ReportingTools v2.2

Try updating ReportingTools with biocLite("ReportingTools"), and then you might also try updating Bioconductor to the current release (because if there did happen to be a bug, developers can only push fixes to the release or devel branches, not to past versions of Bioc).

ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 6 days ago
United States

I'm not exactly sure what the proper syntax should be for the hand off... but I'd recommend building the results table with DESeq2's results() function, then passing the results table, which is a DESeqResults object, to ReportingTools. This is supported by ReportingTools, and this way, the DESeq2 ?results documentation is right at hand. See ReportingTools ?publish for the DESeqResults method.

ADD COMMENT
0
Entering edit mode

I follow the manual but  I have always this error:

Error in results(object, resultName) :
  'contrast', as a character vector of length 3, should have the form:
contrast = c('factorName','numeratorLevel','denominatorLevel'),
see the manual page of ?results for more information

I don't understand why they request 3 element s and have 3 element:

 

Error in results(object, resultName) :
  'contrast', as a character vector of length 3, should have the form:
contrast = c('factorName','numeratorLevel','denominatorLevel'),
see the manual page of ?results for more information
> resultsNames(dds)
[1] "Intercept"            "NNV" "VI"
ADD REPLY
0
Entering edit mode

hi Jarod, 

Can you post your code where you follow my suggestion of handing res to ReportingTools. Is this giving an error?

ADD REPLY
0
Entering edit mode

Thanks so much for your help!!  Maybe I don't understand your suggestion.. I did this:

DESeqDataSet:
publish(object, publicationType, factor = NULL, n = 1000, pvalueCutoff = 0.01, lfc = 0, coef = NULL, make.plots = TRUE, ..., name)

I have write the results and I check if I have the 3 elements on the factors.

I have no error on res variable

#results

res <-results(dds)

If I try to use directly res on publish I have this error

publish(res,des2Report,pvalueCutoff=0.01,annotation.db="org.Hs.egENSEMBL2EG",factor=colData(dds)$condition,categorySize=5)
Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE,  :
  'row.names' should specify one of the variables
> ?publish

 

 

Thanks for the help!

ADD REPLY
0
Entering edit mode
@gabriel-becker-6000
Last seen 9.2 years ago
United States

Jarod,

I spoke with my co-maintainer (Jason Hackney) who understands the specific bio-related methods much better than I do and he suspects that Michael is correct that the issue arrises from a version mismatch between ReportingTools and DESeq2.

Did updating as Michael suggested solve your problem?

~G

ADD COMMENT

Login before adding your answer.

Traffic: 528 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6