-
Notifications
You must be signed in to change notification settings - Fork 0
/
start_vm.sh
46 lines (40 loc) · 1.46 KB
/
start_vm.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
#!/usr/bin/env bash
#### Local
REMOTE=ubuntu@X.X.X.X
REMOTE_FOLDER=/scratch/tlatrill/
LOCAL_FOLDER=~/Documents
ssh -X ${REMOTE}
#### Remote
cd ${REMOTE_FOLDER}
git clone https://github.com/ThibaultLatrille/AdaptaPop
cd ${REMOTE_FOLDER}/AdaptaPop
mkdir ./Contrasts/pickle
mkdir ./OrthoMam/Datasets
chmod 755 install.sh
./install.sh
#### Local (copy dataset to remote)
cd ${LOCAL_FOLDER}/AdaptaPop
scp utils.tar.xz ${REMOTE}:${REMOTE_FOLDER}/AdaptaPop
scp Polymorphism/CDS.ANNOT.tar.xz ${REMOTE}:${REMOTE_FOLDER}/AdaptaPop/Polymorphism
scp OrthoMam/Experiments.tar.xz ${REMOTE}:${REMOTE_FOLDER}/AdaptaPop/OrthoMam
scp OrthoMam/Datasets/omm.tar.xz ${REMOTE}:${REMOTE_FOLDER}/AdaptaPop/OrthoMam/Datasets
#### Remote (extract datasets)
cd ${REMOTE_FOLDER}/AdaptaPop
tar -xf utils.tar.xz
cd ${REMOTE_FOLDER}/AdaptaPop/Polymorphism
tar -xf CDS.ANNOT.tar.xz
cd ${REMOTE_FOLDER}/AdaptaPop/OrthoMam
tar -xf Experiments.tar.xz
cd ${REMOTE_FOLDER}/AdaptaPop/OrthoMam/Datasets
tar -xf omm.tar.xz
screen -dmS Snakemake bash -c "cd ${REMOTE_FOLDER}/AdaptaPop/Contrasts && snakemake -j 32 -k --printshellcmds"
#### Compress and copy experimetn
EXP="polyDFE_modelC_no_control"
#### Remote (compress results)
cd ${REMOTE_FOLDER}/AdaptaPop/Contrasts
rm -rf ./${EXP}/*/tmp/
tar -zcvf "${EXP}.tar.gz" "${EXP}"
#### Local (copy results from remote)
scp -r ${REMOTE}:${REMOTE_FOLDER}/AdaptaPop/Contrasts/${EXP} ${LOCAL_FOLDER}/AdaptaPop/Contrasts
cd ${LOCAL_FOLDER}/AdaptaPop/Contrasts
gunzip "${EXP}.tar.gz"