diff --git a/LifeSciences/3d-dna-180922/3d-dna-180922.sh b/LifeSciences/3d-dna-180922/3d-dna-180922.sh new file mode 100644 index 0000000000000000000000000000000000000000..1fdfdfb01236768a7c286fb0f2e007f8a756fe81 --- /dev/null +++ b/LifeSciences/3d-dna-180922/3d-dna-180922.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "./3d-dna.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 +if [[ "$1" == "$2" ]]; then echo "构建路径与安装路径不能相同,请输入正确的路径"; exit 1; fi + +buildpath=$1 +installpath=$2 +yum install -y wget tar environment-modules +#安装3d-dna运行时环境 jdk +yum install -y java-1.8.0-openjdk python3 python3-matplotlib python3-numpy python3-scipy +#获取3d-dna源码,解压,增加执行权限 +wget -t 10 -c -P $buildpath https://codeload.github.com/aidenlab/3d-dna/zip/refs/heads/master +cd $buildpath +unzip master +chmod +x -R $buildpath/3d-dna-master +mkdir $installpath/3d-dna +cp -r $buildpath/3d-dna-master/* $installpath/3d-dna/ +cat>"$installpath/3d-dna/3d-dna_modulefiles"<"pkg/3d-dna-180922-hpc/run.sh"< /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 3d-dna-180922-hpc.tar.gz 3d-dna-180922-hpc + +rm -rf $buildpath $installpath diff --git a/LifeSciences/3d-dna-180922/dependency/lastz.sh b/LifeSciences/3d-dna-180922/dependency/lastz.sh new file mode 100644 index 0000000000000000000000000000000000000000..1bb24223b6d2501b95fc63659616c200df9ef6a6 --- /dev/null +++ b/LifeSciences/3d-dna-180922/dependency/lastz.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "bash lastz.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 10 -c -P $buildpath https://github.com/lastz/lastz/archive/refs/tags/1.04.15.tar.gz +tar xf $buildpath/1.04.15.tar.gz -C $buildpath && rm -rf $buildpath/1.04.15.tar.gz +cd $buildpath/lastz-1.04.15 +export LASTZ_INSTALL=$installpath/lastz-distrib/bin +make -j$(nproc) +make install +cat>"$installpath/lastz-distrib/lastz_modulefiles"<