Skip to content

Commit

Permalink
Merge pull request #8 from DKFZ-ODCF/fix-off-by-one-indel-count
Browse files Browse the repository at this point in the history
RC 2.4.0
  • Loading branch information
vinjana authored Nov 5, 2019
2 parents f59db01 + 7078229 commit 3802473
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion buildversion.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
2.3
2.4
0
14 changes: 9 additions & 5 deletions resources/analysisTools/indelCallingWorkflow/filter_vcf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 3802473

Please sign in to comment.