UCSF-Costello-Lab / LG3_Pipeline

The original LG3 pipeline
https://github.com/UCSF-Costello-Lab/LG3_Pipeline
0 stars 0 forks source link

scripts/Align_mem.sh: Why was `${SAMTOOLS} index ...` dropped? #155

Open HenrikBengtsson opened 2 years ago

HenrikBengtsson commented 2 years ago
$ git checkout develop
$ git --no-pager diff 2020-05-26 -- scripts/Align_mem.sh
diff --git a/scripts/Align_mem.sh b/scripts/Align_mem.sh
index c306a17..7e03c07 100755
--- a/scripts/Align_mem.sh
+++ b/scripts/Align_mem.sh
@@ -209,8 +208,8 @@ echo "[BQSR] GATK4::ApplyBQSR "
    --QUIET true \
    --verbosity ERROR; } 2>&1 || error "FAILED"

-echo "[Align] Index ${SAMPLE}.mem.sorted.mrkDups.recal.bam"
-{ time ${SAMTOOLS} index "${SAMPLE}.mem.sorted.mrkDups.recal.bam"; } 2>&1 || error "FAILED"
+#echo "[Align] Index ${SAMPLE}.mem.sorted.mrkDups.recal.bam"
+#{ time ${SAMTOOLS} index "${SAMPLE}.mem.sorted.mrkDups.recal.bam"; } 2>&1 || error "FAILED"

 echo "[QC] GATK4::CollectHsMetrics "
 { time ${GATK4} --java-options -"${XMX}" CollectHsMetrics \
ivan108 commented 2 years ago

GATK4 has an option to generate index by itself, by setting --create-output-bam-index true flag

So, no need to generate it again with samtools.

HenrikBengtsson commented 2 years ago

Okay. Could you please update the NEWS with an entry explaining that, e.g.

Cleanup:

 * Align_mem.sh no longer run a separate `samtools index ...` because GATK4 can now generate the BAM index.