Use new way of installing bioconductor

pull/772/head
Tim Head 2019-09-07 13:30:15 +02:00
rodzic e0b1d474bd
commit 0b839428cc
1 zmienionych plików z 26 dodań i 11 usunięć

Wyświetl plik

@ -340,17 +340,32 @@ class RBuildPack(PythonBuildPack):
]
if "r" in self.stencila_contexts:
scripts += [
(
"${NB_USER}",
# Install and register stencila library
r"""
R --quiet -e "source('https://bioconductor.org/biocLite.R'); biocLite('graph')" && \
R --quiet -e "devtools::install_github('stencila/r', ref = '361bbf560f3f0561a8612349bca66cd8978f4f24')" && \
R --quiet -e "stencila::register()"
""",
)
]
# new versions of R require a different way of installing bioconductor
if self.r_version.startswith("3.4"):
scripts += [
(
"${NB_USER}",
# Install and register stencila library
r"""
R --quiet -e "source('https://bioconductor.org/biocLite.R'); biocLite('graph')" && \
R --quiet -e "devtools::install_github('stencila/r', ref = '361bbf560f3f0561a8612349bca66cd8978f4f24')" && \
R --quiet -e "stencila::register()"
""",
)
]
else:
scripts += [
(
"${NB_USER}",
# Install and register stencila library
r"""
R --quiet -e "install.packages('BiocManager'); BiocManager::install(); BiocManager::install(c('graph'))" && \
R --quiet -e "devtools::install_github('stencila/r', ref = '361bbf560f3f0561a8612349bca66cd8978f4f24')" && \
R --quiet -e "stencila::register()"
""",
)
]
return super().get_build_scripts() + scripts