diff --git a/LifeSciences/README.md b/LifeSciences/README.md index 125a1338214bb1cea805525f1a79834e5a7b6338..90e4d8d71015b85bb1e3a03c5091ea1911a184da 100644 --- a/LifeSciences/README.md +++ b/LifeSciences/README.md @@ -2,3 +2,4 @@ Life Sciences Software List: - repositories: xxx - repositories: TRF-4.09.1 - repositories: genewise-2.4.1 +- repositories: trimmomatic-0.40 diff --git a/LifeSciences/trimmomatic-0.40/build.sh b/LifeSciences/trimmomatic-0.40/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..94d42ad932485e20cc67351ec5957ab04e9d1fe4 --- /dev/null +++ b/LifeSciences/trimmomatic-0.40/build.sh @@ -0,0 +1,58 @@ +#!/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-jdk-8u322.sh $buildpath $installpath +module use $installpath/bisheng-jdk-8u322 +module load $installpath/bisheng-jdk-8u322/bisheng_jdk_modulefiles + +bash $dep_dir/apache-ant-1.9.16.sh $buildpath $installpath +module use $installpath/apache-ant-1.9.16 +module load $installpath/apache-ant-1.9.16/apache-ant-1.9.16_modulefiles + + + +bash trimmomatic-0.40.sh $buildpath $installpath + +mkdir -p pkg/trimmomatic-0.40-hpc && cp -r $installpath/* pkg/trimmomatic-0.40-hpc/ +cat>"pkg/trimmomatic-0.40-hpc/run.sh"< /dev/null +current_dir=\$(cd "\$(dirname "\${BASH_SOURCE[0]}")" &> /dev/null && pwd) +for d in \$(ls \$current_dir) +do + [[ ! \$d =~ "trimmomatic" && ! -f "\$current_dir/\$d" ]] && cd \$current_dir/\$d && module use \$(pwd) && module load \$(pwd)/*modulefiles +done +cd \$current_dir +EOF +cd pkg/ && tar zcvf trimmomatic-0.40-hpc.tar.gz trimmomatic-0.40-hpc + +rm -rf $buildpath $installpath + diff --git a/LifeSciences/trimmomatic-0.40/dependency/apache-ant-1.9.16.sh b/LifeSciences/trimmomatic-0.40/dependency/apache-ant-1.9.16.sh new file mode 100644 index 0000000000000000000000000000000000000000..be84aa4c00ca317f1c567b3f07bacfc66692d2da --- /dev/null +++ b/LifeSciences/trimmomatic-0.40/dependency/apache-ant-1.9.16.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "./apache-ant-1.9.16.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 +set -e +buildpath=$1 +installpath=$2 +if [[ "$1" =~ .*/$ ]]; then buildpath=${buildpath%/*}; fi +if [[ "$2" =~ .*/$ ]]; then installpath=${installpath%/*}; fi +[[ "$buildpath" == "$installpath" ]] && echo "构建路径与安装路径需为不同路径" && exit 1 +yum install -y wget tar environment-modules +wget -t 0 -c -P $buildpath https://dlcdn.apache.org//ant/binaries/apache-ant-1.9.16-bin.tar.gz +tar xf $buildpath/apache-ant-1.9.16-bin.tar.gz -C $buildpath && rm -rf $buildpath/apache-ant-1.9.16-bin.tar.gz + +mkdir -p $installpath/apache-ant-1.9.16 && cp -r $buildpath/apache-ant-1.9.16/* $installpath/apache-ant-1.9.16/ + +cat>"$installpath/apache-ant-1.9.16/apache-ant-1.9.16_modulefiles"<"$installpath/bisheng-jdk-8u322/bisheng_jdk_modulefiles"<