-
Notifications
You must be signed in to change notification settings - Fork 0
/
doit13-normalize.bash
executable file
·41 lines (29 loc) · 1.11 KB
/
doit13-normalize.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
#! /bin/bash
. $(dirname ${BASH_SOURCE[0]})/doit-preamble.bash
. config13.bash
# ------------------------------------------------------------------------
if [ ! -f ${DATA}/assembly.fasta ] ; then
echo 1>&2 "${DATA}/assembly.fasta is missing."
echo 1>&2 "Perhaps: cp ${NEXTPOLISH}/polished.fasta ${DATA}/assembly.fasta"
exit 1
fi
# ------------------------------------------------------------------------
# "Normalize" the genome.
# ------------------------------------------------------------------------
echo 1>&2 '# "Normalizing" the genome...'
rm -rf ${NORMALIZED}
mkdir -p ${NORMALIZED}
cat ${DATA}/assembly.fasta \
| ${PIPELINE}/scripts/dephix \
> ${NORMALIZED}/unnormalized.fasta
${PIPELINE}/scripts/normalize-assembly \
-d ${NORMALIZED}/tmp \
-f ${PIPELINE}/inputs/starts.faa \
-l "$LINEAR_CONTIGS" \
${NORMALIZED}/unnormalized.fasta ${STRAIN}${VERSION}_ \
> ${NORMALIZED}/normalized.fasta
# ------------------------------------------------------------------------
# Done.
# ------------------------------------------------------------------------
echo 1>&2 ''
echo 1>&2 '# Done.'