From fa19395b6f0c74ae03fd5e19296a61eae9d24ca0 Mon Sep 17 00:00:00 2001 From: Sage Wright Date: Tue, 12 Nov 2024 17:56:00 +0000 Subject: [PATCH] fix genome_percent_coverage --- tasks/species_typing/mycobacterium/task_tbp_parser.wdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/species_typing/mycobacterium/task_tbp_parser.wdl b/tasks/species_typing/mycobacterium/task_tbp_parser.wdl index 38ca566ca..80e09baf7 100644 --- a/tasks/species_typing/mycobacterium/task_tbp_parser.wdl +++ b/tasks/species_typing/mycobacterium/task_tbp_parser.wdl @@ -64,7 +64,7 @@ task tbp_parser { echo 0.0 > AVG_DEPTH # get genome percent coverage for the entire reference genome length over min_depth - genome=$(samtools depth -J ~{tbprofiler_bam} | awk -F "\t" '{if ($3 >= ~{min_depth}) print;}' | wc -l ) + genome=$(samtools depth -J ~{tbprofiler_bam} | awk -F "\t" -v min_depth=~{min_depth} '{if ($3 >= min_depth) print;}' | wc -l ) python3 -c "print ( ($genome / 4411532 ) * 100 )" | tee GENOME_PC # get genome average depth