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..a358185999cfcbc7c250577921264c3249557dbb --- /dev/null +++ b/LifeSciences/rMATs-4.1.2/build.sh @@ -0,0 +1,141 @@ +#!/bin/bash +# 此脚本用来编译安装rMATS-4.1.2软件 +# rMATS-4.1.2软件介绍 +# rMATs是检测可变剪切事件的常用软件之一,它可以从RNA测序数据中,检测出多种类型的可变剪切事件, +# 并提供了定量和组间差异分析的功能,可对生物学重复的样本进行组间分析。 +# Usage: +# bash /path/to/build.sh /path/to/build /path/to/install +# 使用build.sh 脚本样例 bash /path/to/build.sh /path/to/build /path/to/install +# 使用build.sh 需要root权限或者sudo权限,否则无法安装依赖 +# +############################################################## + +source "$( + cd "$(dirname "$0")" || exit 1 + pwd +)/common.sh" + +function install_development() { + sudo yum install -y m4 bc zlib-devel zlib environment-modules systemd-devel + source /etc/profile + module purge +} + +function install_bisheng() { + bash "$1"/bisheng-compiler-2.1.0.sh "$2" "$3" + module use "$3"/bisheng-compiler-2.1.0 + module load "$3"/bisheng-compiler-2.1.0/bisheng_modulefiles +} + +function install_gsl() { + bash "$1"/gsl-2.5.sh "$2" "$3" + module use "$3"/gsl-2.5 + module load "$3"/gsl-2.5/gsl_modulefiles +} + +function install_lapack() { + bash "$1"/lapack-3.10.1.sh "$2" "$3" + module use "$3"/lapack-3.10.1 + module load "$3"/lapack-3.10.1/lapack_modulefiles +} + +function install_R() { + bash "$1"/R-4.2.0.sh "$2" "$3" + module use "$3"/R-4.2.0 + module load "$3"/R-4.2.0/R-4.2.0_modulefiles +} + +function install_STAR() { + bash "$1"/STAR-2.7.10a.sh "$2" "$3" + module use "$3"/STAR-2.7.10a + module load "$3"/STAR-2.7.10a/STAR-2.7.10a_modulefiles +} + +function install_rmats() { + bash "$4"/rmats-4.1.2.sh "$1" "$2" + mkdir -p "$3"/rmats-4.1.2-hpc && cp -r "$2"/* "$3"/rmats-4.1.2-hpc/ +} + +function copy_common_and_R_shell() { + rm -rf "$2"/rmats-4.1.2-hpc/R-4.2.0 + cp "$1"/dependency/R-4.2.0.sh "$1"/common.sh "$1"/dependency/pairadise.sh "$1"/dependency/install-R-deps.R "$2"/rmats-4.1.2-hpc/ + sed -i '6 c\)/common.sh"' "$2"/rmats-4.1.2-hpc/R-4.2.0.sh +} + +function write_rmats_run() { + cat >"$1/rmats-4.1.2-hpc/run.sh" </dev/null + +current_dir="\$(cd "\$(dirname "\${BASH_SOURCE[0]}")" && pwd -P)" +for f in "\${current_dir}"/*; do + if [[ -d "\${f}" && -f "\$(ls "\${f}"/*modulefiles 2>&1)" ]]; then + module use "\${f}" && module load "\${f}"/*modulefiles + fi +done + +# 编译 R 并初始化其环境变量 +mkdir "\${current_dir}"/build +bash "\${current_dir}"/R-4.2.0.sh "\${current_dir}"/build "\${current_dir}" +module use "\${current_dir}"/R-4.2.0 +module load "\${current_dir}"/R-4.2.0/R-4.2.0_modulefiles +rm -rf "\${current_dir}"/build + +# 安装PAIRADISE 安装PAIRADISE时,需要下载nloptr等依赖,如果运行run.sh下载依赖失败,请多执行几次 +bash "\${current_dir}"/pairadise.sh "\${current_dir}" + +echo -e "\033[1;32;1mrMATS environment initialization completed.\033[0m" + +EOF + + chmod +x "$1"/rmats-4.1.2-hpc/run.sh +} + +function tar_pkg() { + echo "# 正在打包 rmats 文件 路径为$1" + cd "$1" && tar -zcf rmats-4.1.2-hpc.tar.gz rmats-4.1.2-hpc + echo -e "\033[1;32;1m# rmats 已经打包成功 文件路径为$1/rmats-4.1.2-hpc.tar.gz\033[0m" +} + +function main() { + set_script_dir + + # $1(构建路径)、$2(安装路径)检测 + is_check_build_install_directory "$1" "$2" "build.sh" + + # 构建路径 + buildpath=$(create_dir "$1") + + # 安装路径 + installpath=$(create_dir "$2") + + # 依赖路径 + dep_dir="${SCRIPT_DIR}"/dependency + + # 打包路径 + pkg_dir="${SCRIPT_DIR}"/pkg + + install_development + install_bisheng "$dep_dir" "$buildpath" "$installpath" + install_gsl "$dep_dir" "$buildpath" "$installpath" + install_lapack "$dep_dir" "$buildpath" "$installpath" + install_R "$dep_dir" "$buildpath" "$installpath" + install_STAR "$dep_dir" "$buildpath" "$installpath" + install_rmats "$buildpath" "$installpath" "$pkg_dir" "${SCRIPT_DIR}" + set -e + copy_common_and_R_shell "${SCRIPT_DIR}" "$pkg_dir" + write_rmats_run "$pkg_dir" + tar_pkg "$pkg_dir" + echo " # ------------------------------------------------------------------------" + echo "# 运行软件前请执行以下命令" + echo -e "\033[1;32;1m# source ""${pkg_dir}""/rmats-4.1.2-hpc/run.sh\033[0m" + echo "# 来加载 rmats 运行时环境变量" + echo "# ------------------------------------------------------------------------" + rm -rf "$buildpath" "$installpath" +} + +main "$@" diff --git a/LifeSciences/rMATs-4.1.2/common.sh b/LifeSciences/rMATs-4.1.2/common.sh new file mode 100644 index 0000000000000000000000000000000000000000..6b0cf21cd82bdc77dd5b797c70a4a532bcd1c4ae --- /dev/null +++ b/LifeSciences/rMATs-4.1.2/common.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +function is_check_build_install_directory() { + if [[ $# -ne 3 ]]; then + echo "The format is as follows:" + echo "bash $3 buildpath installpath" + echo ":param buildpath: 应用构建绝对路径" + echo ":param installpath: 应用安装绝对路径" + exit 1 + fi + + [[ ! "$1" =~ ^/.* || "$1" = "/" ]] && echo "请输入正确的构建路径" && exit 1 + [[ ! "$2" =~ ^/.* || "$2" = "/" ]] && echo "请输入正确的安装路径" && exit 1 + echo "# ------------------------------------------------------------------------" + echo "# $3 正在运行" +} + +function is_check_build_equal() { + local buildpath + local installpath + buildpath="$1" + installpath="$2" + [[ "${buildpath}" =~ .*/$ ]] && buildpath=${buildpath%/*} + [[ "${installpath}" =~ .*/$ ]] && installpath=${installpath%/*} + [[ "${buildpath}" == "${installpath}" ]] && echo "构建路径与安装路径需为不同路径" && exit 1 + echo "# 构建路径为$1" + echo "# 安装路径为$2" +} + +function create_dir() { + local path + path="$1" + [[ "$path" =~ .*/$ ]] && path=${path%/*} + if [[ ! -d "${path}" && ! -f "${path}" ]]; then + mkdir -p "${path}" + elif [[ -n "$(ls -A "$1")" ]]; then + path=$path$(date "+%y%m%d%H%M%S") && mkdir -p "${path}" + fi + echo "${path}" +} + +function set_script_dir() { + local REL_SCRIPT_DIR + REL_SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")" || return 1 + SCRIPT_DIR="$(cd "${REL_SCRIPT_DIR}" && pwd)" || return 1 +} 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..296de8cf88075cd7e1bb8dde6226c6549f1c5678 --- /dev/null +++ b/LifeSciences/rMATs-4.1.2/dependency/R-4.2.0.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +source "$( + cd "$(dirname "$0")" || exit 1 + pwd +)/../common.sh" + +function install_development() { + sudo yum install -y wget tar environment-modules readline-devel libXt-devel \ + bzip2-devel xz-devel libcurl-devel glibc-headers gcc-c++ pcre* -y + source /etc/profile +} + +function download_R() { + echo "# R正在下载" + wget -t 0 -T 20 -c -P "$1" http://mirror.bjtu.edu.cn/cran/src/base/R-4/R-4.2.0.tar.gz + if [[ $? -eq 0 ]]; then + echo -e "\033[1;32;1m# R已经下载成功\033[0m" + else + echo -e "\033[31m# R下载失败,请重新执行脚本\033[0m" + exit 1 + fi +} + +function install_R() { + echo "# R 正在安装" + tar -xzf "$1"/R-4.2.0.tar.gz -C "$1" && rm -rf "$1"/R-4.2.0.tar.gz + cd "$1"/R-4.2.0 + FC=flang CC=clang CXX=clang++ ./configure --enable-R-shlib=yes --with-tcltk --prefix="$2"/R-4.2.0 + make -j"$(nproc)" && make install + echo -e "\033[1;32;1m# R 已经安装完毕\033[0m" +} + +function write_R_module() { + cat >"$1/R-4.2.0/R-4.2.0_modulefiles" <"$1/STAR-2.7.10a/STAR-2.7.10a_modulefiles" <"$1/bisheng-compiler-2.1.0/bisheng_modulefiles" <"$1/gsl-2.5/gsl_modulefiles" <"$1/lapack-3.10.1/lapack_modulefiles" < + + + + + + Document + + + + + +
+

+ 2022/07/15 14:10:41 +

+
+ +

配置信息

+ +
+
+ 源码文件存放路径 + + /opt/portadv/portadmin/sourcecode/rmats_turbo_v4_1_2 + +
+
+ 目标操作系统 + + openEuler 20.03 SP3 + +
+
+ 目标系统内核版本 + + 4.19.90 + +
+
+ 编译器版本 + + BiSheng Compiler 2.1.0 + +
+
+ 构建工具 + + make + +
+
+ 编译命令 + + make + +
+
+ 迁移结果 + + + + 源码迁移分析成功:您指定的分析路径/分析包中没有需要迁移的内容 + +
+
+ +
+
+
+

可兼容替换

+

0

+
+
+

待验证替换

+

0

+
+
+

依赖文件总数

+

0

+
+
+
+
+

源文件数

+

0

+
+
+

代码行数

+

0

+
+
+

源码迁移人力

+

0人月

+
+
+

+ 预估标准:1人月迁移工作量 = 500行 C/C++/Fortran/Go/构建文件等源码,或250行汇编代码 +

+
+
+
+ +
+
+ 与架构相关的依赖文件 +
+ +
+ +
+
+ + + + + + + + + + + +
序号依赖文件名文件类型 + 待下载软件包名称 + 分析结果处理建议
+
+
+ + + + + + + + + + + + + + + +
+
+
+ 未发现与架构相关的依赖文件 +
+
+
+
+ + +
+
+ 需要迁移的源码文件 +
+ +
+ +
+
+ + + + + + + + + + + +
序号文件名路径文件类型需修改的代码行
+
+
+ + + + + + + + + + + + + + +
+
+
+ 未发现需要迁移的源码文件 +
+
+
+
+ + +
+
+ 需要迁移的代码行数 +
+ +
+ +
+
+ + + + + + + + + +
文件名行号(起始行,结束行)关键字建议
+
+
+ + + + + + + + + + + + + +
+
+
+ 无数据 +
+
+
+
+ + +
+
+ + + + + + \ No newline at end of file diff --git "a/LifeSciences/rMATs-4.1.2/doc/Devkit\346\212\245\345\221\212/rmats-4.1.2\350\275\257\344\273\266\350\277\201\347\247\273\350\257\204\344\274\260\346\212\245\345\221\212.html" "b/LifeSciences/rMATs-4.1.2/doc/Devkit\346\212\245\345\221\212/rmats-4.1.2\350\275\257\344\273\266\350\277\201\347\247\273\350\257\204\344\274\260\346\212\245\345\221\212.html" new file mode 100644 index 0000000000000000000000000000000000000000..66a5cd1d4bc960cbe7895d603b8793db9a11a42b --- /dev/null +++ "b/LifeSciences/rMATs-4.1.2/doc/Devkit\346\212\245\345\221\212/rmats-4.1.2\350\275\257\344\273\266\350\277\201\347\247\273\350\257\204\344\274\260\346\212\245\345\221\212.html" @@ -0,0 +1,542 @@ + + + + + + + + Document + + + +
+

+ 2022/07/22 17:49:48

+
+ +

+ 配置信息

+
+ + +
+ 目标操作系统 + openEuler 20.03 SP3 +
+
+ 目标系统内核版本 +

+ 4.19.90 +

+
+
+ x86上已安装软件路径 + /opt/anaconda3/envs/rmats/rMATS +
+
+ 评估结果 +

+ + 软件迁移评估成功 +

+
+ +
+
+ +
+

可兼容替换

+

0

+
+ +
+

待验证替换

+

2

+
+ +
+

依赖文件总数

+

2

+
+ +
+ +
+
+ +
+
+ 与架构相关的依赖文件 +
+
+ +
+
+ + + + + + + + + + + + + + +
序号依赖文件名文件类型软件包存放路径待下载软件包名称分析结果处理建议
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 1 + + rMATSexe + + 可执行文件 + + /opt/anaconda3/envs/rmats/rMATS/rMATS_C/rMATSexe + + -- + + 待验证替换 + + 请先在鲲鹏平台上验证。若不兼容,请联系供应方获取鲲鹏兼容版本,或获取源码并编译成鲲鹏兼容版本 +
+ 2 + + rmatspipeline.cpython-39-x86_64-linux-gnu.so + + 动态库 + + /opt/anaconda3/envs/rmats/rMATS/rmatspipeline.cpython-39-x86_64-linux-gnu.so +
+
+
+ + +
+
+ + + + \ No newline at end of file diff --git "a/LifeSciences/rMATs-4.1.2/doc/rMATs-4.1.2\345\272\224\347\224\250\346\265\213\350\257\225\346\212\245\345\221\212.docx" "b/LifeSciences/rMATs-4.1.2/doc/rMATs-4.1.2\345\272\224\347\224\250\346\265\213\350\257\225\346\212\245\345\221\212.docx" new file mode 100644 index 0000000000000000000000000000000000000000..dbf482dfc04b6f7850b206a5e21678c0938ebffd Binary files /dev/null and "b/LifeSciences/rMATs-4.1.2/doc/rMATs-4.1.2\345\272\224\347\224\250\346\265\213\350\257\225\346\212\245\345\221\212.docx" differ diff --git "a/LifeSciences/rMATs-4.1.2/doc/rMATs-4.1.2\345\272\224\347\224\250\347\247\273\346\244\215\346\214\207\345\215\227.docx" "b/LifeSciences/rMATs-4.1.2/doc/rMATs-4.1.2\345\272\224\347\224\250\347\247\273\346\244\215\346\214\207\345\215\227.docx" new file mode 100644 index 0000000000000000000000000000000000000000..ce431605ff1f866af487b30e849be2ec92267ccf Binary files /dev/null and "b/LifeSciences/rMATs-4.1.2/doc/rMATs-4.1.2\345\272\224\347\224\250\347\247\273\346\244\215\346\214\207\345\215\227.docx" differ diff --git "a/LifeSciences/rMATs-4.1.2/doc/\351\262\262\351\271\217\345\237\272\345\272\247\350\275\257\344\273\266\346\220\255\345\273\272\346\214\207\345\215\227.docx" "b/LifeSciences/rMATs-4.1.2/doc/\351\262\262\351\271\217\345\237\272\345\272\247\350\275\257\344\273\266\346\220\255\345\273\272\346\214\207\345\215\227.docx" new file mode 100644 index 0000000000000000000000000000000000000000..52815d6b664df9b67c0956f7ec9a0a2f2eda10b7 Binary files /dev/null and "b/LifeSciences/rMATs-4.1.2/doc/\351\262\262\351\271\217\345\237\272\345\272\247\350\275\257\344\273\266\346\220\255\345\273\272\346\214\207\345\215\227.docx" differ diff --git a/LifeSciences/rMATs-4.1.2/rmats-4.1.2.sh b/LifeSciences/rMATs-4.1.2/rmats-4.1.2.sh new file mode 100644 index 0000000000000000000000000000000000000000..6ced6c1a64f2afd0399c18947951c9da62d913ec --- /dev/null +++ b/LifeSciences/rMATs-4.1.2/rmats-4.1.2.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +source "$( + cd "$(dirname "$0")" || exit 1 + pwd +)/common.sh" + +function install_development() { + sudo yum install -y wget tar patch Cython cmake git samtools + source /etc/profile +} + +function download_rmats() { + echo "# rmats正在下载" + + wget -t 10 -T 20 -c -O "$1"/rMATS_v4.1.2.tar.gz \ + https://github.com/Xinglab/rmats-turbo/releases/download/v4.1.2/rmats_turbo_v4_1_2.tar.gz + + if [[ $? -eq 0 ]]; then + echo -e "\033[1;32;1m# rmats已经下载成功\033[0m" + else + echo -e "\033[31m# rmats下载失败,请重新执行脚本\033[0m" + exit 1 + fi +} + +function install_rmats() { + echo "# rmats正在安装" + tar -xzf "$1"/rMATS_v4.1.2.tar.gz -C "$1" && rm -rf "$1"/rMATS_v4.1.2.tar.gz + cp "${SCRIPT_DIR}"/Makefile.rMATS_C.patch "$1"/rmats_turbo_v4_1_2/rMATS_C + cp "${SCRIPT_DIR}"/Makefile-lbfgs_scipy.patch "$1"/rmats_turbo_v4_1_2/rMATS_C/lbfgs_scipy + cd "$1"/rmats_turbo_v4_1_2 + + # 修改bamtool编译参数 + sed -i 's/cmake/cmake -D CMAKE_C_COMPILER=clang -D CMAKE_CXX_COMPILER=clang++/' Makefile + + # 修改rmats_pipeline编译参数 + sed -i -e 's/# export FC="$(which gfortran)" || return 1/export FC="$(which flang)" || return 1/' \ + -e 's/# export CC="$(which gcc)" || return 1/export CC="$(which clang)" || return 1/' \ + -e 's/# export CXX="$(which g++)" || return 1/export CXX="$(which clang++)" || return 1/' \ + setup_environment.sh + + # 修改rMATS_C编译参数 + patch -p0 <./rMATS_C/Makefile.rMATS_C.patch + patch -p0 <./rMATS_C/lbfgs_scipy/Makefile-lbfgs_scipy.patch + ./build_rmats --no-paired-model + echo -e "\033[1;32;1m# rmats已经安装完毕\033[0m" +} + +function mk_rmats() { + mkdir -p "$2"/rmats-4.1.2 && cp -r "$1"/rmats_turbo_v4_1_2/* "$2"/rmats-4.1.2 +} + +function main() { + set_script_dir + set -e + is_check_build_install_directory "$1" "$2" "rmats-4.1.2.sh" + is_check_build_equal "$1" "$2" + install_development + download_rmats "$1" + install_rmats "$1" "$2" + mk_rmats "$1" "$2" + rm -rf "$1"/rmats-4.1.2 +} + +main "$@"