Skip to content

Commit

Permalink
added code to cater for memory for every task attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoraind committed Apr 6, 2023
1 parent 137d55d commit 5ab9d21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ work
*.nextflow*
Sample_files
.default_output
GRCh38.primary_assembly.genome.fa
4 changes: 2 additions & 2 deletions modules/processes.nf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ process MINIMAP2_INDEX {

process MINIMAP2_SAM {
tag "$meta"

memory { 4.GB * task.attempt }
errorStrategy { task.attempt <= 5 ? "retry" : "finish" }
maxRetries 5

Expand All @@ -44,7 +44,7 @@ process MINIMAP2_SAM {

script:
"""
minimap2 -ax map-ont -t 12 $index $reads > ${meta}.sam
minimap2 -ax map-ont -t $task.cpus $index $reads > ${meta}.sam
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down

0 comments on commit 5ab9d21

Please sign in to comment.