diff --git a/LifeSciences/README.md b/LifeSciences/README.md index 0fbae3f8c71f4f843628c6f1469a0b5e2d7ead3a..0b69981b775d1ea28f0309340b25972be3f1fb51 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: falcon-v0.3.0 \ No newline at end of file diff --git a/LifeSciences/falcon-v0.3.0/build.sh b/LifeSciences/falcon-v0.3.0/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..d09d1a9995ae1072c68bcf83ec855678c31d4954 --- /dev/null +++ b/LifeSciences/falcon-v0.3.0/build.sh @@ -0,0 +1,67 @@ +#!/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-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/nim-0.18.0.sh $buildpath $installpath +module use $installpath/nim-0.18.0 +module load $installpath/nim-0.18.0/nim_modulefiles + + +bash $dep_dir/Anaconda3.sh $buildpath $installpath +module use $installpath/Anaconda3 +module load $installpath/Anaconda3/anaconda3_modulefiles +source activate python27 + +bash falcon-v0.3.0.sh $buildpath $installpath +module use $installpath/FALCON-master/FALCON-integrate/fc_env/ +module load $installpath/FALCON-master/FALCON-integrate/fc_env/falcon_modulefiles + +mkdir -p pkg/falcon-v0.3.0-hpc && cp -r $installpath/* pkg/falcon-v0.3.0-hpc/ +cat>"pkg/falcon-v0.3.0-hpc/run.sh"< /dev/null +current_dir=\$(cd "\$(dirname "\${BASH_SOURCE[0]}")" &> /dev/null && pwd) +for d in \$(ls \$current_dir) +do + [[ ! \$d =~ "FALCON-master" && ! -f "\$current_dir/\$d" ]] && cd \$current_dir/\$d && module use \$(pwd) && module load \$(pwd)/*modulefiles +done + +module use \$current_dir/FALCON-master/FALCON-integrate/fc_env/ +module load \$current_dir/FALCON-master/FALCON-integrate/fc_env/falcon_modulefiles + +cd \$current_dir +EOF +cd pkg/ && tar zcvf falcon-v0.3.0-hpc.tar.gz falcon-v0.3.0-hpc + +rm -rf $buildpath diff --git a/LifeSciences/falcon-v0.3.0/dependency/Anaconda3.sh b/LifeSciences/falcon-v0.3.0/dependency/Anaconda3.sh new file mode 100644 index 0000000000000000000000000000000000000000..acb03245cba19bf9ff5aa8fab4acd94bcda14fee --- /dev/null +++ b/LifeSciences/falcon-v0.3.0/dependency/Anaconda3.sh @@ -0,0 +1,51 @@ +#!/bin/bash + + +### 使用Anaconda3来安装python依赖 +if [[ $# -ne 2 ]]; then + echo "The format is as follows:" + echo "bash Anaconda3.sh.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 +[[ "$buildpath" == "$installpath" ]] && echo "构建路径与安装路径需为不同路径" && exit 1 +yum install -y wget tar cmake environment-modules --nogpgcheck +wget -t 0 -c -P $buildpath https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-aarch64.sh + +bash $buildpath/Anaconda3-2021.11-Linux-aarch64.sh -b -p $installpath/Anaconda3 + +$installpath/Anaconda3/bin/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ +$installpath/Anaconda3/bin/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ +$installpath/Anaconda3/bin/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge +$installpath/Anaconda3/bin/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ + +echo "y" > input.data +$installpath/Anaconda3/bin/conda create --name python27 python=2.7 < input.data +rm -rf input.data + +cat>"$installpath/Anaconda3/anaconda3_modulefiles"<"$installpath/bisheng-compiler-2.1.0/bisheng_modulefiles"<"$installpath/nim-0.18.0/nim_modulefiles"<"$installpath/FALCON-master/FALCON-integrate/fc_env/falcon_modulefiles"<