0
$\begingroup$

I tried to install gviz in a conda environment, but that library seems to be incompatible to python and r. I tried to setup a clean environment using

conda create -n r -c conda-forge r-essentials jupyter

and then add the library with:

source activate r
conda install -c bioconda bioconductor-gviz

getting

UnsatisfiableError: The following specifications were found to be in conflict: - atk

I remove atk, but now I get:

UnsatisfiableError: The following specifications were found to be in conflict: - bioconductor-gviz - r-bindr

Does anyone manage to use gviz from within an jupyter notebook?

I also tried to install gviz from a running R-notebook with:

install.package('gviz')

Warning in install.packages : package ‘gviz’ is not available (for R version 3.4.3)

Same when I try 'bioconductor-gviz'.

$\endgroup$
  • 1
    $\begingroup$ The package is from Bioconductor, from the version you are using you should use:BiocInstall::biocLite("gviz") to be able to install it from R terminal $\endgroup$ – llrs Jan 7 at 13:37
  • $\begingroup$ Not sure what that means. $\endgroup$ – Sören Jan 7 at 14:02
  • 1
    $\begingroup$ That to install a package from Bioconductor you need to use a different command (not install.package), but the one I provided $\endgroup$ – llrs Jan 7 at 15:45
  • $\begingroup$ It does not seem to be an accepted command though.Error in loadNamespace(name) : there is no package called ‘BiocInstall’ $\endgroup$ – Sören Jan 7 at 16:22
3
$\begingroup$

Did you try following the installation instructions?

Try this in R:

source("https://bioconductor.org/biocLite.R")
BiocInstaller::biocLite(c("Gviz"))
$\endgroup$
  • $\begingroup$ Nope, I did not know, each package has its own way of installation. But the first line here was what I was missing. $\endgroup$ – Sören Jan 9 at 19:28
  • $\begingroup$ All Bioconductor packages are installed the same way. Though in general, reading the software documentation before use is always a good idea. They've changed the command from my answer a bit for R 3.5 and later (see Alex's answer), but for R < 3.5, this is the general way to install any Biocondoctor package. $\endgroup$ – Jared Andrews Jan 10 at 21:38
4
$\begingroup$
# Install the BiocManager package first
install.packages("BiocManager") 
library("BiocManager")

# Then install the Gviz package
BiocManager::install("Gviz")
$\endgroup$
1
$\begingroup$

Use BiocManager::install()

# Code
if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("Gviz", version = "3.8")

However, If R < 3.5.0 , please use the following for installing Bioconductor packages.

BiocInstaller::biocLite("Gviz") 
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.