Skip to content

Commit

Permalink
clarified messages when 2 thresholds are not passed
Browse files Browse the repository at this point in the history
  • Loading branch information
kapsakcj committed Oct 6, 2023
1 parent a556675 commit aea0235
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tasks/quality_control/task_mummer_ani.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ task animummer {
echo "Comparing user-defined ANI threshold to highest ANI value..."
# compare ANI_HIGHEST_PERCENT to ani_threshold using awk
if ! awk "BEGIN{ exit ($ANI_HIGHEST_PERCENT < ~{ani_threshold} )}"; then
echo "The highest ANI value $ANI_HIGHEST_PERCENT is less than the user-defined threshold of ~{ani_threshold}"
echo "ANI top species match did not surpass the user-defined threshold of ~{ani_threshold}" > ANI_TOP_SPECIES_MATCH.txt
echo "The highest ANI value $ANI_HIGHEST_PERCENT is less than the user-defined ANI threshold of ~{ani_threshold}"
echo "ANI top species match did not surpass the user-defined ANI threshold of ~{ani_threshold}" > ANI_TOP_SPECIES_MATCH.txt
# else if: compare percent_bases_aligned_threshold to ANI_HIGHEST_PERCENT_BASES_ALIGNED using awk
elif ! awk "BEGIN{ exit (${ANI_HIGHEST_PERCENT_BASES_ALIGNED} < ~{percent_bases_aligned_threshold} )}"; then
echo "The highest ANI percent bases aligned value ${ANI_HIGHEST_PERCENT_BASES_ALIGNED} is less than the user-defined threshold of ~{percent_bases_aligned_threshold}"
# overwrite ANI_TOP_SPECIES_MATCH.txt when percent_bases_aligned threshold is not surpassed
echo "ANI percent bases aligned did not surpass the user-defined threshold of ~{percent_bases_aligned_threshold}" > ANI_TOP_SPECIES_MATCH.txt
echo "ANI top species match did not surpass the user-defined percent bases aligned threshold of ~{percent_bases_aligned_threshold}" > ANI_TOP_SPECIES_MATCH.txt
else
echo "The highest ANI value ${ANI_HIGHEST_PERCENT} is greater than the user-defined threshold ~{ani_threshold}"
echo "The highest percent bases aligned value ${ANI_HIGHEST_PERCENT_BASES_ALIGNED} is greater than the user-defined threshold ~{percent_bases_aligned_threshold}"
Expand Down

0 comments on commit aea0235

Please sign in to comment.