forked from MarWoes/wg-blimp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test_runs.sh
executable file
·67 lines (49 loc) · 1.81 KB
/
test_runs.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
62
63
64
65
66
67
#!/bin/bash
set -e
set -o pipefail
NUM_CORES_AVAILABLE=$(nproc --all)
CREATED_CONFIG_TEST_DIR=$(mktemp -d)
mkdir -p $CREATED_CONFIG_TEST_DIR
wg-blimp create-config \
--cores-per-job=$NUM_CORES_AVAILABLE \
$(realpath test/fastq/) \
$(realpath test/lambda-phage.fa) \
simulated1,simulated2 \
simulated3,simulated4 \
$CREATED_CONFIG_TEST_DIR \
$CREATED_CONFIG_TEST_DIR/config.yaml
echo "[INFO] Content of created config:"
cat $CREATED_CONFIG_TEST_DIR/config.yaml
echo simulated1 > $CREATED_CONFIG_TEST_DIR/g1.txt
echo simulated2 >> $CREATED_CONFIG_TEST_DIR/g1.txt
echo simulated3 > $CREATED_CONFIG_TEST_DIR/g2.txt
echo simulated4 >> $CREATED_CONFIG_TEST_DIR/g2.txt
wg-blimp create-config \
--cores-per-job=$NUM_CORES_AVAILABLE \
--use-sample-files \
$(realpath test/fastq/) \
$(realpath test/lambda-phage.fa) \
$CREATED_CONFIG_TEST_DIR/g1.txt \
$CREATED_CONFIG_TEST_DIR/g2.txt \
$CREATED_CONFIG_TEST_DIR \
$CREATED_CONFIG_TEST_DIR/config.yaml
echo "[INFO] Running snakemake from created config"
echo "[INFO] Dry run"
wg-blimp run-snakemake-from-config --cores=$NUM_CORES_AVAILABLE --dry-run $CREATED_CONFIG_TEST_DIR/config.yaml
echo "[INFO] Actual run"
wg-blimp run-snakemake-from-config --cores=$NUM_CORES_AVAILABLE $CREATED_CONFIG_TEST_DIR/config.yaml
echo "[INFO] Deleting output"
wg-blimp delete-all-output --yes $CREATED_CONFIG_TEST_DIR/config.yaml
echo "[INFO] Running standard workflow"
wg-blimp run-snakemake \
--cores=$NUM_CORES_AVAILABLE \
--use-sample-files \
$(realpath test/fastq/) \
$(realpath test/lambda-phage.fa) \
$CREATED_CONFIG_TEST_DIR/g1.txt \
$CREATED_CONFIG_TEST_DIR/g2.txt \
$CREATED_CONFIG_TEST_DIR
echo "[INFO] Deleting files again"
wg-blimp delete-all-output --yes $CREATED_CONFIG_TEST_DIR/config.yaml
echo "[INFO] Removing folder"
rm -r $CREATED_CONFIG_TEST_DIR