diff --git a/LifeSciences/Augustus-3.4.0/Augustus-3.4.0.sh b/LifeSciences/Augustus-3.4.0/Augustus-3.4.0.sh new file mode 100644 index 0000000000000000000000000000000000000000..2b2ef7674b7ca51b020b133c26262acae786c964 --- /dev/null +++ b/LifeSciences/Augustus-3.4.0/Augustus-3.4.0.sh @@ -0,0 +1,63 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "bash Augustus-3.4.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 +if [[ "$1" == "$2" ]]; then echo "构建路径与安装路径需为不能路径,请输入正确的路径"; exit 1; fi + +buildpath=$1 +installpath=$2 +[[ "$buildpath" =~ .*/$ ]] && buildpath=${buildpath%/*} +[[ "$installpath" =~ .*/$ ]] && installpath=${installpath%/*} +yum install -y environment-modules csh time patch libatomic perl-Data-Dumper autoconf automake libtool numactl binutils systemd-devel valgrind flex wget + +set -e +wget -t 0 -c -P $buildpath https://github.com/Gaius-Augustus/Augustus/archive/refs/tags/v3.4.0.tar.gz +tar xf $buildpath/v3.4.0.tar.gz -C $buildpath && rm -rf $buildpath/v3.4.0.tar.gz + +cd $buildpath/Augustus-3.4.0 +export TOOLDIR=$installpath/AUGUSTUS +export LD_LIBRARY_PATH=$installpath/AUGUSTUS/bamtools-2.5.2/lib64:$LD_LIBRARY_PATH +export LIBRARY_PATH=$installpath/AUGUSTUS/bamtools-2.5.2/lib64:$LIBRARY_PATH + +echo "--修改/usr/include/bamtools--" +sed -i 's|/usr/include/bamtools|${installpath}/AUGUSTUS/bamtools-2.5.2/include/bamtools|g' `grep -rl "/usr/include/bamtools" ./` +sed -i 's|/opt/augustus|'$installpath'/AUGUSTUS/Augustus|g' Makefile + +echo "--修改common.mk文件--" +#修改AUGVERSION = 3.4.0 +sed -i "s/3.3.3/3.4.0/g" common.mk +#修改makefile:添加MYSQL = false (masql++) +sed -i '$a\MYSQL = false' common.mk +#修改COMPGENEPRED = false (lp_solve) +sed -i "s/COMPGENEPRED = true/COMPGENEPRED = false/g" common.mk + +echo "--修改bam2hints的makefile--" +#修改bam2hints的makefile +cd $buildpath/Augustus-3.4.0/auxprogs/bam2hints +sed -i 's|INCLUDES = -I${installpath}/AUGUSTUS/bamtools-2.5.2/include/bamtools|INCLUDES = -I/$(BAMTOOLS)/include/bamtools|g' Makefile +sed -i 's|LIBS = -lbamtools -lz|LIBS = $(BAMTOOLS)/lib64/libbamtools.a -lz |g' Makefile + +echo "--修改filterBam/src的makefile--" +#修改filterBam/src的makefile +cd $buildpath/Augustus-3.4.0/auxprogs/filterBam/src +sed -i 's|BAMTOOLS = ${installpath}/AUGUSTUS/bamtools/include/bamtools|\#BAMTOOLS = ${installpath}/AUGUSTUS/bamtools/include/bamtools|g' Makefile +sed -i 's|INCLUDES = -I$(BAMTOOLS) -Iheaders|INCLUDES = -I$(BAMTOOLS)/include/bamtools -Iheaders|g' Makefile +sed -i 's|LIBS = -lbamtools|LIBS = $(BAMTOOLS)/lib64/libbamtools.a|g' Makefile + +cd $buildpath/Augustus-3.4.0 +echo "--make start--" +CXX=clang++ CC=clang make -j$(nproc) BAMTOOLS=${installpath}/AUGUSTUS/bamtools-2.5.2 +echo "--make end--" +make -j$(nproc) install + +mkdir -p $installpath/AUGUSTUS/Augustus-3.4.0 && cp -r $buildpath/Augustus-3.4.0/* $installpath/AUGUSTUS/Augustus-3.4.0 + +rm -rf $buildpath/Augustus-3.4.0 diff --git a/LifeSciences/Augustus-3.4.0/build.sh b/LifeSciences/Augustus-3.4.0/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..f314ca70496e31a6e530b921e3a511b4dee5e305 --- /dev/null +++ b/LifeSciences/Augustus-3.4.0/build.sh @@ -0,0 +1,86 @@ +#!/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 +#begin +yum install -y libcurl libcurl-devel openssl openssl-devel boost-devel --nogpgcheck +yum install -y ncurses ncurses-base ncurses-libs ncurses-devel +yum install -y gcc gcc-c++ make automake +yum -y install boost-iostreams.aarch64 +yum -y install boost-serialization.aarch64 +yum install -y zlib zlib-devel bzip2 bzip2-devel xz-devel +yum install -y git +yum install -y gsl* + + +source /etc/profile +module purge + +set -e +dep_dir="dependency" +bash $dep_dir/bisheng-compiler-2.1.0.sh $buildpath $installpath +module use $installpath/AUGUSTUS/bisheng-compiler-2.1.0 +module load $installpath/AUGUSTUS/bisheng-compiler-2.1.0/bisheng_modulefiles + +# cmake的版本号>3.6 +yum install -y cmake + + +#htslib +yum install -y htslib* + + +#samtools +yum install -y samtools + +bash $dep_dir/bcftools-1.9.sh $buildpath $installpath +module use $installpath/AUGUSTUS/bcftools-1.9 +module load $installpath/AUGUSTUS/bcftools-1.9/bcftools_modulefiles + +bash $dep_dir/bamtools-2.5.2.sh $buildpath $installpath +module use $installpath/AUGUSTUS/bamtools-2.5.2 +module load $installpath/AUGUSTUS/bamtools-2.5.2/bamtools_modulefiles + + +bash Augustus-3.4.0.sh $buildpath $installpath + +mkdir -p pkg/Augustus-3.4.0-hpc && cp -r $installpath/AUGUSTUS/* pkg/Augustus-3.4.0-hpc/ + + +cat>"pkg/Augustus-3.4.0-hpc/run.sh"<"$installpath/AUGUSTUS/bamtools-2.5.2/bamtools_modulefiles"<"$installpath/AUGUSTUS/bcftools-1.9/bcftools_modulefiles"<"$installpath/AUGUSTUS/bisheng-compiler-2.1.0/bisheng_modulefiles"<