maftools icon indicating copy to clipboard operation
maftools copied to clipboard

plotmafSummary version dependent error

Open diegollarrull opened this issue 7 years ago • 6 comments

Hi, I'm running the same app in two different machines, my laptop and a workstation. In one, the code works just fine, in the second one, it fails with the following error:

Warning: Error in graphics::layout: argument "p" is missing, with no default
  97: graphics::layout
  96: layout.matrix
  94: dashboard
  93: plotmafSummary
  89: <reactive:procesar_info> [tab_filtrado.R#66]
  73: procesar_info
  72: observeEventHandler [tab_filtrado.R#47]
   1: runApp

The offending lines are:

info.maf <- readMaf(nombre_usar)
maf.plotsum <- plotmafSummary(info.maf, addStat = 'median', dashboard = TRUE)

The MAF file (info.maf) is correctly read:

>print(info.maf)

An object of class  MAF 
                  ID summary Mean Median
1:        NCBI_Build  GRCh37   NA     NA
2:            Center       .   NA     NA
3:           Samples       1   NA     NA
4:            nGenes      36   NA     NA
5:   Frame_Shift_Del       1    1      1
6: Missense_Mutation      51   51     51
7:       Splice_Site       2    2      2
8:             total      54   54     54

It seems that there is some change in the signature of the underlying function graphics::layout

R sessionInfo() for the workstation (running ok):

R version 3.4.3 (2017-11-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS: /opt/R-3.4.3/lib/libRblas.so
LAPACK: /opt/R-3.4.3/lib/libRlapack.so

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=es_AR.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=es_AR.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=es_AR.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] maftools_1.4.28     Biobase_2.38.0      BiocGenerics_0.24.0

loaded via a namespace (and not attached):
 [1] bitops_1.0-6               matrixStats_0.53.1        
 [3] bit64_0.9-7                doParallel_1.0.11         
 [5] RColorBrewer_1.1-2         progress_1.1.2            
 [7] httr_1.3.1                 GenomeInfoDb_1.14.0       
 [9] tools_3.4.3                R6_2.3.0                  
[11] DBI_0.8                    lazyeval_0.2.1            
[13] colorspace_1.3-2           GetoptLong_0.1.6          
[15] gridExtra_2.3              prettyunits_1.0.2         
[17] RMySQL_0.10.14             bit_1.1-12                
[19] compiler_3.4.3             DelayedArray_0.4.1        
[21] pkgmaker_0.22              slam_0.1-42               
[23] rtracklayer_1.38.3         scales_1.0.0              
[25] NMF_0.21.0                 stringr_1.3.1             
[27] digest_0.6.18              Rsamtools_1.30.0          
[29] XVector_0.18.0             pkgconfig_2.0.1           
[31] changepoint_2.2.2          BSgenome_1.46.0           
[33] rlang_0.3.0.1              GlobalOptions_0.0.13      
[35] RSQLite_2.0                shape_1.4.4               
[37] bindr_0.1.1                zoo_1.8-1                 
[39] mclust_5.4                 BiocParallel_1.12.0       
[41] dplyr_0.7.4                VariantAnnotation_1.24.5  
[43] RCurl_1.95-4.10            magrittr_1.5              
[45] GenomeInfoDbData_1.0.0     wordcloud_2.5             
[47] Matrix_1.2-12              Rcpp_0.12.19              
[49] munsell_0.5.0              S4Vectors_0.16.0          
[51] stringi_1.1.7              SummarizedExperiment_1.8.1
[53] zlibbioc_1.24.0            plyr_1.8.4                
[55] grid_3.4.3                 blob_1.1.1                
[57] ggrepel_0.7.0              lattice_0.20-35           
[59] Biostrings_2.46.0          cowplot_0.9.2             
[61] splines_3.4.3              GenomicFeatures_1.30.3    
[63] circlize_0.4.3             ComplexHeatmap_1.17.1     
[65] pillar_1.2.1               GenomicRanges_1.30.3      
[67] rjson_0.2.15               rngtools_1.2.4            
[69] reshape2_1.4.3             codetools_0.2-15          
[71] biomaRt_2.34.2             stats4_3.4.3              
[73] XML_3.98-1.10              glue_1.2.0                
[75] data.table_1.10.4-3        foreach_1.4.4             
[77] gtable_0.2.0               assertthat_0.2.0          
[79] ggplot2_3.1.0.9000         gridBase_0.4-7            
[81] xtable_1.8-2               survival_2.41-3           
[83] tibble_1.4.2               iterators_1.0.9           
[85] GenomicAlignments_1.14.1   AnnotationDbi_1.40.0      
[87] registry_0.5               memoise_1.1.0             
[89] IRanges_2.12.0             bindrcpp_0.2              
[91] cluster_2.0.6  

R sessionInfo() for the laptop (showing this error):

R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 19

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so

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=es_AR.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=es_AR.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=es_AR.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] maftools_1.8.10     Biobase_2.42.0      BiocGenerics_0.28.0

loaded via a namespace (and not attached):
 [1] splines_3.5.1               foreach_1.4.4              
 [3] assertthat_0.2.0            stats4_3.5.1               
 [5] BSgenome_1.50.0             GenomeInfoDbData_1.2.0     
 [7] Rsamtools_1.34.0            ggrepel_0.8.0              
 [9] pillar_1.3.0                lattice_0.20-38            
[11] glue_1.3.0                  digest_0.6.18              
[13] GenomicRanges_1.34.0        RColorBrewer_1.1-2         
[15] XVector_0.22.0              colorspace_1.3-2           
[17] cowplot_0.9.3               Matrix_1.2-15              
[19] plyr_1.8.4                  XML_3.98-1.16              
[21] pkgconfig_2.0.2             bibtex_0.4.2               
[23] GetoptLong_0.1.7            zlibbioc_1.28.0            
[25] purrr_0.2.5                 xtable_1.8-3               
[27] scales_1.0.0                BiocParallel_1.16.0        
[29] tibble_1.4.2                pkgmaker_0.27              
[31] IRanges_2.16.0              ggplot2_3.1.0              
[33] withr_2.1.2                 SummarizedExperiment_1.12.0
[35] lazyeval_0.2.1              survival_2.43-1            
[37] magrittr_1.5                crayon_1.3.4               
[39] mclust_5.4.2                doParallel_1.0.14          
[41] NMF_0.21.0                  tools_3.5.1                
[43] registry_0.5                data.table_1.11.8          
[45] GlobalOptions_0.1.0         matrixStats_0.54.0         
[47] gridBase_0.4-7              ComplexHeatmap_1.20.0      
[49] stringr_1.3.1               S4Vectors_0.20.0           
[51] munsell_0.5.0               cluster_2.0.7-1            
[53] rngtools_1.3.1              DelayedArray_0.8.0         
[55] bindrcpp_0.2.2              Biostrings_2.50.0          
[57] compiler_3.5.1              GenomeInfoDb_1.18.0        
[59] rlang_0.3.0.1               grid_3.5.1                 
[61] RCurl_1.95-4.11             iterators_1.0.10           
[63] rjson_0.2.20                circlize_0.4.5             
[65] bitops_1.0-6                gtable_0.2.0               
[67] codetools_0.2-15            reshape2_1.4.3             
[69] R6_2.3.0                    GenomicAlignments_1.18.0   
[71] gridExtra_2.3               dplyr_0.7.8                
[73] rtracklayer_1.42.0          bindr_0.1.1                
[75] shape_1.4.4                 stringi_1.2.4              
[77] Rcpp_1.0.0                  wordcloud_2.6              
[79] tidyselect_0.2.5   

diegollarrull avatar Nov 28 '18 15:11 diegollarrull

Hi @diegollarrull ,

Please accept my apologies for late reply as I was on vacation. plotMafSummary function had ggplot code in version 1.4 but later migrated to base R after 1.6. Regardless they should work fine. Problem here is, you have only one sample. Most of maftools function won't work with single sample - could you please try with more samples and see if it helps ?

PoisonAlien avatar Dec 17 '18 10:12 PoisonAlien

Hi @PoisonAlien , I have the same issue.

I am tempted to use v1.4. Is there any reason I should no of not to do so?

Thanks in advance.

cgpu avatar Oct 09 '19 09:10 cgpu

Hi @cgpu , Sorry for the late reply. Do you still have the issue? You should definitely update the package since v1.4 is way too old.

PoisonAlien avatar Oct 22 '19 15:10 PoisonAlien

Hey @PoisonAlien, thanks for the reply much appreciated. Still have the issue, I was very tempted to use the old old version because of ggplot 😄 but I have conflicts with other packages so I put this in icebox atm.

I swear that when I run the first few plots it worked, but when I knit I get this:

## Error in graphics::layout(p, ...): argument "p" is missing, with no default

image

The weird thing is some of the plots look fine (eg the bottom one here).

Have you come across this again?

If you have a working example, would you mind sharing the sessionInfo so I can check the package versions?

Thanks for the help! Christina

cgpu avatar Oct 22 '19 18:10 cgpu

Ah! Okat, This issue similar to #387 Loading plotly conflicts with layout function from base. I will take care of it soon :)

PoisonAlien avatar Oct 23 '19 13:10 PoisonAlien

Ah! Okat, This issue similar to #387 Loading plotly conflicts with layout function from base. I will take care of it soon :)

Ah that's awesome news - I can afford to not include plotly actually for this iteration so all good! Thank you for the help and such a prompt response. Feel free to use me as a tester for any update, would be happy to help if I can.

cgpu avatar Oct 23 '19 14:10 cgpu