Question: EnhancedVolcano: Error in unused argument
0
gravatar for ceciliaskcheuk
12 months ago by
ceciliaskcheuk0 wrote:

Hi there,

I am trying to make volcano plot using EnhancedVolcano to mark the gene label (using selectLab function) in different colours, but fail to do so. I have also looked into the suggestion in https://github.com/kevinblighe/EnhancedVolcano#highlighting-key-variables-via-custom-point-sizes, but with no luck.

I found out some functionality (e.g labCol, subtitle, caption, shape, pointSize, boxedlabels, drawConnectors, widthConnectors) in my session did not work, and return the below:

Error in EnhancedVolcano(res.annotA, lab = gene_nameAV, x = "log2FoldChange",  : 
  unused argument (labCol = "blue"), etc

Not sure if it is a version (1.0.1) problem... How could I upgrade the version? as the BiocManager::install('EnhancedVolcano') only install this older version for my R Packrat.

========================================================

Though I can still plot the basic function with the following functionalities:

EnhancedVolcano(res.annotA,
    lab = gene_nameA,
    x = 'log2FoldChange',
    y = 'padj',
    selectLab = gene_nameA_selected,   
    xlim = c(-3, 11),
    ylim = c(-1, 35),
    xlab = bquote(~Log[2]~ 'fold change'),
    ylab = bquote(~-Log[10]~adjusted~italic(P)),
    title = 'XXX',
    pCutoff = 0.05,
    FCcutoff = 1.0,
    transcriptPointSize = 1.5,
    transcriptLabSize = 4.0,
    col=c('black', 'orange', 'red3', 'green'),
    colAlpha = 1,
    cutoffLineType = 'dotted',
    cutoffLineCol = 'grey50',
    cutoffLineWidth = 0.8,
    legend=c("Not significant","Log|Fold Change|>1","adj-p<0.05","adj-p<0.05 & Log|Fold Change|>1"),
    legendPosition = 'bottom',
    legendLabSize = 13,
    legendIconSize = 2.0,
    colConnectors = 'grey30'
    )

Any idea on how to highlight certain gene label/point (in different shape/colour) would be very much appreciated :)

====================

Here is my sessionInfo()

R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252 
[2] LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

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

other attached packages:
 [1] dplyr_0.8.3           EnhancedVolcano_1.0.1 ggrepel_0.8.1        
 [4] ggplot2_3.2.1         biomaRt_2.38.0        GenomicRanges_1.34.0 
 [7] GenomeInfoDb_1.18.2   IRanges_2.16.0        S4Vectors_0.20.1     
[10] BiocGenerics_0.28.0  

loaded via a namespace (and not attached):
 [1] httr_1.4.1                  Biobase_2.42.0             
 [3] bit64_0.9-7                 splines_3.5.2              
 [5] Formula_1.2-3               assertthat_0.2.1           
 [7] BiocManager_1.30.4          latticeExtra_0.6-28        
 [9] blob_1.2.0                  GenomeInfoDbData_1.2.0     
[11] yaml_2.2.0                  progress_1.2.2             
[13] pillar_1.4.2                RSQLite_2.1.2              
[15] backports_1.1.4             lattice_0.20-38            
[17] glue_1.3.1                  digest_0.6.20              
[19] RColorBrewer_1.1-2          XVector_0.22.0             
[21] checkmate_1.9.4             colorspace_1.4-1           
[23] htmltools_0.3.6             Matrix_1.2-17              
[25] DESeq2_1.22.2               XML_3.98-1.20              
[27] pkgconfig_2.0.2             genefilter_1.64.0          
[29] zlibbioc_1.28.0             purrr_0.3.2                
[31] xtable_1.8-4                scales_1.0.0               
[33] BiocParallel_1.16.6         htmlTable_1.13.1           
[35] tibble_2.1.3                annotate_1.60.1            
[37] withr_2.1.2                 SummarizedExperiment_1.12.0
[39] nnet_7.3-12                 lazyeval_0.2.2             
[41] survival_2.43-3             magrittr_1.5               
[43] crayon_1.3.4                evaluate_0.14              
[45] memoise_1.1.0               foreign_0.8-71             
[47] prettyunits_1.0.2           tools_3.5.2                
[49] data.table_1.12.2           hms_0.5.1                  
[51] matrixStats_0.54.0          stringr_1.4.0              
[53] locfit_1.5-9.1              munsell_0.5.0              
[55] cluster_2.0.7-1             DelayedArray_0.8.0         
[57] AnnotationDbi_1.44.0        packrat_0.5.0              
[59] compiler_3.5.2              rlang_0.4.0                
[61] grid_3.5.2                  RCurl_1.95-4.12            
[63] rstudioapi_0.10             htmlwidgets_1.3            
[65] rmarkdown_1.15              bitops_1.0-6               
[67] base64enc_0.1-3             gtable_0.3.0               
[69] DBI_1.0.0                   R6_2.4.0                   
[71] gridExtra_2.3               knitr_1.24                 
[73] bit_1.1-14                  zeallot_0.1.0              
[75] Hmisc_4.2-0                 stringi_1.4.3              
[77] Rcpp_1.0.2                  vctrs_0.2.0                
[79] geneplotter_1.60.0          rpart_4.1-13               
[81] acepack_1.4.1               tidyselect_0.2.5           
[83] xfun_0.9         
rna-seq software error • 1.4k views
ADD COMMENTlink modified 12 months ago by RamRS30k • written 12 months ago by ceciliaskcheuk0

Please use the formatting bar (especially the code option) to present your post better. You can use backticks for inline code (`text` becomes text), or select a chunk of text and use the highlighted button to format it as a code block. I've done it for you this time.
code_formatting

ADD REPLYlink written 12 months ago by RamRS30k
0
gravatar for Kevin Blighe
12 months ago by
Kevin Blighe65k
Kevin Blighe65k wrote:

Hey,

As you are using an old version of R, the installation of the package via BiocManager() will default to installing an older version of the package, too. If you want to obtain the most updated version, you have 2 options:

  • Upgrade your version of R to 3.6.x
  • install the version of the package direct from GitHub via
    devtools::install_github('kevinblighe/EnhancedVolcano')

Edit: all of the parameters that you need are available in v1.2 of the package. You acn see the additions / modifications in the NEWS file: https://bioconductor.org/packages/devel/bioc/news/EnhancedVolcano/NEWS

Kevin

ADD COMMENTlink modified 12 months ago • written 12 months ago by Kevin Blighe65k

Thanks both! I have tried staying in R3.5 but to install the new version via devtools, but the newly downloaded package is still in v1.0.1.

ADD REPLYlink written 12 months ago by ceciliaskcheuk0

devtools::install_github('kevinblighe/EnhancedVolcano') should just install the code 'as is' from the GitHub repository, which is the most updated code. Can you show me the output of the command?

ADD REPLYlink written 12 months ago by Kevin Blighe65k

The output is as follows, with non-zero exit for installation. Thus it shouldn't be the newly downloaded package is in v1.0.1, somehow R have 2 copies of the old version of the pakage I think.

devtools::install_github('kevinblighe/EnhancedVolcano')

Downloading GitHub repo kevinblighe/EnhancedVolcano@master
√  checking for file 'C:\Users\Admin\AppData\Local\Temp\RtmpQZ4mts\remotes33468035b37\kevinblighe-EnhancedVolcano-b7aab27/DESCRIPTION' (409ms)
-  preparing 'EnhancedVolcano':
√  checking DESCRIPTION meta-information ...
-  checking for LF line-endings in source and make files and shell scripts
-  checking for empty or unneeded directories
-  building 'EnhancedVolcano_1.3.5.tar.gz'

Installing package into �C:/Users/Admin/Documents/R/win-library/3.5�
(as �lib� is unspecified)
* installing *source* package 'EnhancedVolcano' ...
** R
** inst
** byte-compile and prepare package for lazy loading
Error : (converted from warning) package 'ggplot2' was built under R version 3.5.3
ERROR: lazy loading failed for package 'EnhancedVolcano'
* removing 'C:/Users/Admin/Documents/R/win-library/3.5/EnhancedVolcano'
* restoring previous 'C:/Users/Admin/Documents/R/win-library/3.5/EnhancedVolcano'
In R CMD INSTALL
installation of package �C:/Users/Admin/AppData/Local/Temp/RtmpQZ4mts/file3343afb5079/EnhancedVolcano_1.3.5.tar.gz� had non-zero exit status

session_info()

- Session info --------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.5.2 (2018-12-20)
 os       Windows >= 8 x64            
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  English_United Kingdom.1252 
 ctype    English_United Kingdom.1252 
 tz       Europe/London               
 date     2019-09-12                  

- Packages ------------------------------------------------------------------------------------------------------
 ! package     * version date       lib source        
   assertthat    0.2.1   2019-03-21 [1] CRAN (R 3.5.3)
   backports     1.1.4   2019-04-10 [1] CRAN (R 3.5.3)
   BiocManager   1.30.4  2018-11-13 [1] CRAN (R 3.5.2)
   callr         3.3.1   2019-07-18 [1] CRAN (R 3.5.3)
   cli           1.1.0   2019-03-19 [1] CRAN (R 3.5.3)
   crayon        1.3.4   2017-09-16 [1] CRAN (R 3.5.2)
   curl          4.0     2019-07-22 [1] CRAN (R 3.5.3)
   desc          1.2.0   2018-05-01 [1] CRAN (R 3.5.3)
   devtools    * 2.2.0   2019-09-07 [1] CRAN (R 3.5.3)
   digest        0.6.20  2019-07-04 [1] CRAN (R 3.5.3)
   DT            0.8     2019-08-07 [1] CRAN (R 3.5.3)
   ellipsis      0.2.0.1 2019-07-02 [1] CRAN (R 3.5.3)
   fs            1.3.1   2019-05-06 [1] CRAN (R 3.5.3)
   glue          1.3.1   2019-03-12 [1] CRAN (R 3.5.3)
   htmltools     0.3.6   2017-04-28 [1] CRAN (R 3.5.2)
   htmlwidgets   1.3     2018-09-30 [1] CRAN (R 3.5.3)
   knitr         1.24    2019-08-08 [1] CRAN (R 3.5.3)
   magrittr      1.5     2014-11-22 [1] CRAN (R 3.5.2)
   memoise       1.1.0   2017-04-21 [1] CRAN (R 3.5.3)
   pkgbuild      1.0.5   2019-08-26 [1] CRAN (R 3.5.3)
   pkgload       1.0.2   2018-10-29 [1] CRAN (R 3.5.3)
   prettyunits   1.0.2   2015-07-13 [1] CRAN (R 3.5.3)
   processx      3.4.1   2019-07-18 [1] CRAN (R 3.5.3)
   ps            1.3.0   2018-12-21 [1] CRAN (R 3.5.3)
   R6            2.4.0   2019-02-14 [1] CRAN (R 3.5.2)
   Rcpp          1.0.2   2019-07-25 [1] CRAN (R 3.5.3)
   remotes       2.1.0   2019-06-24 [1] CRAN (R 3.5.3)
   rlang         0.4.0   2019-06-25 [1] CRAN (R 3.5.3)
   rprojroot     1.3-2   2018-01-03 [1] CRAN (R 3.5.2)
   rstudioapi    0.10    2019-03-19 [1] CRAN (R 3.5.3)
   sessioninfo   1.1.1   2018-11-05 [1] CRAN (R 3.5.3)
   testthat      2.2.1   2019-07-25 [1] CRAN (R 3.5.3)
   usethis     * 1.5.1   2019-07-04 [1] CRAN (R 3.5.3)
   withr         2.1.2   2018-03-15 [1] CRAN (R 3.5.2)
 V xfun          0.8     2019-08-21 [1] CRAN (R 3.5.3)
   yaml          2.2.0   2018-07-25 [1] CRAN (R 3.5.2)

[1] C:/Users/Admin/Documents/R/win-library/3.5
[2] C:/Program Files/R/R-3.5.2/library

 V -- Loaded and on-disk version mismatch.
ADD REPLYlink written 12 months ago by ceciliaskcheuk0

It looks like your R installation is under the Admin account? Maybe you will have to re-initialise R as administrator and then try again? Sorry about this.

ADD REPLYlink written 12 months ago by Kevin Blighe65k

Thanks, I have just tried with a clean R session running as administrator but got the same output devtools::install_github('kevinblighe/EnhancedVolcano')

Downloading GitHub repo kevinblighe/EnhancedVolcano@master
√  checking for file 'C:\Users\Admin\AppData\Local\Temp\Rtmpg9lZoi\remotes3080902540d\kevinblighe-EnhancedVolcano-b7aab27/DESCRIPTION' (378ms)
-  preparing 'EnhancedVolcano':
√  checking DESCRIPTION meta-information ...
-  checking for LF line-endings in source and make files and shell scripts
-  checking for empty or unneeded directories
-  building 'EnhancedVolcano_1.3.5.tar.gz'

Installing package into �C:/Users/Admin/Documents/R/win-library/3.5�
(as �lib� is unspecified)
* installing *source* package 'EnhancedVolcano' ...
** R
** inst
** byte-compile and prepare package for lazy loading
Error : (converted from warning) package 'ggplot2' was built under R version 3.5.3
ERROR: lazy loading failed for package 'EnhancedVolcano'
* removing 'C:/Users/Admin/Documents/R/win-library/3.5/EnhancedVolcano'
* restoring previous 'C:/Users/Admin/Documents/R/win-library/3.5/EnhancedVolcano'
In R CMD INSTALL
installation of package �C:/Users/Admin/AppData/Local/Temp/Rtmpg9lZoi/file308017966a75/EnhancedVolcano_1.3.5.tar.gz� had non-zero exit status


R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

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

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.2        rstudioapi_0.10   knitr_1.24        magrittr_1.5      usethis_1.5.1     devtools_2.2.0   
 [7] pkgload_1.0.2     R6_2.4.0          rlang_0.4.0       tools_3.5.2       pkgbuild_1.0.5    DT_0.8           
[13] xfun_0.9          sessioninfo_1.1.1 cli_1.1.0         withr_2.1.2       remotes_2.1.0     htmltools_0.3.6  
[19] ellipsis_0.2.0.1  yaml_2.2.0        assertthat_0.2.1  digest_0.6.20     rprojroot_1.3-2   crayon_1.3.4     
[25] processx_3.4.1    callr_3.3.1       fs_1.3.1          htmlwidgets_1.3   ps_1.3.0          curl_4.0         
[31] testthat_2.2.1    glue_1.3.1        memoise_1.1.0     compiler_3.5.2    desc_1.2.0        backports_1.1.4  
[37] prettyunits_1.0.2
ADD REPLYlink modified 12 months ago • written 12 months ago by ceciliaskcheuk0

grrr... not seen this before. How about these commands, after a fresh session start (and preferably computer restart):

Update Bioc:

BiocManager::install()

Install EnhancedVolcano dev from main Bioconductor repo (not my personal GitHub repo)

BiocManager::install(version='devel')
BiocManager::install("EnhancedVolcano")

Otherwise, if this fails, I can only suggest installing R 3.6.x. I have R 3.6.1 on my Windows 10 and Ubuntu 16.04; however, as a package maintainer, I always have to stay updated.

ADD REPLYlink written 12 months ago by Kevin Blighe65k

Yes, when I tried BiocManager::install(version='devel'), it said

Error: Bioconductor version '3.10' requires R version '3.6'; see https://bioconductor.org/install

As I am using packages that would be best to keep R at 3.5, I will try it only if I can upgrade my R version.

Thanks so much in looking into this together, very much appreciated.

ADD REPLYlink written 12 months ago by ceciliaskcheuk0

Hmmm, let's keep trying. Maybe you can uninstall the current version of the package, and then install the development version:

remove.packages('EnhancedVolcano')

...then restart..

devtools::install_github('kevinblighe/EnhancedVolcano')

Sorry about this. Working with package versions can be a nightmare...

ADD REPLYlink written 12 months ago by Kevin Blighe65k

Try updating ggplot2 first (courtesy RamRS )

ADD REPLYlink written 12 months ago by Kevin Blighe65k

Hi, Kevin,

This is such wonderful package for a newbie like me to process the differential expression study and built a volcano plot. It saved me a lot of time. Not even mention how beautiful it is.

However, I encountered the issue that the unsed augements of pointSize and labSize. I installed my R and all package within two months, therefore, all the package should be latest (I also keep updating all of them).

ADD REPLYlink written 11 months ago by andrea_chi0

Hey andrea, thank you for your kind words. Can you confirm the version of the EnhancedVolcano package that you are using? Bioconductor 3.10 was released a couple of days ago, and, with that, version 1.4 of the package.

ADD REPLYlink written 11 months ago by Kevin Blighe65k
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 2.3.0
Traffic: 1852 users visited in the last hour