-
Notifications
You must be signed in to change notification settings - Fork 9
/
HybPhyloMaker0d_julia_setup_MetaCentrum.sh
61 lines (53 loc) · 1.81 KB
/
HybPhyloMaker0d_julia_setup_MetaCentrum.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
#----------------MetaCentrum----------------
#PBS -l walltime=1:0:0
#PBS -l select=1:ncpus=1:mem=4gb:scratch_local=1gb
#PBS -j oe
#PBS -N julia_packages_setup
#PBS -m abe
# ********************************************************************************
# * HybPhyloMaker - Pipeline for Hyb-Seq data processing and tree building *
# * https://github.com/tomas-fer/HybPhyloMaker *
# * Script 0d - Setup julia packages on Metacentrum *
# * v.1.8.0 *
# * Tomas Fer, Dept. of Botany, Charles University, Prague, Czech Republic, 2024 *
# * [email protected] *
# ********************************************************************************
if [[ $PBS_O_HOST == *".cz" ]]; then
echo -e "\nScript HybPhyloMaker0d is running on Metacentrum..."
else
echo -e "\nYou are not on Metacentrum. Install the julia packages by hand. Exiting...\n"
exit 3
fi
#Move to scratch
cd $SCRATCHDIR
#Copy file with settings from home and set variables from settings.cfg
cp $PBS_O_WORKDIR/settings.cfg .
. settings.cfg
#Add necessary modules
module add r/4.0.0-gcc
module add julia
#Use this command before running julia in HybPhyloMaker scripts
export JULIA_DEPOT_PATH=/storage/${server}/home/${LOGNAME}/.julia
cat << EOF | julia
#check installed packages
import Pkg; Pkg.status()
#install packages
Pkg.add("PhyloNetworks")
Pkg.add("PhyloPlots")
Pkg.add("RCall")
Pkg.add("DataFrames")
Pkg.add("CSV")
Pkg.add("Distributed")
Pkg.build("RCall")
using PhyloPlots
Pkg.status()
EOF
#Delete scratch
if [[ $PBS_O_HOST == *".cz" ]]; then
#delete scratch
if [[ ! $SCRATCHDIR == "" ]]; then
rm -rf $SCRATCHDIR/*
fi
fi
echo -e "\nScript HybPhyloMaker0d finished...\n"