Commit cf782d77 authored by Valentin Vautrot's avatar Valentin Vautrot

Complete %test and %help section and reorganize building script

parent 42460129
......@@ -2,10 +2,14 @@ Bootstrap: docker
From: centos:8
%help
This is a singularity container packing a python 2.7 (only version) environment with all the programms necessary to execute the leafcutter software for RNA splicing. These include samtools, regtools and R3.6.0.
Leafcutter is installed in /usr/bin/leafcutter
This is a singularity container packing an environment with all programs necessary to execute the leafcutter software for RNA splicing. These include python2.7, samtools, regtools, and perl.
run the command 'singularity test <image_name>.sif' to see the actual versions of the programms installed.
This image requires that a copy of the leafcutter git directory is available on the host environment to acess leafcutter scripts folders.
Usage : singularity exec -e <image_name>.sif python2/perl/Rscript depending on the leafcutter scripts used.
Authors : valentin.vautrot@u-bourgogne.fr
Creation date : 2025-02-14
%post
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
......@@ -14,13 +18,15 @@ sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /
dnf install -y epel-release
dnf update -y libmodulemd
dnf update -y --exclude=filesystem
dnf install -y git
# filesystem packages updates poses problems by tempering with /proc, which is supposed to be owned by root, but is not in the .sif image
# install python2.7
dnf remove -y python && dnf autoremove
dnf install -y python2.x86_64 git
dnf install -y python2.x86_64
# install R
# install R-4.3.0 to avoid problems with compilation AND distributional package during R compil
# cf also https://github.com/davidaknowles/leafcutter/issues/239
dnf install -y wget gcc gcc-gfortran gcc-c++ kernel-devel readline-devel.x86_64
dnf install -y xorg-x11-server-utils.x86_64 libX11-devel.x86_64 libXt-devel.x86_64
dnf install -y zlib-devel.x86_64 bzip2.x86_64 bzip2-devel.x86_64 xz-devel.x86_64 pcre-devel.x86_64 libcurl-devel.x86_64
......@@ -28,8 +34,6 @@ dnf install -y make java-1.8.0-openjdk.x86_64
# for R > 4 only
dnf install -y pcre2.x86_64 pcre2-devel.x86_64
# install R-4.3.0 to avoid problems with compilation AND distributional package during R compil
# cf also https://github.com/davidaknowles/leafcutter/issues/239
wget -P /usr/bin/ https://cran.r-project.org/src/base/R-4/R-4.3.0.tar.gz
tar -xzvf /usr/bin/R-4.3.0.tar.gz -C /usr/bin/
cd /usr/bin/R-4.3.0
......@@ -39,9 +43,8 @@ make
export PATH=${PATH}:/usr/bin/R-4.3.0/bin/
cd
dnf install -y openssl-devel.x86_64 libxml2-devel.x86_64 fontconfig-devel.x86_64 harfbuzz-devel fribidi-devel freetype-devel libpng-devel libtiff-devel libjpeg-devel
# # install leafcutter for Rv4.3.0
dnf install -y openssl-devel.x86_64 libxml2-devel.x86_64 fontconfig-devel.x86_64 harfbuzz-devel fribidi-devel freetype-devel libpng-devel libtiff-devel libjpeg-devel
Rscript -e 'install.packages("devtools", version="2.4.5", repos="https://cran.r-project.org")'
Rscript -e 'install.packages("BiocManager", version="1.30.25", repos="https://cran.r-project.org")'
dnf install -y gsl.x86_64 gsl-devel.x86_64 tbb.x86_64 tbb-devel.x86_64
......@@ -57,7 +60,7 @@ Rscript -e 'install.packages("ggplot2", version="3.5.1", repos="https://cran.r-p
Rscript -e 'install.packages("https://cran.r-project.org/src/contrib/Archive/StanHeaders/StanHeaders_2.21.0-7.tar.gz")'
Rscript -e 'install.packages("https://cran.r-project.org/src/contrib/Archive/rstan/rstan_2.21.7.tar.gz")'
Rscript -e 'install.packages("https://cran.r-project.org/src/contrib/Archive/rstantools/rstantools_2.0.0.tar.gz")'
# fail then reinstall the 3 stan packages then try with upgrade = "never") - probably because upgrading StanHeaders causes failure.
# upgrade = "never" mandatory - probably because upgrading StanHeaders causes failure.
Rscript -e 'devtools::install_github("davidaknowles/leafcutter/leafcutter", upgrade="never")'
mkdir /usr/bin/leafcutter/
......@@ -65,7 +68,7 @@ git clone https://github.com/davidaknowles/leafcutter /usr/bin/leafcutter/
# install samtools and regtools
dnf install -y samtools
dnf install -y cmake.x86_64
dnf install -y cmake.x86_64
mkdir /usr/bin/regtools/
git clone https://github.com/griffithlab/regtools /usr/bin/regtools/
mkdir /usr/bin/regtools/build/
......@@ -78,15 +81,15 @@ export PATH=${PATH}:/usr/bin/regtools/build/:/usr/bin/R-4.3.0/bin/
export LEAFCUTTERDIR=/usr/bin/leafcutter/
%test
echo "\n##### installed python version"
echo "##### installed python version"
python2 --version
echo "\n\n##### installed R version:"
echo "##### installed R version:"
R --version
echo "\n\n##### installed samtools version:"
echo "##### installed samtools version:"
samtools --version
echo "\n\n##### installed regtools version:"
echo "##### installed regtools version:"
regtools --help
echo "\n\n##### installed perl version:"
echo "##### installed perl version:"
perl --version
echo "\n\n##### leafcutter version: "
echo "\n\n##### installed leafcutter version: "
echo "leafcutter $(grep "^Version: " ${LEAFCUTTERDIR}/leafcutter/DESCRIPTION)"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment