diff --git a/LifeSciences/README.md b/LifeSciences/README.md index 2fd359dd05ab9f7badc27e23c5994e7fc89541eb..648e542097ba6c517ed9aba52da397d1cff4d727 100644 --- a/LifeSciences/README.md +++ b/LifeSciences/README.md @@ -3,4 +3,5 @@ Life Sciences Software List: - repositories: TRF-4.09.1 - repositories: genewise-2.4.1 - repositories: trimmomatic-0.40 +- repositories: redundans-v0.13c - repositories: RepeatMasker-4.1.2 diff --git a/LifeSciences/redundans-v0.13c/build.sh b/LifeSciences/redundans-v0.13c/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..e9821bebb1bb7e5c61a778c0bcc9bd18da8274c3 --- /dev/null +++ b/LifeSciences/redundans-v0.13c/build.sh @@ -0,0 +1,53 @@ +#!/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 environment-modules systemd-devel +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 redundans-v0.13c.sh $buildpath $installpath + +mkdir -p pkg/redundans-v0.13c-hpc && cp -r $installpath/* pkg/redundans-v0.13c-hpc/ +cat>"pkg/redundans-v0.13c-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 redundans-v0.13c-hpc.tar.gz redundans-v0.13c-hpc + +rm -rf $buildpath $installpath diff --git a/LifeSciences/redundans-v0.13c/dependency/bisheng-compiler-2.1.0.sh b/LifeSciences/redundans-v0.13c/dependency/bisheng-compiler-2.1.0.sh new file mode 100644 index 0000000000000000000000000000000000000000..e30d4b3fc6a847fb1323a249e0dc70d85abbf462 --- /dev/null +++ b/LifeSciences/redundans-v0.13c/dependency/bisheng-compiler-2.1.0.sh @@ -0,0 +1,42 @@ +#!/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/redundans-0.13c/redundans_modulefiles"<