Update by asebastian on Mon Nov 13 15:06:08 EST 2017 from Aswathys-iMac.local
@@ -7,7 +7,7 @@ TOC={{reads.toc}}
REF={{reference.path}}
# The index directory
-IDX_DIR={{reference.data_dir}}/bwa
+IDX_DIR={{runtime.workdir}}/bwa
# How many scaffolds to keep.
TOPN={{topn.value}}
@@ -21,8 +21,7 @@ IDX=$IDX_DIR/scaffolds_${TOPN}.fa
# Make the index directory
mkdir -p $IDX_DIR
-# The index needs to be built only once.
-if [ ! -f "$IDX.bwt" ]; then
+# Build index .
echo "Building the bwa index for the $TOPN scaffolds."
# Find the largest scaffolds.
@@ -42,7 +41,6 @@ if [ ! -f "$IDX.bwt" ]; then
# Build the index for the top N scaffolds.
bwa index ${IDX}
-fi
# The directory to hold the BAM files.
BAM={{runtime.work_dir}}/bam
