csortu / MDAuR

Scripts and data for book: Molecular Data Analysis using R
8 stars 8 forks source link

Your Excellent Book "Molecular Data Analysis Using R" #6

Open SSJUSA opened 3 years ago

SSJUSA commented 3 years ago

I bought your excellent book "Molecular Data Analysis Using R, Wiley 2017" in the United States, on Amazon.com.

R Program on pages 34 and 35 and figure 2.5 is NOT working with latest R programming Language version. The GenomeGraphs library is no longer available with latest R programming.

Is there a way (alternate or work around) to make this R program to work and output the graphs shown on page 35, figure 2.5 please?

Error messages are given below.

Thanks and best regards, SSJ

if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")

BiocManager::install("GenomeGraphs")

'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details

replacement repositories: CRAN: https://cran.r-project.org

Bioconductor version 3.12 (BiocManager 1.30.12), R 4.0.3 (2020-10-10)

Installing package(s) 'GenomeGraphs'

Warning message: "package 'GenomeGraphs' is not available for this version of R

A version of this package for your version of R might be available elsewhere, see the ideas at https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages" Installation paths not writeable, unable to update packages path: C:/Program Files/R/R-4.0.3/library packages: cluster, codetools, foreign, lattice, mgcv, nlme, survival

Old packages: 'BiocManager', 'boot', 'bslib', 'cachem', 'caret', 'class', 'colorspace', 'corrplot', 'curl', 'dendextend', 'diptest', 'dplyr', 'ellipsis', 'hms', 'httpuv', 'IRkernel', 'KernSmooth', 'magick', 'MASS', 'Matrix', 'MSnbase', 'nnet', 'openssl', 'pillar', 'processx', 'rlang', 'rmarkdown', 'rsvg', 'rtracklayer', 'sass', 'spatial', 'stringi', 'systemPipeR', 'tibble', 'tidyselect', 'V8', 'viridis', 'xfun'

library(GenomeGraphs)

Error in library(GenomeGraphs): there is no package called 'GenomeGraphs' Traceback:

  1. library(GenomeGraphs)

install.packages(GenomeGraphs)

Error in install.packages(GenomeGraphs): object 'GenomeGraphs' not found Traceback:

  1. install.packages(GenomeGraphs)
csortu commented 3 years ago

Hi,

Thank you for reminding me this issue, I will commit an update today.

Bad news: GenomeGraphs library was removed from Bioconductor with Bioconductor 3.11 release These examples are not working anymore and won't be fixed

Good news: There are replacement packages, I recommend ggbio if you want visually similar graphs as in the book, or Gviz if you want to go with more modern look.

I plan to add a new script for demoing these packages, but for a quick fix, I suggest you to read their own tutorials: http://www.bioconductor.org/packages/release/bioc/vignettes/Gviz/inst/doc/Gviz.html http://www.bioconductor.org/packages/release/bioc/vignettes/ggbio/inst/doc/ggbio.pdf

Csaba