From 34699b600fd77dd0f1fb0d077488495f94ba786c Mon Sep 17 00:00:00 2001
From: "Philip R. Kensche"
Date: Wed, 30 Oct 2019 10:46:20 +0100
Subject: [PATCH 1/2] Minor version bump in buildversion.txt.
---
buildversion.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/buildversion.txt b/buildversion.txt
index 64cec26..7d624a9 100644
--- a/buildversion.txt
+++ b/buildversion.txt
@@ -1,2 +1,2 @@
-2.3
+2.4
0
From 70782296659c12332abdf8e7751481fad58f082b Mon Sep 17 00:00:00 2001
From: "Philip R. Kensche"
Date: Wed, 30 Oct 2019 12:01:58 +0100
Subject: [PATCH 2/2] The $somatic_functional_indel_vcf has a header that was
counted, resulting in a wrong branch choice for PDF creation. Furthermore, a
branch for no functional variants was added.
---
.../indelCallingWorkflow/filter_vcf.sh | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/resources/analysisTools/indelCallingWorkflow/filter_vcf.sh b/resources/analysisTools/indelCallingWorkflow/filter_vcf.sh
index fcc83da..cc8f8c6 100755
--- a/resources/analysisTools/indelCallingWorkflow/filter_vcf.sh
+++ b/resources/analysisTools/indelCallingWorkflow/filter_vcf.sh
@@ -71,10 +71,14 @@ ${PERL_BINARY} ${TOOL_PLATYPUS_INDEL_EXTRACTOR} --bgzip=${BGZIP_BINARY} --tabix=
[[ ! -d ${screenshot_dir} ]] && mkdir ${screenshot_dir} && cd ${screenshot_dir}
-functional_var_count=`cat ${somatic_functional_indel_vcf} | wc -l | cut -f1 -d " "`
+functional_var_count=`cat ${somatic_functional_indel_vcf} | tail -n +2 | wc -l | cut -f1 -d " "`
-if [[ $functional_var_count -le $MAX_VARIANT_SCREENSHOTS ]]
-then
+if [[ $functional_var_count -eq 0 ]]; then
+ printf "WARNING: No functional variants present in ${somatic_functional_indel_vcf}\n"
+ $RSCRIPT_BINARY "$TOOL_TEXT_PDF" "WARNING: No functional variants." \
+ > "$combined_screen_shots"
+
+elif [[ $functional_var_count -le $MAX_VARIANT_SCREENSHOTS ]]; then
if [[ "${isControlWorkflow}" == true ]]; then
${PYTHON_BINARY} ${TOOL_SCREENSHOT} \
@@ -105,8 +109,8 @@ then
${GHOSTSCRIPT_BINARY} -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=${combined_screen_shots} ${sorted}
else
- printf "WARNINGS: No screenshots done, more than $MAX_VARIANT_SCREENSHOTS (cvalue - MAX_VARIANT_SCREENSHOTS) functional variants present in ${somatic_functional_indel_vcf}\n"
- $RSCRIPT_BINARY "$TOOL_TEXT_PDF" "WARNING\nNo screenshots done. More than $MAX_VARIANT_SCREENSHOTS functional variants." \
+ printf "WARNING: No screenshots done, more than $MAX_VARIANT_SCREENSHOTS (cvalue - MAX_VARIANT_SCREENSHOTS) functional variants present in ${somatic_functional_indel_vcf}\n"
+ $RSCRIPT_BINARY "$TOOL_TEXT_PDF" "WARNING: No screenshots done. More than $MAX_VARIANT_SCREENSHOTS functional variants." \
> "$combined_screen_shots"
fi