-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_optitype.sh
45 lines (36 loc) · 1.18 KB
/
run_optitype.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
#!/bin/bash
# Get the parent directory of this script
SCRIPT_PATH=$(readlink -f "$0")
PARENT_DIR=$(dirname "$SCRIPT_PATH")
# Use parent directory to mount docker volume
HOST_PATH=$PARENT_DIR
VOLUME_PATH="/out"
for TRIAL_NUM in {0..24}; do
# Run Optitype with paired reads
echo ""
echo "working on paired ${TRIAL_NUM}"
TRIAL_DIR="$VOLUME_PATH"/reference/samples/trial_"$TRIAL_NUM"
OUTPUT_DIR="$VOLUME_PATH"/optitype_output_paired/optitype_results_run_"$TRIAL_NUM"
docker run --rm \
-v "$HOST_PATH":"$VOLUME_PATH" \
-t \
fred2/optitype \
-i "$TRIAL_DIR"/out.Unmapped.out.mate1.fastq \
"$TRIAL_DIR"/out.Unmapped.out.mate2.fastq \
--verbose \
-r \
-o "$OUTPUT_DIR"/optitype_results_run_"$TRIAL_NUM"
# Run Optitype with single reads
echo ""
echo "working on single ${TRIAL_NUM}"
TRIAL_DIR="$VOLUME_PATH"/reference/samples/trial_"$TRIAL_NUM"
OUTPUT_DIR="$VOLUME_PATH"/optitype_output_single/optitype_results_run_"$TRIAL_NUM"
docker run --rm \
-v "$HOST_PATH":"$VOLUME_PATH" \
-t \
fred2/optitype \
-i "$TRIAL_DIR"/out.Unmapped.out.mate1.fastq \
--verbose \
-r \
-o "$OUTPUT_DIR"/optitype_results_run_"$TRIAL_NUM"
done