Skip to content

Commit

Permalink
removed redundant vadr memory variable
Browse files Browse the repository at this point in the history
  • Loading branch information
erinyoung committed Jun 14, 2021
1 parent 8dd82bf commit f97efc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
9 changes: 2 additions & 7 deletions Cecret.nf
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ process sort {
date | tee -a $log_file $err_file > /dev/null
samtools --version >> $log_file
samtools sort -@ !{task.cpus} !{sam} 2>> $err_file | \
samtools sort !{sam} 2>> $err_file | \
samtools view -F 4 -o aligned/!{sample}.sorted.bam 2>> $err_file >> $log_file
# indexing the bams
Expand Down Expand Up @@ -577,10 +577,6 @@ process ivar_variants {
errorStrategy {'retry'}
maxRetries 2

memory {2.GB * task.attempt}
errorStrategy {'retry'}
maxRetries 2

when:
params.ivar_variants

Expand Down Expand Up @@ -1247,8 +1243,7 @@ nextclade_files
sort: true,
storeDir: "${params.outdir}/nextclade")

params.maxmem = Math.round(Runtime.runtime.totalMemory() / 10241024)
if ( params.maxmem / 2 > params.medcpus && params.vadr ) {
if ( Math.round(Runtime.runtime.totalMemory() / 10241024) / 2 > params.medcpus && params.vadr ) {
vadrmemory = params.medcpus + params.medcpus
vadrcpus = params.medcpus
} else {
Expand Down
4 changes: 2 additions & 2 deletions Cecret_annotation.nf
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ process nextclade {
}

params.vadr = true
params.maxmem = Math.round(Runtime.runtime.totalMemory() / 10241024)
if ( params.maxmem / 2 > params.medcpus ) {
if ( Math.round(Runtime.runtime.totalMemory() / 10241024) / 2 > params.medcpus && params.vadr ) {
vadrmemory = params.medcpus + params.medcpus
vadrcpus = params.medcpus
} else {
vadrmemory = 2
vadrcpus = 1
}

params.vadr_options = '--split --glsearch -s -r --nomisc --lowsim5term 2 --lowsim3term 2 --alt_fail lowscore,fstukcnf,insertnn,deletinn'
params.vadr_reference = 'sarscov2'
params.vadr_mdir = '/opt/vadr/vadr-models'
Expand Down

0 comments on commit f97efc5

Please sign in to comment.