diff --git a/LifeSciences/README.md b/LifeSciences/README.md index d3aadd7a731e34a52f0676e2d2dc33797db13888..445fbc7d1a139a9e90429b3f249a5c597ef09b4d 100644 --- a/LifeSciences/README.md +++ b/LifeSciences/README.md @@ -1,2 +1,3 @@ Life Sciences Software List: - repositories: xxx +- repositories: hmmer-3.3.2 diff --git a/LifeSciences/hmmer-3.3.2/build.sh b/LifeSciences/hmmer-3.3.2/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..81712fd20aa834a8ddca1587250856744babc2ad --- /dev/null +++ b/LifeSciences/hmmer-3.3.2/build.sh @@ -0,0 +1,63 @@ +#!/bin/bash +export LANG="en_US.UTF-8" +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) +[[ "$buildpath" == "$installpath" ]] && echo "构建路径与安装路径需为不同路径" && exit 1 +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 $dep_dir/hmpi-1.1.1.sh $buildpath $installpath +module use $installpath/hmpi-1.1.1 +module load $installpath/hmpi-1.1.1/hmpi_modulefiles + +bash $dep_dir/autoconf-2.71.sh $buildpath $installpath +module use $installpath/autoconf-2.71 +module load $installpath/autoconf-2.71/autoconf_modulefiles + +bash hmmer-3.3.2.sh $buildpath $installpath + +mkdir -p pkg/hmmer-3.3.2-hpc && cp -r $installpath/* pkg/hmmer-3.3.2-hpc/ +cat>"pkg/hmmer-3.3.2-hpc/run.sh"< /dev/null +current_dir=\$(cd "\$(dirname "\${BASH_SOURCE[0]}")" &> /dev/null && pwd) +for d in \$(ls \$current_dir) +do + [[ ! \$d =~ "hmmer" && ! -f "\$current_dir/\$d" ]] && cd \$current_dir/\$d && module use \$(pwd) && module load \$(pwd)/*modulefiles +done +export PATH=\$current_dir/hmmer-3.3.2/bin:\$PATH +cd \$current_dir +[[ ! -d "$installpath/hmpi-1.1.1" ]] && mkdir -p $installpath/hmpi-1.1.1 && cp -r \$current_dir/hmpi-1.1.1/* $installpath/hmpi-1.1.1/ +EOF +cd pkg/ && tar zcvf hmmer-3.3.2-hpc.tar.gz hmmer-3.3.2-hpc + +rm -rf $buildpath $installpath + diff --git a/LifeSciences/hmmer-3.3.2/dependency/autoconf-2.71.sh b/LifeSciences/hmmer-3.3.2/dependency/autoconf-2.71.sh new file mode 100644 index 0000000000000000000000000000000000000000..857345fb0155d722674359c1ae6c4f001f3dc052 --- /dev/null +++ b/LifeSciences/hmmer-3.3.2/dependency/autoconf-2.71.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "bash zlib-1.12.11.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 + +wget -t 0 -c -P $buildpath http://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.gz +cd $buildpath +tar -zxvf autoconf-2.71.tar.gz +cd autoconf-2.71 +./configure --prefix=$installpath/autoconf-2.71 +make && make install + +mkdir -p $installpath/autoconf-2.71 && cp -r $buildpath/autoconf-2.71/* $installpath/autoconf-2.71/ + +cat>"$installpath/autoconf-2.71/autoconf_modulefiles"<"$installpath/bisheng-compiler-2.1.0/bisheng_modulefiles"<"$installpath/hmpi-1.1.1/hmpi_modulefiles"<