-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_docker_image.sh
63 lines (55 loc) · 1.56 KB
/
test_docker_image.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
#!/bin/bash
set -e
test_image(){
img_tag=$1
[[ "${#img_tag}" == "0" ]] && echo "Please specify image" && return
[[ "$(docker run $img_tag echo True)" != "True" ]] && echo "Tag not found ($img_tag)" && return
docker run \
-v $PWD/output:/output \
-v $PWD/temp:/share \
-v $HOME:/root \
--rm \
$img_tag \
run.py \
--input /share/example.fastq.gz \
--sample-name example \
--output-folder /output \
--temp-folder /share \
--overwrite \
--max-mem 8 \
--threads 4 \
--interleaved && \
echo "Completed assembly + annotation" && \
docker run \
-v $PWD/output:/output \
-v $PWD/temp:/share \
-v $HOME:/root \
-v ~/.aws/credentials:/root/.aws/credentials \
--rm \
$img_tag \
run_metaspades.py \
--input s3://fh-pi-fredricks-d/lab/Sam_Minot/data/temp/metaspades_tests/example.fastq.gz \
--sample-name example \
--output-folder s3://fh-pi-fredricks-d/lab/Sam_Minot/data/temp/metaspades_tests/ \
--temp-folder /share \
--overwrite \
--max-mem 8 \
--threads 4 \
--interleaved && \
echo "Completed assembly only" && \
docker run \
-v $PWD/output:/output \
-v $PWD/temp:/share \
-v $HOME:/root \
-v ~/.aws/credentials:/root/.aws/credentials \
--rm \
$img_tag \
run_prokka.py \
--input s3://fh-pi-fredricks-d/lab/Sam_Minot/data/temp/metaspades_tests/example.fasta.gz \
--sample-name example \
--output-folder s3://fh-pi-fredricks-d/lab/Sam_Minot/data/temp/metaspades_tests/ \
--temp-folder /share \
--threads 4 && \
echo "Completed annotation only"
}
test_image $1