phyloFlash icon indicating copy to clipboard operation
phyloFlash copied to clipboard

phyloFlash_heatmap.R breaks with `--no-split` option

Open kbseah opened this issue 9 years ago • 1 comments

With no-split option, get error message that 'axis.ticks.margin' is deprecated. Error message below...

$ phyloFlash_heatmap.R -v -d -o test01.png --library-name-from-file --no-split ./*.csv 
Loading required package: optparse
Loading libraries 
Selected phyloFlash libraries: 
./Day00_01_new ./Day00_02_new ./Day00_03_new ./Day02_01_new ./Day02_02_new 
./Day02_03_new ./Day05_01_new ./Day05_02_new ./Day05_03_new ./Day14_01_new 
./Day14_02_new ./Day14_03_new 

Loading CSV files... 
Reading:  ./Day00_01_new.phyloFlash.NTUabundance.csv 
Reading:  ./Day00_01_new.phyloFlash.report.csv 
Reading:  ./Day00_02_new.phyloFlash.NTUabundance.csv 
Reading:  ./Day00_02_new.phyloFlash.report.csv 
Reading:  ./Day00_03_new.phyloFlash.NTUabundance.csv 
Reading:  ./Day00_03_new.phyloFlash.report.csv 
Reading:  ./Day02_01_new.phyloFlash.NTUabundance.csv 
Reading:  ./Day02_01_new.phyloFlash.report.csv 
Reading:  ./Day02_02_new.phyloFlash.NTUabundance.csv 
Reading:  ./Day02_02_new.phyloFlash.report.csv 
Reading:  ./Day02_03_new.phyloFlash.NTUabundance.csv 
Reading:  ./Day02_03_new.phyloFlash.report.csv 
Reading:  ./Day05_01_new.phyloFlash.NTUabundance.csv 
Reading:  ./Day05_01_new.phyloFlash.report.csv 
Reading:  ./Day05_02_new.phyloFlash.NTUabundance.csv 
Reading:  ./Day05_02_new.phyloFlash.report.csv 
Reading:  ./Day05_03_new.phyloFlash.NTUabundance.csv 
Reading:  ./Day05_03_new.phyloFlash.report.csv 
Reading:  ./Day14_01_new.phyloFlash.NTUabundance.csv 
Reading:  ./Day14_01_new.phyloFlash.report.csv 
Reading:  ./Day14_02_new.phyloFlash.NTUabundance.csv 
Reading:  ./Day14_02_new.phyloFlash.report.csv 
Reading:  ./Day14_03_new.phyloFlash.NTUabundance.csv 
Reading:  ./Day14_03_new.phyloFlash.report.csv 
A total of 9 taxa were observed. Merging taxa with < 50 observations into " Other ". 
Removed taxa with < 50 observations. 8 taxa left. 
Rescaling counts to percentages 
Clustering... 
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
Found 8 taxa and 12 samples. 
Creating plot... 
Error: (converted from warning) `axis.ticks.margin` is deprecated. Please set `margin` property  of `axis.text` instead
=============================================================================
 ####  DEBUG Information -- please include with bug reports #### 
=============================================================================
 Encountered error: 
--------------------
Error: (converted from warning) `axis.ticks.margin` is deprecated. Please set `margin` property  of `axis.text` instead

 Session Info: 
---------------
R version 3.2.3 (2015-12-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 7 (wheezy)

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

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

other attached packages:
[1] gtable_0.1.2    ggdendro_0.1-17 reshape2_1.4.1  ggplot2_2.0.0  
[5] optparse_1.3.2 

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.3      digest_0.6.9     MASS_7.3-45      plyr_1.8.3      
 [5] magrittr_1.5     scales_0.3.0     stringi_1.0-1    getopt_1.20.0   
 [9] tools_3.2.3      stringr_1.0.0    munsell_0.4.2    colorspace_1.2-6
-----------------------------------------------------------------------------
 Call trace: 
-------------
  1: pF_main()
  2: plot.phyloFlash(pf, row.order = conf$options$rows, col.order = conf$options
  3: lapply(pf$row_dendro, g_make_dendro_plot, axis = axis)
  4: FUN(X[[i]], ...)
  5: theme(axis.ticks.length = unit(0, "null"), axis.ticks.margin = unit(0, "nul
  6: warning("`axis.ticks.margin` is deprecated. Please set `margin` property ",
  7: .signalSimpleWarning("`axis.ticks.margin` is deprecated. Please set `margin
  8: withRestarts({
    .Internal(.signalCondition(simpleWarning(msg, call), msg
  9: withOneRestart(expr, restarts[[1]])
  10: doWithOneRestart(return(expr), restart)
=============================================================================

kbseah avatar Feb 11 '16 15:02 kbseah

axis.ticks.margin was deprecated in ggplot2 version 2.0.0. I tried running the heatmap script on my own data using ggplot2 version 1.0.0. It works without no-split option, but when no-split is turned on, it throws up a different error and breaks:

$ phyloFlash_heatmap.R -v -d --library-name-from-file -o test.png --no-split ./772*.csv
Loading required package: optparse
Loading libraries 
Selected phyloFlash libraries: 
./772A_run2 ./772B_run2 ./772C_run2 ./772D_run2 ./772E_run2 ./772F_run2 

Loading CSV files... 
Reading:  ./772A_run2.phyloFlash.NTUabundance.csv 
Reading:  ./772A_run2.phyloFlash.report.csv 
Reading:  ./772B_run2.phyloFlash.NTUabundance.csv 
Reading:  ./772B_run2.phyloFlash.report.csv 
Reading:  ./772C_run2.phyloFlash.NTUabundance.csv 
Reading:  ./772C_run2.phyloFlash.report.csv 
Reading:  ./772D_run2.phyloFlash.NTUabundance.csv 
Reading:  ./772D_run2.phyloFlash.report.csv 
Reading:  ./772E_run2.phyloFlash.NTUabundance.csv 
Reading:  ./772E_run2.phyloFlash.report.csv 
Reading:  ./772F_run2.phyloFlash.NTUabundance.csv 
Reading:  ./772F_run2.phyloFlash.report.csv 
A total of 280 taxa were observed. Merging taxa with < 50 observations into " Other ". 
Removed taxa with < 50 observations. 46 taxa left. 
Rescaling counts to percentages 
Clustering... 
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
Found 46 taxa and 6 samples. 
Creating plot... 
Error: nrow(x) == nrow(y) is not TRUE
=============================================================================
 ####  DEBUG Information -- please include with bug reports #### 
=============================================================================
 Encountered error: 
--------------------
Error: nrow(x) == nrow(y) is not TRUE

 Session Info: 
---------------
R version 3.1.1 (2014-07-10)
Platform: x86_64-unknown-linux-gnu (64-bit)

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

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

other attached packages:
[1] gtable_0.1.2    ggdendro_0.1-17 reshape2_1.4.1  ggplot2_1.0.0  
[5] optparse_1.3.2 

loaded via a namespace (and not attached):
 [1] colorspace_1.2-4 digest_0.6.8     getopt_1.20.0    labeling_0.3    
 [5] MASS_7.3-37      munsell_0.4.2    plyr_1.8.1       proto_0.3-10    
 [9] Rcpp_0.11.6      scales_0.2.4     stringr_0.6.2    tools_3.1.1     
-----------------------------------------------------------------------------
 Call trace: 
-------------
  1: pF_main()
  2: plot.phyloFlash(pf, row.order = conf$options$rows, col.order = conf$options
  3: cbind_select(corder, gr_labels, gr_heatmaps, gr_trees, size = 1)
  4: do.call(cbind_max, c(arg_select(select, ...), list(size = size)))
  5: (function (..., size = grid::unit.pmax) 
{
    bind2 <- function(x, y) {

  6: Reduce(bind2, list(...))
  7: f(init, x[[i]])
  8: stopifnot(nrow(x) == nrow(y))
  9: stop(sprintf(ngettext(length(r), "%s is not TRUE", "%s are not all TRUE"), 
=============================================================================

kbseah avatar Feb 11 '16 16:02 kbseah