diff --git a/LifeSciences/README.md b/LifeSciences/README.md index 367845be4aa4e9181ab63cd49a1aa6d9bf688499..125a1338214bb1cea805525f1a79834e5a7b6338 100644 --- a/LifeSciences/README.md +++ b/LifeSciences/README.md @@ -1,3 +1,4 @@ Life Sciences Software List: - repositories: xxx - repositories: TRF-4.09.1 +- repositories: genewise-2.4.1 diff --git a/LifeSciences/genewise-2.4.1/build.sh b/LifeSciences/genewise-2.4.1/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..12974a65fabf82d139f7fafbbbf309c1ce6795b8 --- /dev/null +++ b/LifeSciences/genewise-2.4.1/build.sh @@ -0,0 +1,49 @@ +#!/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 environment-modules +source /etc/profile +module purge + +set -e +dep_dir="dependency" +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 + +bash genewise-2.4.1.sh $buildpath $installpath +mkdir -p pkg/genewise-2.4.1-hpc && cp -r $installpath/* pkg/genewise-2.4.1-hpc/ +cat>"pkg/genewise-2.4.1-hpc/run.sh"< /dev/null +current_dir=\$(cd "\$(dirname "\${BASH_SOURCE[0]}")" &> /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 +done +EOF +cd pkg/ && tar zcvf genewise-2.4.1-hpc.tar.gz genewise-2.4.1-hpc + +rm -rf $buildpath $installpath + diff --git a/LifeSciences/genewise-2.4.1/dependency/bisheng-compiler-2.1.0.sh b/LifeSciences/genewise-2.4.1/dependency/bisheng-compiler-2.1.0.sh new file mode 100644 index 0000000000000000000000000000000000000000..a53069995751e081370ff3e2559fbc3b2dfd3f4c --- /dev/null +++ b/LifeSciences/genewise-2.4.1/dependency/bisheng-compiler-2.1.0.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "bash bisheng-compiler-2.1.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 + +buildpath=$1 +installpath=$2 +[[ "$buildpath" =~ .*/$ ]] && buildpath=${buildpath%/*} +[[ "$installpath" =~ .*/$ ]] && installpath=${installpath%/*} +[[ "$buildpath" == "$installpath" ]] && echo "构建路径与安装路径需为不同路径" && exit 1 +set -e +yum install -y wget tar environment-modules libatomic + +wget -t 0 -c -P $buildpath https://mirrors.huaweicloud.com/kunpeng/archive/compiler/bisheng_compiler/bisheng-compiler-2.1.0-aarch64-linux.tar.gz +tar xf $buildpath/bisheng-compiler-2.1.0-aarch64-linux.tar.gz -C $buildpath && rm -rf $buildpath/bisheng-compiler-2.1.0-aarch64-linux.tar.gz +mkdir -p $installpath/bisheng-compiler-2.1.0 && cp -r $buildpath/bisheng-compiler-2.1.0-aarch64-linux/* $installpath/bisheng-compiler-2.1.0/ + +cat>"$installpath/bisheng-compiler-2.1.0/bisheng_modulefiles"<"$installpath/wise2.4.1/genewise_modulefiles"<