diff --git a/LifeSciences/README.md b/LifeSciences/README.md index 2fd359dd05ab9f7badc27e23c5994e7fc89541eb..c3d25753b410a735caecaa9b9e911b392edc09f2 100644 --- a/LifeSciences/README.md +++ b/LifeSciences/README.md @@ -4,3 +4,4 @@ Life Sciences Software List: - repositories: genewise-2.4.1 - repositories: trimmomatic-0.40 - repositories: RepeatMasker-4.1.2 +- repositories: rMATs-4.1.2 diff --git a/LifeSciences/rMATs-4.1.2/Makefile-lbfgs_scipy.patch b/LifeSciences/rMATs-4.1.2/Makefile-lbfgs_scipy.patch new file mode 100644 index 0000000000000000000000000000000000000000..b2fa4acb514a7f4e5d25a7369609fe3fef8ef24f --- /dev/null +++ b/LifeSciences/rMATs-4.1.2/Makefile-lbfgs_scipy.patch @@ -0,0 +1,12 @@ +--- ./rMATS_C/lbfgs_scipy/Makefile 2021-12-17 21:25:43.000000000 +0800 ++++ ./rMATS_C/lbfgs_scipy/Makefile1 2022-05-11 10:54:28.247013460 +0800 +@@ -1,7 +1,7 @@ + # Set compiler if not set by environment variable +-ifndef FC +-FC := gfortran +-endif ++#ifndef FC ++FC := flang ++#endif + + FFLAGS = -c -O2 diff --git a/LifeSciences/rMATs-4.1.2/Makefile.rMATS_C.patch b/LifeSciences/rMATs-4.1.2/Makefile.rMATS_C.patch new file mode 100644 index 0000000000000000000000000000000000000000..4690e727c04857dc74de11d146e0d60782a4dc47 --- /dev/null +++ b/LifeSciences/rMATs-4.1.2/Makefile.rMATS_C.patch @@ -0,0 +1,28 @@ +--- ./rMATS_C/Makefile 2021-12-17 21:25:43.000000000 +0800 ++++ ./rMATS_C/Makefile1 2022-05-11 14:42:01.715013460 +0800 +@@ -1,15 +1,15 @@ + # Set compilers if not set by environment variables +-ifndef CC +-CC := gcc +-endif +-ifndef CXX +-CXX := g++ +-endif +-ifndef FC +-FC := gfortran +-endif ++#ifndef CC ++CC := clang ++#endif ++#ifndef CXX ++CXX := clang++ ++#endif ++#ifndef FC ++FC := flang ++#endif + +-LDFLAGS := -lm -lgfortran -lgsl -lgslcblas -lgomp -lblas -llapack ++LDFLAGS := -lm -lflang -lgsl -lgslcblas -lgomp -lblas -llapack + CFLAGS := -Wall -O2 -msse2 -funroll-loops -fopenmp + + # Allow gsl flags to be set by environment variable diff --git a/LifeSciences/rMATs-4.1.2/build.sh b/LifeSciences/rMATs-4.1.2/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..181c523d1b9a70138f72e901bf87bd770b0d9aac --- /dev/null +++ b/LifeSciences/rMATs-4.1.2/build.sh @@ -0,0 +1,78 @@ +#!/bin/bash +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "bash build.sh buildpath installpath" + echo ":param buildpath: 应用构建绝对路径" + echo ":param installpath: 应用安装绝对路径" + exit 1 +fi + +[[ ! "$1" =~ ^/.* || "$1" = "/" ]] && echo "请输入正确的构建路径" && exit 1 +[[ ! "$2" =~ ^/.* || "$2" = "/" ]] && echo "请输入正确的安装路径" && exit 1 + +create_dir() +{ + local path=$1 + [[ "$path" =~ .*/$ ]] && path=${path%/*} + if [[ ! -d "$path" && ! -f "$path" ]]; then mkdir -p $path; else path=$path`date "+%y%m%d%H%M%S"` && mkdir -p $path; fi + echo $path +} + +buildpath=$(create_dir $1) +installpath=$(create_dir $2) + +yum install -y m4 bc environment-modules systemd-devel --nogpgcheck +source /etc/profile +module purge + +set -e +dep_dir="dependency" +echo 'start install bisheng' >> log.txt +bash $dep_dir/bisheng-compiler-2.1.0.sh $buildpath $installpath +module use $installpath/bisheng-compiler-2.1.0 +module load $installpath/bisheng-compiler-2.1.0/bisheng_modulefiles +echo 'Bisheng installation is complete' >> log.txt + +echo 'start install gsl-2.5' >> log.txt +bash $dep_dir/gsl-2.5.sh $buildpath $installpath +module use $installpath/gsl-2.5 +module load $installpath/gsl-2.5/gsl_modulefiles +echo 'Gsl-2.5 installation is complete' >> log.txt + +echo 'start install blas' >> log.txt +bash $dep_dir/blas-3.10.0.sh $buildpath $installpath +echo 'Blas installation is complete' >> log.txt + +echo 'start install lapack' >> log.txt +bash $dep_dir/lapack-3.10.1.sh $buildpath $installpath +echo 'Lapack installation is complete' >> log.txt + +echo 'start install R' >> log.txt +bash $dep_dir/R-4.2.0.sh $buildpath $installpath +module use $installpath/R-4.2.0 +module load $installpath/R-4.2.0/R-4.2.0_modulefiles +echo 'R installation is complete' >> log.txt + +ln -sf $installpath/BLAS-3.10.0/lib/* /usr/lib64 +ln -sf $installpath/lapack-3.10.1/lib/* /usr/lib64 + +echo 'start install rmats' >> log.txt +bash rmats-4.1.2.sh $buildpath $installpath +echo 'Rmats installation is complete' >> log.txt + + +mkdir -p pkg/rmats-4.1.2-hpc && cp -r $installpath/* pkg/rmats-4.1.2-hpc/ +cat>"pkg/rmats-4.1.2-hpc/run.sh"< /dev/null && pwd) +for d in \$(ls \$current_dir) +do + [[ ! -f "\$current_dir/\$d" ]] && cd \$current_dir/\$d && module use \$(pwd) && module load \$(pwd)/*modulefiles &> /dev/null +done + +EOF + +cd pkg/ && tar zcvf rmats-4.1.2-hpc.tar.gz rmats-4.1.2-hpc + +rm -rf $buildpath $installpath diff --git a/LifeSciences/rMATs-4.1.2/dependency/R-4.2.0.sh b/LifeSciences/rMATs-4.1.2/dependency/R-4.2.0.sh new file mode 100644 index 0000000000000000000000000000000000000000..ea5eab87f8282b6c3808958b051bac64c524baf7 --- /dev/null +++ b/LifeSciences/rMATs-4.1.2/dependency/R-4.2.0.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "bash R-4.2.0.sh buildpath installpath" + echo ":param buildpath: 应用构建绝对路径" + echo ":param installpath: 应用安装绝对路径" + exit 1 +fi + +[[ ! "$1" =~ ^/.* || ! -d "$1" || "$1" = "/" ]] && echo "请输入正确的构建路径" && exit 1 +[[ ! "$2" =~ ^/.* || ! -d "$2" || "$2" = "/" ]] && echo "请输入正确的安装路径" && exit 1 + +if [[ "$1" == "$2" ]]; then +echo "构建路径与安装路径不能相同,请输入正确的路径" +exit 1 +fi + +buildpath=$1 +installpath=$2 +[[ "$buildpath" =~ .*/$ ]] && buildpath=${buildpath%/*} +[[ "$installpath" =~ .*/$ ]] && installpath=${installpath%/*} +set -e + +#依赖 + +yum install wget tar environment-modules readline-devel libXt-devel bzip2-devel xz-devel libcurl-devel glibc-headers gcc-c++ pcre* -y --nogpgcheck + + + +#R-4.2.0.tar.gz +wget -t 0 -c -P $buildpath http://mirror.bjtu.edu.cn/cran/src/base/R-4/R-4.2.0.tar.gz +tar xf $buildpath/R-4.2.0.tar.gz -C $buildpath && rm -rf $buildpath/R-4.2.0.tar.gz +cd $buildpath/R-4.2.0 + +FC=flang CC=clang CXX=clang++ ./configure --enable-R-shlib=yes --with-tcltk --prefix=$installpath/R-4.2.0 +make -j$(nproc) && make install -j$(nproc) + +cat>"$installpath/R-4.2.0/R-4.2.0_modulefiles"<"$installpath/bisheng-compiler-2.1.0/bisheng_modulefiles"<"$installpath/gsl-2.5/gsl_modulefiles"<