Skip to content

Commit

Permalink
Merge pull request GlobalPneumoSeq#138 from GlobalPneumoSeq/hotfix/re…
Browse files Browse the repository at this point in the history
…ject-empty-spn-pbp-amr-output

Fail the PBP_RESISTANCE process if spn_pbp_amr generates empty output
  • Loading branch information
HarryHung authored Jan 9, 2025
2 parents b696cb8 + 66b47d4 commit aa69a9c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/amr.nf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Run PBP AMR predictor to assign pbp genes and estimate samples' MIC (minimum inhibitory concentration) for 6 Beta-lactam antibiotics
// The process will fail if an empty output is generated
process PBP_RESISTANCE {
label 'spn_pbp_amr_container'
label 'farm_low'
Expand All @@ -15,6 +16,7 @@ process PBP_RESISTANCE {
json='result.json'
"""
spn_pbp_amr "$assembly" > "$json"
grep -q '[^[:space:]]' "$json" || exit 1
"""
}

Expand Down

0 comments on commit aa69a9c

Please sign in to comment.