Skip to content

Commit

Permalink
fix: handle incompatible json schema from older antiSMASH version
Browse files Browse the repository at this point in the history
  • Loading branch information
matinnuhamunada committed Apr 3, 2024
1 parent 096a925 commit d50f6a9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions workflow/rules/antismash.smk
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ elif antismash_major_version >= 7:
--database {params.antismash_db_path} \
--cb-general --cb-subclusters --cb-knownclusters -c {threads} $antismash_input --logfile {log} 2>> {log}
# Check if the run failed due to changed detection results
if grep -q "ValueError: Detection results have changed. No results can be reused" {log}; then
# Check if the run failed due to changed detection results or changed protocluster types
if grep -q -e "ValueError: Detection results have changed. No results can be reused" \
-e "RuntimeError: Protocluster types supported by HMM detection have changed, all results invalid" {log}
then
# Use genbank input instead
echo "Previous JSON result is invalid, starting AntiSMASH from scratch..." >> {log}
antismash --genefinding-tool {params.genefinding} --output-dir {params.folder} \
Expand Down

0 comments on commit d50f6a9

Please sign in to comment.