diff --git a/LifeSciences/README.md b/LifeSciences/README.md index 0fbae3f8c71f4f843628c6f1469a0b5e2d7ead3a..758d55a065d6717c54b695278813b8ed30112877 100644 --- a/LifeSciences/README.md +++ b/LifeSciences/README.md @@ -6,4 +6,5 @@ Life Sciences Software List: - repositories: RepeatMasker-4.1.2 - repositories: eigensoft-7.2.1 - repositories: redundans-v0.13c -- repositories: bamtools-2.5.2 \ No newline at end of file +- repositories: bamtools-2.5.2 +- repositories: nanopack-1.1.0 \ No newline at end of file diff --git a/LifeSciences/nanopack-1.1.0/build.sh b/LifeSciences/nanopack-1.1.0/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..f0e3b7db37318754f75a417762767ce499d58535 --- /dev/null +++ b/LifeSciences/nanopack-1.1.0/build.sh @@ -0,0 +1,54 @@ +#!/bin/bash +set -e +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "bash nanopack_dep_install.sh buildpath installpath" + echo ":param buildpath: 应用构建绝对路径" + echo ":param installpath: 应用安装绝对路径" + exit 1 +fi + +if [[ ! "$1" =~ ^/.* || "$1" = "/" ]]; then echo "请输入正确的构建路径"; exit 1; fi +if [[ ! "$2" =~ ^/.* || "$2" = "/" ]]; then echo "请输入正确的安装路径"; exit 1; fi + +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 +module purge + +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/Python3.sh $buildpath $installpath +module use $installpath/python3 +module load $installpath/python3/python_modulefiles + +bash nanopack.sh $installpath + +mkdir -p pkg/nanopack-hpc && cp -r $installpath/* pkg/nanopack-hpc/ +cat>"pkg/nanopack-hpc/run.sh"< /dev/null +current_dir=\$(cd "\$(dirname "\${BASH_SOURCE[0]}")" &> /dev/null && pwd) +for d in \$(ls \$current_dir) +do + [[ ! \$d =~ "nanopack" && ! -f "\$current_dir/\$d" ]] && cd \$current_dir/\$d && module use \$(pwd) && module load \$(pwd)/*modulefiles +done +EOF +cd pkg/ && tar zcvf nanopack-hpc.tar.gz nanopack-hpc + +rm -rf $buildpath $installpath + diff --git a/LifeSciences/nanopack-1.1.0/dependency/Python3.sh b/LifeSciences/nanopack-1.1.0/dependency/Python3.sh new file mode 100644 index 0000000000000000000000000000000000000000..419b91108ade46fe53175f9d192b8120dc562668 --- /dev/null +++ b/LifeSciences/nanopack-1.1.0/dependency/Python3.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "bash Python3.sh buildpath installpath" + echo ":param buildpath: 应用构建绝对路径" + echo ":param installpath: 应用安装绝对路径" + exit 1 +fi + +if [[ ! "$1" =~ ^/.* || ! -d "$1" || "$1" = "/" ]]; then echo "请输入正确的构建路径"; exit 1; fi +if [[ ! "$2" =~ ^/.* || ! -d "$2" || "$2" = "/" ]]; then echo "请输入正确的安装路径"; exit 1; fi + +buildpath=$1 +installpath=$2 +if [[ "$1" =~ .*/$ ]]; then buildpath=${buildpath%/*}; fi +if [[ "$2" =~ .*/$ ]]; then installpath=${installpath%/*}; fi +if [[ "$buildpath" == "$installpath" ]]; then echo "构建路径和安装路径相同,请重新输入"; exit 1; fi + +yum install -y gcc make wget openssl openssl-devel readline readline-devel zlib* libffi-devel tar + +wget -t 0 -c -P $buildpath https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tgz +tar -xvf $buildpath/Python-3.8.2.tgz -C $buildpath && rm -rf $buildpath/Python-3.8.2.tgz +cd $buildpath/Python-3.8.2 + +./configure --prefix=$installpath/python3 CC=clang CXX=clang++ FC=flang +make -j$(nproc) +make -j$(nproc) install + + +cat>"$installpath/python3/python_modulefiles"<"$installpath/bisheng-compiler-2.1.0/bisheng_modulefiles"<