-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbatch.sh
executable file
·71 lines (50 loc) · 1.23 KB
/
batch.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
68
69
70
71
#!/bin/bash
# set directory where smaltalign.sh is located
script_dir="/analyses/Diagnostics/Repositories/SmaltAlign/"
# set sample directory to the directory where this file is
sample_dir=$(dirname "$(readlink -f "$0")")
# set SmaltAlign parameters
n=200000 # number of reads (default 200000)
i=4 # iterations (default 4)
# define Virus and subtype of the sequencing samples
HCV_1a=("")
HCV_1b=("")
HCV_1b_2k=("")
HCV_1h=("")
HCV_1l=("")
HCV_2c=("")
HCV_3a=("")
HCV_3b=("")
HCV_4d=("")
HCV_4f=("")
HCV_6e=("")
HCV_6j=("")
HIV_1=("")
HIV_2=("")
HSV_1=("")
# define an array containing all Viruses
viruses=(HCV_1a HCV_1b HCV_1b_2k HCV_1h HCV_1l
HCV_2c
HCV_3a HCV_3b
HCV_4d HCV_4f
HCV_6e HCV_6j
HIV_1 HIV_2
HSV_1)
# run SmaltAlign for all defined samples
for virus in "${viruses[@]}"
do
for sample in ${!virus}
do
if [ "${#sample}" -eq "0" ]
then
continue
fi
${script_dir}/smaltalign.sh \
-r ${script_dir}/References/${virus}.fasta \
-n $n \
-i $i $sample
done
done
# run R scripts with sample_dir as variable input
Rscript ${script_dir}/cov_plot.R ${sample_dir}
Rscript ${script_dir}/wts.R ${sample_dir}