Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error handling strategies for nextflow processes #231

Merged
merged 4 commits into from
Feb 1, 2022

Conversation

evanroyrees
Copy link
Collaborator

Add error handling strategies for nextflow processes

  1. embed_kmers.nf
    - errorStrategy {exitCode in 153 ? "ignore" : "terminate" }
    - Not enough contigs to perform embedding with current parameter settings
  2. binning.nf
    - errorStrategy { task.exitStatus in 204 ? 'ignore' : 'terminate' }
    - No markers were annotated for contigs in the table
  3. unclustered_recruitment.nf
    - errorStrategy { task.exitStatus in 204 ? 'ignore' : 'terminate' }
    - No markers were annotated for contigs in the table
  4. markers.nf
    - errorStrategy { task.exitStatus in 204 ? 'ignore' : 'terminate' }
    - No markers in kingdom.hmmscan.tsv pass cutoff thresholds

🎨🐛🍏🐍 Exception handling from the if __name__ == '__main__' block does not raise the error code from the

entrypoint. The sys.exit(204) message must be within main for the error code to be recognized by nextflow
@codecov
Copy link

codecov bot commented Feb 1, 2022

Codecov Report

Merging #231 (3c1874b) into dev (1b70a6a) will increase coverage by 0.40%.
The diff coverage is 68.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #231      +/-   ##
==========================================
+ Coverage   27.23%   27.64%   +0.40%     
==========================================
  Files          45       45              
  Lines        5331     5336       +5     
==========================================
+ Hits         1452     1475      +23     
+ Misses       3879     3861      -18     
Flag Coverage Δ
unittests 27.64% <68.75%> (+0.40%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
autometa/common/markers.py 90.66% <50.00%> (-3.62%) ⬇️
autometa/binning/recursive_dbscan.py 86.47% <80.00%> (+2.04%) ⬆️
autometa/binning/unclustered_recruitment.py 91.93% <0.00%> (+8.60%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b70a6a...3c1874b. Read the comment docs.

@evanroyrees evanroyrees added the nextflow Nextflow related issues/code label Feb 1, 2022
@evanroyrees evanroyrees merged commit 9244988 into dev Feb 1, 2022
@evanroyrees evanroyrees deleted the markers-err-handling branch February 1, 2022 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nextflow Nextflow related issues/code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"No markers for contigs in table. Unable to assess binning quality" for split contigs by taxa
1 participant