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 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