-
Notifications
You must be signed in to change notification settings - Fork 0
/
doit05.bash
executable file
·47 lines (34 loc) · 948 Bytes
/
doit05.bash
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
#! /bin/bash
. doit-preamble.bash
# ------------------------------------------------------------------------
# Step 5. Make profiles
# ------------------------------------------------------------------------
echo 1>&2 fixme: need to limit to bacteria accessions
exit 1
rm -rf ${PROFILES}
mkdir -p ${PROFILES}
echo 1>&2 '# Making profiles'
if [ "$PE" ] ; then
opt_12=-2
else
opt_12=-1
fi
case X"$ORIENTATION"X in
XforwardX) opt_r= ;;
XreverseX) opt_r=-r ;;
X*X) echo 1>&2 cannot happen ; exit 1
esac
(
for i in $SAMPLES_INDICES ; do
name=${SAMPLES_NAME[i]}
echo "samtools view -h ${BOWTIE2}/aligned_$i.bam \
| ./scripts/sam2profiles $opt_12 $opt_r \
-e -s -n \
-d ${PROFILES} \
-t ${name}"
done
) | run_commands
# ------------------------------------------------------------------------
# Done.
# ------------------------------------------------------------------------
echo 1>&2 '# Done.'