<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">BootStrap: docker
From: ubuntu:20.04

%labels
  Maintainer Jeremy Nicklas
  R_Version 4.2.1

%apprun R
  exec R "${@}"

%apprun Rscript
  exec Rscript "${@}"

%runscript
  exec R "${@}"

%post
  # Software versions
  export R_VERSION=4.3.1
  echo "export R_VERSION=${R_VERSION}" &gt;&gt; $SINGULARITY_ENVIRONMENT

  # Get dependencies
  apt-get update
  apt-get install -y --no-install-recommends \
    locales


  # Install R
  apt-get update
  apt-get install -y --no-install-recommends \
    software-properties-common \
    dirmngr \
    wget
  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/"
  apt-get install -y --no-install-recommends \
    r-base=${R_VERSION}* \
    r-base-core=${R_VERSION}* \
    r-base-dev=${R_VERSION}* \
    r-recommended=${R_VERSION}* \
    r-base-html=${R_VERSION}* \
    r-doc-html=${R_VERSION}* \
    libcurl4-openssl-dev \
    libssl-dev \
    libxml2-dev \
    libcairo2-dev \
    libxt-dev \
    libopenblas-dev

  # Add a default CRAN mirror
  echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl')" &gt;&gt; /usr/lib/R/etc/Rprofile.site

  # Add a directory for host R libraries
  mkdir -p /library
  echo "R_LIBS_SITE=/library:\${R_LIBS_SITE}" &gt;&gt; /usr/lib/R/etc/Renviron.site

  # Clean up
  rm -rf /var/lib/apt/lists/*

  # add R libs :
  # bioconductor
  Rscript -e 'install.packages("BiocManager" , dependencies=TRUE)'
  # Rscript -e 'install.packages("devtools")'
  Rscript -e 'install.packages("gghighlight")'
  Rscript -e 'install.packages("ggfortify")'
  Rscript -e 'install.packages("RColorBrewer")'
  Rscript -e 'install.packages("pheatmap")'
  Rscript -e 'install.packages("tidyverse")'
  Rscript -e 'install.packages("ggplot2")'


  Rscript -e 'BiocManager::install("DESeq2")'
  Rscript -e 'BiocManager::install("limma")'
  Rscript -e 'BiocManager::install("edgeR")'
  Rscript -e 'BiocManager::install("limma")'
  Rscript -e 'BiocManager::install("mixOmics")'
  Rscript -e 'BiocManager::install("HTSFilter")'
  # Rscript -e 'devtools::install_github("yanlinlin82/ggvenn")'

%test

R --quiet -e "stopifnot(getRversion() == '${R_VERSION}')"
</pre></body></html>