Question: Different results obtained from mroast and camera from Deseq2 counts
0
gravatar for jarod_v6@libero.it
21 months ago by
Italy
jarod_v6@libero.it40 wrote:

I have import data on deseq2 using tximport from rsem results.

After create the rlog object I  try to use mroast and camera on  some pathway. This is the script I use:

files <- list.files(path=path, pattern="*.ensembl.csv", full.names=T, recursive=FALSE)
tipo<-list()
result_camera<-data.frame("Ngenes"=numeric(),"Direction"=character(),"PValue"=numeric(),"name"=character(),stringsAsFactors = F)

result_mroast<-data.frame("NGenes" =numeric(),"PropDown"=numeric(),"PropUp"=numeric(),"Direction"=character(),"PValue"=numeric(),
                       "FDR"=numeric(),"PValue.Mixed"=numeric(), "FDR.Mixed" =numeric(),stringsAsFactors = F)
for(i in 1:length(files)){
  ao<-strsplit(files[i],"/")[[1]]
  name<-ao[9]
  listaGeni<- read.table(files[i],header=F,sep="\t")
  id=ids2indices(listaGeni$V1,rownames(v))
  condition<-factor(metadata$CONDITION)
  
  design<-model.matrix(formula(~ condition))
  gst.camera<-camera(v,id,design = design)
  
  pi<-mroast(v,index=id,design,nrot = 99)
  result_mroast<-rbind(result_mroast,data.frame(pi))
  result_camera<-rbind(result_camera,data.frame(gst.camera$NGenes,gst.camera$Direction,gst.camera$PValue,name))
}

There is some difference For camera for istance

28 Up 0.0748709564 Bcellsmemories.csv.ensembl.csv

for the mroast:

NGenes   PropDown     PropUp Direction PValue  FDR PValue.Mixed FDR.Mixed
Set1       28 0.00000000 0.25000000        Up   0.34 0.34         0.17      0.17

 sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS

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

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

other attached packages:
 [1] GSEABase_1.36.0            graph_1.52.0               annotate_1.52.1           
 [4] XML_3.98-1.9               AnnotationDbi_1.36.2       limma_3.30.13             
 [7] clusterProfiler_3.2.14     DOSE_3.0.10                biomaRt_2.30.0            
[10] pheatmap_1.0.8             tximportData_1.2.0         tximport_1.2.0            
[13] DESeq2_1.14.1              SummarizedExperiment_1.4.0 Biobase_2.34.0            
[16] GenomicRanges_1.26.4       GenomeInfoDb_1.10.3        IRanges_2.8.2             
[19] S4Vectors_0.12.2           BiocGenerics_0.20.0       

loaded via a namespace (and not attached):
 [1] tidyr_0.6.3         bit64_0.9-7         splines_3.3.2       Formula_1.2-1      
 [5] DO.db_2.9           latticeExtra_0.6-28 blob_1.1.0          RSQLite_2.0        
 [9] backports_1.1.0     lattice_0.20-35     digest_0.6.12       RColorBrewer_1.1-2
[13] XVector_0.14.1      checkmate_1.8.2     qvalue_2.6.0        colorspace_1.3-2   
[17] htmltools_0.3.6     Matrix_1.2-10       plyr_1.8.4          pkgconfig_2.0.1    
[21] genefilter_1.56.0   zlibbioc_1.20.0     xtable_1.8-2        GO.db_3.4.0        
[25] scales_0.4.1        BiocParallel_1.8.2  htmlTable_1.9       tibble_1.3.3       
[29] ggplot2_2.2.1       nnet_7.3-12         lazyeval_0.2.0      survival_2.41-3    
[33] magrittr_1.5        memoise_1.1.0       foreign_0.8-69      tools_3.3.2        
[37] data.table_1.10.4   stringr_1.2.0       munsell_0.4.3       locfit_1.5-9.1     
[41] cluster_2.0.6       rlang_0.1.1         grid_3.3.2          RCurl_1.95-4.8     
[45] htmlwidgets_0.8     igraph_1.0.1        bitops_1.0-6        base64enc_0.1-3    
[49] gtable_0.2.0        DBI_0.7             reshape2_1.4.2      gridExtra_2.2.1    
[53] knitr_1.16          bit_1.1-12          fastmatch_1.1-0     Hmisc_4.0-3        
[57] fgsea_1.0.2         stringi_1.1.5       GOSemSim_2.0.4      Rcpp_0.12.11       
[61] geneplotter_1.52.0  rpart_4.1-11        acepack_1.4.1  
limma camera mroast tximport • 543 views
ADD COMMENTlink modified 21 months ago by James W. MacDonald49k • written 21 months ago by jarod_v6@libero.it40

Note that you can get the estimated gene counts straight from the tximport list: txi$counts, you don't need DESeq2 here.

ADD REPLYlink written 21 months ago by Michael Love22k

so if I use tximport$counts I obtain total different results...(if mroast see up as direction then I found down)

ADD REPLYlink written 21 months ago by jarod_v6@libero.it40

I don't see what the problem is. Why would you expect roast() and camera() to give the same results? They're different tests, so naturally they will give different results. In this case, neither test gives a statistically significant result, so they pretty much agree.

As I say, what's the problem?

ADD REPLYlink modified 21 months ago • written 21 months ago by Gordon Smyth36k

I have this problem. Camera seem gave one results the mroast gave me  a little different results. You say this is normal. So the problem is what is the right method to choose when you question is to say if there is some enrichment in this list of data? with mroast don't have any significant change with camera yes

http://imgur.com/a/6dNqA

thanks for patience help

ADD REPLYlink written 21 months ago by jarod_v6@libero.it40
Answer: Different results obtained from mroast and camera from Deseq2 counts
0
gravatar for James W. MacDonald
21 months ago by
United States
James W. MacDonald49k wrote:

As Gordon already pointed out, mroast and camera do completely different tests! The right method to choose is the one that answers the biological question you are asking, not the one that gives you a significant result. If you are confused as to the difference, you should read the Goeman and Buhlmann paper that is referenced in both of the help files. Or you could simply read the help files for each of the functions you are using. You will find that you get better help if people think you are at least attempting to understand things for yourself, rather than expecting people on this forum to explain things that you could easily find for yourself. From ?mroast:

     'roast' and 'mroast' test whether any of the genes in the set are
     differentially expressed. They can be used for any microarray
     experiment which can be represented by a linear model. The design
     matrix for the experiment is specified as for the 'lmFit'
     function, and the contrast of interest is specified as for the
     'contrasts.fit' function. This allows users to focus on
     differential expression for any coefficient or contrast in a
     linear model. If 'contrast' is not specified, then the last
     coefficient in the linear model will be tested.

and from ?camera:

     'camera' and 'interGeneCorrelation' implement methods proposed by
     Wu and Smyth (2012). 'camera' performs a _competitive_ test in the
     sense defined by Goeman and Buhlmann (2007). It tests whether the
     genes in the set are highly ranked in terms of differential
     expression relative to genes not in the set. It has similar aims
     to 'geneSetTest' but accounts for inter-gene correlation. See
     'roast' for an analogous _self-contained_ gene set test.
ADD COMMENTlink written 21 months ago by James W. MacDonald49k

thanks so much!

ADD REPLYlink written 20 months ago by jarod_v6@libero.it40
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 337 users visited in the last hour