From ae18de32dabd4e49911863f638ef930c631e4e85 Mon Sep 17 00:00:00 2001 From: Rui He Date: Tue, 30 Jan 2024 15:04:07 -0500 Subject: [PATCH] feat: CI/CD and Conda Recipe --- .../workflows/Manual_Deployment_to_NIDAP.yml | 105 +++++++++++++++++ .github/workflows/gitflow-R-action.yml | 14 ++- Conda_Recipe/meta.yaml | 109 ++++++++++++++++++ .../Building_R_environment/DESCRIPTION | 41 +++++++ .../Building_R_environment/Generate_Renv.R | 44 +++++++ .../Building_R_environment/Initiate_Renv.R | 18 +++ .../Building_R_environment/Load_packages.R | 17 +++ .../Building_R_environment/package_list.txt | 6 + Dockerfile/Conda_container/Dockerfile | 91 ++++++++------- Dockerfile/Conda_container/environment.yml | 14 ++- .../Building_R_environment/DESCRIPTION | 5 +- 11 files changed, 415 insertions(+), 49 deletions(-) create mode 100644 .github/workflows/Manual_Deployment_to_NIDAP.yml create mode 100644 Conda_Recipe/meta.yaml create mode 100755 Dockerfile/Conda_container/Building_R_environment/DESCRIPTION create mode 100755 Dockerfile/Conda_container/Building_R_environment/Generate_Renv.R create mode 100755 Dockerfile/Conda_container/Building_R_environment/Initiate_Renv.R create mode 100644 Dockerfile/Conda_container/Building_R_environment/Load_packages.R create mode 100755 Dockerfile/Conda_container/Building_R_environment/package_list.txt diff --git a/.github/workflows/Manual_Deployment_to_NIDAP.yml b/.github/workflows/Manual_Deployment_to_NIDAP.yml new file mode 100644 index 0000000..2426e58 --- /dev/null +++ b/.github/workflows/Manual_Deployment_to_NIDAP.yml @@ -0,0 +1,105 @@ +name: Manual Deployment to NIDAP +run-name: Manual Deployment to NIDAP by ${{ github.actor }} + +on: + workflow_dispatch: + inputs: + + image_to_use: + required: true + default: "" + type: string + + package_to_deploy: + required: true + type: string + + artifact_rid: + required: true + default: "" + type: string + + token_to_use: + required: true + type: string + + +jobs: + Adding_documentation_files_and_publish_page: + runs-on: ubuntu-latest + container: + image: ${{ inputs.image_to_use }} + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + steps: + - run: echo "Checking in ${{ inputs.image_to_use }}" + - uses: actions/checkout@v3 + with: + token: ${{secrets.GITHUB_TOKEN}} + + - name: Continuous Deployment to NIDAP + id: nidap-cd + run: | + export current_wd="/__w/${GITHUB_REPOSITORY#*/}/${GITHUB_REPOSITORY#*/}" + cd $current_wd + + export MY_GIT_TOKEN=${{ secrets.GITHUB_TOKEN }} + export MY_GIT_USERNAME=${{ github.actor }} + export MY_GIT_EMAIL=${{ github.event.pusher.email }} + + git config --global user.name "$MY_GIT_USERNAME" + git config --global user.email "$MY_GIT_EMAIL" + git config --global url."https://api:$MY_GIT_TOKEN@github.com/".insteadOf "https://github.com/" + git config --global url."https://ssh:$MY_GIT_TOKEN@github.com/".insteadOf "ssh://git@github.com/" + git config --global url."https://git:$MY_GIT_TOKEN@github.com/".insteadOf "git@github.com:" + + git config --global --add safe.directory "$current_wd" + + git clone https://github.com/${GITHUB_REPOSITORY}.git + + cd ${GITHUB_REPOSITORY#*/} + + BRANCH_NAME="Conda_Package" + + git checkout $BRANCH_NAME + + echo "########## Git setup complete, moving to deployment... ##########" + + conda install curl + + current_pkg="${{ inputs.package_to_deploy }}" + + echo "Package to Upload: $current_pkg" + + TOKEN="${{ inputs.token_to_use }}" + PACKAGE="$current_pkg" + PLATFORM="linux-64" # replace with the package platform (e.g. noarch, linux-64, osx-64) + response=$(curl \ + -H "Authorization: Bearer $TOKEN" \ + -H "Content-Type: application/octet-stream" \ + --data-binary "@$PACKAGE" \ + -XPUT "https://nidap.nih.gov/artifacts/api/repositories/${{ inputs.artifact_rid }}/contents/release/conda/$PLATFORM/$PACKAGE" \ + 2>&1) + + + echo "#########################################################" + + current_datetime="$(date +"%Y-%m-%d %H:%M:%S")" + + # Check if the response contains an error message + if echo "$response" | grep -q "errorCode"; then + status=$(echo "$response" | grep -o '"errorName":"[^"]*' | awk -F'"' '{print $4}') + echo "Error message: $status" + echo "
Deployment Time: $current_datetime; Deployment Status: $status" >> README.md + else + status="Success" + echo "Update Success!" + echo "Package ${{ env.current_pkg }} is now on NIDAP." + echo "
Deployment Time: $current_datetime; Deployment Status: Success" >> README.md + fi + + git commit -a -m "Deployment Performed on $current_datetime with Status: $status." + + git push -f origin $BRANCH_NAME diff --git a/.github/workflows/gitflow-R-action.yml b/.github/workflows/gitflow-R-action.yml index ac68e6a..ccecd82 100644 --- a/.github/workflows/gitflow-R-action.yml +++ b/.github/workflows/gitflow-R-action.yml @@ -1,9 +1,9 @@ name: Gitflow Action for R Package Development -run-name: ${{ github.actor }} now ${{ github.event_name }} to ${{ github.ref_name }} +run-name: ${{ github.actor }} ${{ github.event_name }} to ${{ github.ref_name }} on: push: - branches: ['*', '!dev', '!main'] + branches: ['*', '!dev', '!main', '!release_dev', '!Conda_Package', '!github_page'] pull_request: types: ['opened', 'closed'] @@ -11,7 +11,13 @@ on: jobs: Activating_Parser: - uses: fnlcr-bids-sdsi/gitflow-R/.github/workflows/parser.yml@DSPWorkflow + uses: fnlcr-bids-sdsi/gitflow-R/.github/workflows/parser.yml@master with: image_to_use: ghcr.io/nidap-community/dsp_ci_cd:latest - + package_name: "r-dspworkflow" + r_version: "4.1.3" + artifact_rid_production: "ri.artifacts.main.repository.20ce29a2-3803-4eae-b325-8fe367d47d1e" + artifact_rid_development: "ri.stemma.main.repository.2172e505-c98f-43d4-881a-47e170aadbe1" + secrets: + NIDAP_TOKEN_PRODUCTION: ${{ secrets.NIDAP_TOKEN_PRODUCTION }} + NIDAP_TOKEN_DEVELOPMENT: ${{ secrets.NIDAP_TOKEN_DEVELOPMENT }} diff --git a/Conda_Recipe/meta.yaml b/Conda_Recipe/meta.yaml new file mode 100644 index 0000000..11c3854 --- /dev/null +++ b/Conda_Recipe/meta.yaml @@ -0,0 +1,109 @@ +{% set version = '' %} + +{% set posix = 'm2-' if win else '' %} +{% set native = 'm2w64-' if win else '' %} + +package: + name: r-dspworkflow-test + version: {{ version|replace("-", "_") }} + +channels: + - conda-forge + - bioconda + - file:///local_channel + +source: + + git_url: https://github.com/NIDAP-Community/DSPWorkflow/ + git_tag: continuous_deployment + +build: + merge_build_host: True # [win] + # If this is a new build for the same version, increment the build number. + number: 0 + # no skip + + # This is required to make R link correctly on Linux. + rpaths: + - lib/R/lib/ + - lib/ + +# Suggests: testthat (== 3.1.4) +requirements: + build: + - {{ posix }}filesystem # [win] + - {{ posix }}git + - {{ posix }}zip # [win] + + host: + - r-base =4.1.3=h2f963a2_5 + - bioconductor-biobase =2.54.0=r41hc0cfd56_2 + - bioconductor-biocgenerics =0.40.0=r41hdfd78af_0 + - bioconductor-geomxtools =3.1.1=r41hdfd78af_0 + - bioconductor-nanostringnctools =1.2.0 + - bioconductor-spatialdecon =1.4.3 + - bioconductor-complexheatmap =2.10.0=r41hdfd78af_0 + - bioconductor-genomeinfodbdata =1.2.6 + - r-cowplot =1.1.1=r41hc72bb7e_1 + - r-dplyr =1.0.9=r41h7525677_0 + - r-ggforce =0.3.4=r41h7525677_0 + - r-ggplot2 =3.3.6=r41hc72bb7e_1 + - r-gridextra =2.3=r41hc72bb7e_1004 + - r-gtable =0.3.0=r41hc72bb7e_3 + - r-knitr =1.40=r41hc72bb7e_1 + - r-patchwork =1.1.2=r41hc72bb7e_1 + - r-reshape2 =1.4.4=r41h7525677_2 + - r-scales =1.2.1=r41hc72bb7e_1 + - r-tibble =3.1.8=r41h06615bd_1 + - r-tidyr =1.2.1=r41h7525677_1 + - r-umap =0.2.9.0=r41h7525677_1 + - r-rtsne =0.16=r41h37cf8d7_1 + - r-magrittr =2.0.3=r41h06615bd_1 + - r-rlang =1.1.0=r41h38f115c_0 + - r-ggiraph=0.7.10=r41h03ef668_0 + + run: + - r-base =4.1.3=h2f963a2_5 + - bioconductor-biobase =2.54.0=r41hc0cfd56_2 + - bioconductor-biocgenerics =0.40.0=r41hdfd78af_0 + - bioconductor-geomxtools =3.1.1=r41hdfd78af_0 + - bioconductor-nanostringnctools =1.2.0 + - bioconductor-spatialdecon =1.4.3 + - bioconductor-complexheatmap =2.10.0=r41hdfd78af_0 + - bioconductor-genomeinfodbdata =1.2.6 + - r-cowplot =1.1.1=r41hc72bb7e_1 + - r-dplyr =1.0.9=r41h7525677_0 + - r-ggforce =0.3.4=r41h7525677_0 + - r-ggplot2 =3.3.6=r41hc72bb7e_1 + - r-gridextra =2.3=r41hc72bb7e_1004 + - r-gtable =0.3.0=r41hc72bb7e_3 + - r-knitr =1.40=r41hc72bb7e_1 + - r-patchwork =1.1.2=r41hc72bb7e_1 + - r-reshape2 =1.4.4=r41h7525677_2 + - r-scales =1.2.1=r41hc72bb7e_1 + - r-tibble =3.1.8=r41h06615bd_1 + - r-tidyr =1.2.1=r41h7525677_1 + - r-umap =0.2.9.0=r41h7525677_1 + - r-rtsne =0.16=r41h37cf8d7_1 + - r-magrittr =2.0.3=r41h06615bd_1 + - r-rlang =1.1.0=r41h38f115c_0 + - r-ggiraph=0.7.10=r41h03ef668_0 + +test: + commands: + # You can put additional test commands to be run here. + - $R -e "library('DSPWorkflow')" # [not win] + - "\"%R%\" -e \"library('DSPWorkflow')\"" # [win] + +about: + home: https://github.com/NIDAP-Community/DSPWorkflow + license: MIT + summary: A set of functions for analyzing RNA data from the spatial transcriptomics approach + Digital Spatial Profiling (Nanostring). The user provides read count data and annotations, + and the package outputs normalized differential expression of genes and further + visualizations and analysis based on user input. It can be run in a docker container + and in user-friendly web-based interactive notebooks (NIDAP, Palantir Foundry). + license_family: MIT + license_file: + - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT' + - LICENSE diff --git a/Dockerfile/Conda_container/Building_R_environment/DESCRIPTION b/Dockerfile/Conda_container/Building_R_environment/DESCRIPTION new file mode 100755 index 0000000..742b9cc --- /dev/null +++ b/Dockerfile/Conda_container/Building_R_environment/DESCRIPTION @@ -0,0 +1,41 @@ +Type: project +Description: Digital-Spatial-Profiling v3.1.1 environment for DSP package. +Repository: + CRAN, + biocsoftv314, + biocsoftv315, + biocanadatav313, + biocexpdatav314, + biocworkflowv314 +Depends: + backports (== 1.4.1), + Biobase (== 2.54.0), + BiocGenerics (== 0.40.0), + cowplot (== 1.1.1), + dplyr (== 1.0.9), + GeomxTools (== 3.1.1), + ggforce (== 0.3.4), + ggplot2 (== 3.3.6), + ggiraph (== 0.8.3), + dbplyr (== 2.2.1), + gridExtra (== 2.3), + gtable (== 0.3.0), + knitr (== 1.40), + NanoStringNCTools (== 1.4.0), + patchwork (== 1.1.2), + reshape2 (== 1.4.4), + Rmpfr (== 0.8-9), + Rtsne (== 0.16), + scales (== 1.2.1), + stats (== 4.1.3), + SpatialDecon (== 1.4.3), + tibble (== 3.1.8), + tidyr (== 1.2.1), + tidyverse (== 1.3.2), + umap (== 0.2.9.0), + pheatmap (== 1.0.12), + stringr +Remotes: + url::https://bioconductor.org/packages/3.15/workflows/src/contrib/GeoMxWorkflows_1.2.0.tar.gz, + git::https://github.com/Nanostring-Biostats/SpatialOmicsOverlay.git, + git::https://github.com/Nanostring-Biostats/GeomxTools.git diff --git a/Dockerfile/Conda_container/Building_R_environment/Generate_Renv.R b/Dockerfile/Conda_container/Building_R_environment/Generate_Renv.R new file mode 100755 index 0000000..1d15285 --- /dev/null +++ b/Dockerfile/Conda_container/Building_R_environment/Generate_Renv.R @@ -0,0 +1,44 @@ +# 9/13/2022 her2@nih.gov +# Creating renv environment now + +############################################################# + +print("Loading repos...") +repos <- c(CRAN = "https://cloud.r-project.org", + biocsoftv314 = "https://bioconductor.org/packages/3.14/bioc/", + biocsoftv315 = "https://bioconductor.org/packages/3.15/bioc/", + biocanadatav313 = "https://bioconductor.org/packages/3.14/data/annotation/", + biocexpdatav314 = "https://bioconductor.org/packages/3.14/data/experiment/", + biocworkflowv314 = "https://bioconductor.org/packages/3.14/workflows/") +options(repos = repos) +print("Repos loaded.") + +############################################################### + +print("Setting up plain R environment now...") + +if(!file.exists("DESCRIPTION")){ + + print("No existing DESCRIPTION file in current working directory:") + print(getwd()) + print("Exiting Environment setup now.") + + auto.snapshot <- getOption("renv.config.auto.snapshot") + options(renv.config.auto.snapshot = TRUE) + break + +}else{ + + print("Installing Packages from DESCRIPTION now...") + + renv::install() + + print("Packages installed.") + + + auto.snapshot <- getOption("renv.config.auto.snapshot") + options(renv.config.auto.snapshot = TRUE) + +} + + diff --git a/Dockerfile/Conda_container/Building_R_environment/Initiate_Renv.R b/Dockerfile/Conda_container/Building_R_environment/Initiate_Renv.R new file mode 100755 index 0000000..917d480 --- /dev/null +++ b/Dockerfile/Conda_container/Building_R_environment/Initiate_Renv.R @@ -0,0 +1,18 @@ +# 9/13/2022 her2@nih.gov +# Creating renv environment now + +# initiate <- FALSE +if (initiate){ + + auto.snapshot <- getOption("renv.config.auto.snapshot") + options(renv.config.auto.snapshot = FALSE) + + renv::settings$snapshot.type("implicit") + renv::init(bare = TRUE) + print("Environment Initiated") + +}else{ + + print("Environment Not Initiated") + +} \ No newline at end of file diff --git a/Dockerfile/Conda_container/Building_R_environment/Load_packages.R b/Dockerfile/Conda_container/Building_R_environment/Load_packages.R new file mode 100644 index 0000000..5911850 --- /dev/null +++ b/Dockerfile/Conda_container/Building_R_environment/Load_packages.R @@ -0,0 +1,17 @@ +print("Loading and recording sessionInfo now...") + +# Load packages +list_of_package <- scan("package_list.txt", what="", sep="\n") + +for (packages in list_of_package){ + lapply(packages, + function(x) suppressMessages(library(x, + character.only = TRUE, + quietly=TRUE, + warn.conflicts = FALSE))) +} + + +sessionInfoName <- "sessionInfo.txt" +writeLines(capture.output(sessionInfo()), sessionInfoName) +print("SessionInfo printed.") diff --git a/Dockerfile/Conda_container/Building_R_environment/package_list.txt b/Dockerfile/Conda_container/Building_R_environment/package_list.txt new file mode 100755 index 0000000..61514f3 --- /dev/null +++ b/Dockerfile/Conda_container/Building_R_environment/package_list.txt @@ -0,0 +1,6 @@ +GeomxTools +NanoStringNCTools +SpatialDecon +tidyverse +pheatmap +stringr \ No newline at end of file diff --git a/Dockerfile/Conda_container/Dockerfile b/Dockerfile/Conda_container/Dockerfile index 4c73272..2bb219d 100755 --- a/Dockerfile/Conda_container/Dockerfile +++ b/Dockerfile/Conda_container/Dockerfile @@ -26,7 +26,7 @@ RUN apt-get update && \ add-apt-repository --enable-source --yes "ppa:marutter/rrutter4.0" && \ add-apt-repository --enable-source --yes "ppa:c2d4u.team/c2d4u4.0+" -## Configure default locale, see https://github.com/rocker-org/rocker/issues/19 +# ## Configure default locale, see https://github.com/rocker-org/rocker/issues/19 RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && \ locale-gen en_US.utf8 && \ /usr/sbin/update-locale LANG=en_US.UTF-8 @@ -34,10 +34,10 @@ RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && \ ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 -## Use Debian unstable via pinning -- new style via APT::Default-Release -#RUN echo "deb http://http.debian.net/debian sid main" > /etc/apt/sources.list.d/debian-unstable.list \ -# && echo 'APT::Default-Release "testing";' > /etc/apt/apt.conf.d/default -# +# ## Use Debian unstable via pinning -- new style via APT::Default-Release +# #RUN echo "deb http://http.debian.net/debian sid main" > /etc/apt/sources.list.d/debian-unstable.list \ +# # && echo 'APT::Default-Release "testing";' > /etc/apt/apt.conf.d/default +# # RUN apt-get update && \ apt-get install -y --no-install-recommends \ @@ -77,27 +77,30 @@ RUN apt-get update && \ RUN apt-get -y update && apt-get -y install git -# add the signing key (by Michael Rutter) for these repos -# To verify key, run gpg --show-keys /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc -# Fingerprint: E298A3A825C0D65DFD57CBB651716619E084DAB9 +# # add the signing key (by Michael Rutter) for these repos +# # To verify key, run gpg --show-keys /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc +# # Fingerprint: E298A3A825C0D65DFD57CBB651716619E084DAB9 -# add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed +# # add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed # ENV R_BASE_VERSION=4.1.3 # RUN wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc && \ # add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/" && \ # add-apt-repository ppa:c2d4u.team/c2d4u4.0+ && \ -# apt update && -# apt-get install -y --no-install-recommends \ -# r-cran-rjava \ -# r-base-core=${R_BASE_VERSION}-* \ -# r-base-dev=${R_BASE_VERSION}-* -# +# apt update && \ +# apt-get install -y --no-install-recommends \ +# r-cran-rjava \ +# r-base-core=${R_BASE_VERSION}-* \ +# r-base-dev=${R_BASE_VERSION}-* + # RUN R -e 'install.packages("devtools")' # RUN R -e 'install.packages("renv")' # RUN R -e 'install.packages("lintr")' +# RUN mkdir /renv_cache +# ENV RENV_PATHS_CACHE="/renv_cache" + # COPY Building_R_environment/* . # RUN R -e 'initiate=TRUE; source("Initiate_Renv.R"); source("Generate_Renv.R")' @@ -107,12 +110,14 @@ ENV PATH="/root/miniconda3/bin:${PATH}" ARG PATH="/root/miniconda3/bin:${PATH}" RUN wget \ - https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.2-Linux-x86_64.sh \ - && mkdir /root/.conda \ - && bash Miniconda3-py37_4.8.2-Linux-x86_64.sh -b \ - && rm -f Miniconda3-py37_4.8.2-Linux-x86_64.sh + https://repo.anaconda.com/miniconda/Miniconda3-py38_22.11.1-1-Linux-x86_64.sh \ +# && mkdir /root/.conda \ + && bash Miniconda3-py38_22.11.1-1-Linux-x86_64.sh -b \ + && rm -f Miniconda3-py38_22.11.1-1-Linux-x86_64.sh RUN conda --version +RUN conda install -n base conda-libmamba-solver \ + && conda config --set solver libmamba RUN conda config --append channels defaults RUN conda config --append channels anaconda @@ -127,36 +132,42 @@ RUN conda init bash ENV PATH /opt/conda/envs/env/bin:$PATH -### For .yml method -COPY environment.yml . -RUN mamba env update -f environment.yml - - -SHELL ["/bin/bash", "-c"] - -RUN echo "source activate DSPWorkflow_NIDAP" >> ~/.bashrc +#SHELL ["/bin/bash", "-c"] RUN chmod -R ugo+rwx /opt RUN chmod -R ugo+rwx /tmp RUN echo "TMPDIR=/tmp" > /root/.Renviron -RUN mkdir /tmp/local_conda_channel -RUN mkdir /tmp/local_conda_channel/linux-64 +RUN mkdir /local_channel +RUN mkdir /local_channel/linux-64 RUN conda install conda-build -COPY bioconductor-nanostringnctools-1.4.0-r41hdfd78af_0.tar.bz2 /tmp/local_conda_channel/linux-64 -COPY bioconductor-spatialdecon-1.4.3-r41hdfd78af_0.tar.bz2 /tmp/local_conda_channel/linux-64 -COPY bioconductor-geomxtools-3.1.1-r41hdfd78af_0.tar.bz2 /tmp/local_conda_channel/linux-64 -COPY bioconductor-geomxtools-3.1.1-r41hdfd78af_0.tar.bz2 /tmp/local_conda_channel/linux-64 -COPY bioconductor-nanostringnctools-1.2.0-r41hdfd78af_0.tar.bz2 /tmp/local_conda_channel/linux-64 +COPY bioconductor-nanostringnctools-1.4.0-r41hdfd78af_0.tar.bz2 /local_channel/linux-64 +COPY bioconductor-spatialdecon-1.4.3-r41hdfd78af_0.tar.bz2 /local_channel/linux-64 +COPY bioconductor-geomxtools-3.1.1-r41hdfd78af_0.tar.bz2 /local_channel/linux-64 +COPY bioconductor-nanostringnctools-1.2.0-r41hdfd78af_0.tar.bz2 /local_channel/linux-64 + +RUN conda index /local_channel/ + +RUN conda config --add channels file:///local_channel/ + +### For .yml method +COPY environment.yml . +RUN mamba env update -f environment.yml + +RUN echo "source activate DSPWorkflow_NIDAP" >> ~/.bashrc -RUN conda index /tmp/local_conda_channel/ +ENV PATH="/root/miniconda3/envs/DSPWorkflow_NIDAP/bin:$PATH" -RUN conda config --add channels file:///tmp/local_conda_channel/ +# Create target directory +RUN mkdir -p /renv/library/R-4.1/x86_64-pc-linux-gnu -RUN mamba install --prefix ~/miniconda3/envs/DSPWorkflow_NIDAP -c file:///tmp/local_conda_channel/ bioconductor-geomxtools==3.1.1 bioconductor-spatialdecon==1.4.3 -# RUN mamba install --prefix ~/miniconda3/envs/DSPWorkflow_NIDAP -c file:///tmp/local_conda_channel/ bioconductor-nanostringnctools==1.4.0 +# Create symbolic links +RUN for d in /root/miniconda3/envs/DSPWorkflow_NIDAP/lib/R/library/*; do \ + if [ -d "$d" ]; then \ + ln -s "$d" "/renv/library/R-4.1/x86_64-pc-linux-gnu/$(basename $d)"; \ + fi \ +done -COPY start_conda.sh . +CMD ["bash"] -CMD ["start_conda.sh"] diff --git a/Dockerfile/Conda_container/environment.yml b/Dockerfile/Conda_container/environment.yml index bd9510a..5633ab7 100644 --- a/Dockerfile/Conda_container/environment.yml +++ b/Dockerfile/Conda_container/environment.yml @@ -1,16 +1,19 @@ channels: - bioconda - conda-forge -- defaults +- file:///local_channel dependencies: - r-base==4.1.3 - r-backports==1.4.1 - bioconductor-biobase==2.54.0 - bioconductor-biocgenerics==0.40.0 -- bioconductor-nanostringnctools=1.2.0 +- bioconductor-nanostringnctools=1.2.0 +- bioconductor-geomxtools==3.1.1 +- bioconductor-complexheatmap==2.10.0 +- bioconductor-spatialdecon==1.4.3 - r-tidyverse==1.3.2 - r-cowplot==1.1.1 -- r-dplyr==1.1.0 +- r-dplyr==1.0.9 - r-ggforce==0.3.4 - r-ggplot2==3.3.6 - r-ggiraph==0.8.3 @@ -25,9 +28,12 @@ dependencies: - r-tibble==3.1.8 - r-tidyr==1.2.1 - r-umap==0.2.9.0 -- r-pheatmap==1.0.12 +- r-pheatmap==1.0.12 +- r-xlsx - r-stringr - r-devtools - r-lintr - r-renv +- r-jsonlite +- r-pkgdown name: DSPWorkflow_NIDAP diff --git a/Dockerfile/Plain_R_container/Building_R_environment/DESCRIPTION b/Dockerfile/Plain_R_container/Building_R_environment/DESCRIPTION index 742b9cc..e32227b 100755 --- a/Dockerfile/Plain_R_container/Building_R_environment/DESCRIPTION +++ b/Dockerfile/Plain_R_container/Building_R_environment/DESCRIPTION @@ -34,7 +34,10 @@ Depends: tidyverse (== 1.3.2), umap (== 0.2.9.0), pheatmap (== 1.0.12), - stringr + stringr, + complexheatmap (>=2.5.2), + xlsx, + jsonlite, Remotes: url::https://bioconductor.org/packages/3.15/workflows/src/contrib/GeoMxWorkflows_1.2.0.tar.gz, git::https://github.com/Nanostring-Biostats/SpatialOmicsOverlay.git,