Skip to content

Commit

Permalink
Add resources selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
elena-buscaroli committed Jan 23, 2025
1 parent 50eb4c9 commit 08c3df0
Show file tree
Hide file tree
Showing 22 changed files with 42 additions and 42 deletions.
25 changes: 8 additions & 17 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
*/

process {

// TODO nf-core: Check the defaults for all processes
cpus = { 1 * task.attempt }
memory = { 6.GB * task.attempt }
time = { 4.h * task.attempt }
time = { 2.h * task.attempt }

errorStrategy = { task.exitStatus in ((130..145) + 104) ? 'retry' : 'finish' }
maxRetries = 1
Expand All @@ -29,28 +28,20 @@ process {
withLabel:process_single {
cpus = { 1 }
memory = { 6.GB * task.attempt }
time = { 4.h * task.attempt }
time = { 2.h * task.attempt }
}
withLabel:process_low {
cpus = { 2 * task.attempt }
cpus = { 8 * task.attempt }
memory = { 12.GB * task.attempt }
time = { 4.h * task.attempt }
}
withLabel:process_medium {
cpus = { 6 * task.attempt }
memory = { 36.GB * task.attempt }
time = { 8.h * task.attempt }
time = { 2.h * task.attempt }
}
withLabel:process_high {
cpus = { 12 * task.attempt }
memory = { 72.GB * task.attempt }
time = { 16.h * task.attempt }
cpus = { 20 * task.attempt }
memory = { 100.GB * task.attempt }
time = { 5.h * task.attempt }
}
withLabel:process_long {
time = { 20.h * task.attempt }
}
withLabel:process_high_memory {
memory = { 200.GB * task.attempt }
time = { 5.h * task.attempt }
}
withLabel:error_ignore {
errorStrategy = 'ignore'
Expand Down
1 change: 1 addition & 0 deletions modules/local/CNAqc/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
process CNAQC {
tag "$meta.id"
label "process_low"
container = 'docker://lvaleriani/cnaqc:version1.0'

input:
Expand Down
1 change: 1 addition & 0 deletions modules/local/CNAqc2tsv/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

process RDS_PROCESSING {
tag "$meta.id"
label "process_single"
container = 'docker://lvaleriani/cnaqc:version1.0'

input:
Expand Down
5 changes: 3 additions & 2 deletions modules/local/SigProfiler/SigProfiler/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
process SIGPROFILER {
tag "$meta.id"
label "process_high"
container = 'docker://katiad/sigprofiler:version1.0'

input:
Expand Down Expand Up @@ -161,8 +162,8 @@ process SIGPROFILER {
with open('versions.yml', 'a') as f:
f.write('"${task.process}":'+"\\n")
f.write("\tSigProfilerMatrixGenerator: "+SigProfilerMatrixGenerator_version+"\\n")
f.write("\tSigProfilerExtractor: "+SigProfilerExtractor_version+"\\n")
f.write(" SigProfilerMatrixGenerator: "+SigProfilerMatrixGenerator_version+"\\n")
f.write(" SigProfilerExtractor: "+SigProfilerExtractor_version+"\\n")
"""

Expand Down
1 change: 1 addition & 0 deletions modules/local/SigProfiler/download/main.nf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
process DOWNLOAD_GENOME_SIGPROFILER {
label "process_single"
container = 'docker://katiad/sigprofiler:version1.0'

input:
Expand Down
3 changes: 1 addition & 2 deletions modules/local/SparseSignatures/main.nf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
process SPARSE_SIGNATURES {
tag "$meta.id"
label "process_long"
container = 'docker://lvaleriani/sparsesignature:version1.0'


input:

tuple val(meta), path(tsv_join, stageAs: '*.tsv')
Expand All @@ -16,7 +16,6 @@ process SPARSE_SIGNATURES {
path "versions.yml", emit: versions

script:

def args = task.ext.args
def prefix = task.ext.prefix ?: "${meta.id}"
def K = args!='' && args.K ? "$args.K" : ""
Expand Down
1 change: 1 addition & 0 deletions modules/local/annotate_driver/main.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

process ANNOTATE_DRIVER {
tag "$meta.id"
label "process_single"
container = 'docker://lvaleriani/cnaqc:version1.0'

input:
Expand Down
2 changes: 1 addition & 1 deletion modules/local/cna2CNAqc/main.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
process CNA_PROCESSING {
tag "$meta.id"

label "process_single"
container "docker://lvaleriani/cnaqc:version1.0"

input:
Expand Down
3 changes: 1 addition & 2 deletions modules/local/ctree/main.nf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
process CTREE {
tag "$meta.id"
label "process_low"
container = 'docker://elenabuscaroli/ctree:version1.1'

input:

tuple val(meta), path(ctree_input)

output:
Expand All @@ -15,7 +15,6 @@ process CTREE {
path "versions.yml", emit: versions

script:

def args = task.ext.args ?: ""
def prefix = task.ext.prefix ?: "${meta.id}"
def sspace_cutoff = args!="" && args.sspace_cutoff ? "$args.sspace_cutoff" : ""
Expand Down
1 change: 1 addition & 0 deletions modules/local/get_positions/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
process GET_POSITIONS_ALL {
tag "$meta.id"
label "process_single"
container = 'docker://lvaleriani/cnaqc:version1.0'

input:
Expand Down
1 change: 1 addition & 0 deletions modules/local/get_positions/main_rel.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
process GET_POSITIONS_REL {
tag "$meta.id"
label "process_single"
container = 'docker://lvaleriani/cnaqc:dev1'

input:
Expand Down
1 change: 1 addition & 0 deletions modules/local/join_CNAqc/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
process JOIN_CNAQC {
tag "$meta.id"
label "process_low"
container = 'docker://lvaleriani/cnaqc:version1.0'

input:
Expand Down
1 change: 1 addition & 0 deletions modules/local/join_positions/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
process JOIN_POSITIONS {
tag "$meta.id"
label "process_single"
container = 'docker://lvaleriani/cnaqc:version1.0'

input:
Expand Down
1 change: 1 addition & 0 deletions modules/local/mobsterh/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
process MOBSTERh {
tag "$meta.id"
label "process_single"
container = 'docker://elenabuscaroli/mobster:version1.0'

input:
Expand Down
1 change: 1 addition & 0 deletions modules/local/pyclonevi/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
process PYCLONEVI {
tag "$meta.id"
label "process_low"
container = 'https://depot.galaxyproject.org/singularity/pyclone-vi%3A0.1.3--pyhca03a8a_0'

input:
Expand Down
4 changes: 2 additions & 2 deletions modules/local/tinc/main.nf
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
process TINC {

tag "$meta.id"
label "process_single"
container 'docker://vvvirgy/tinc:v2' // define the running container
// conda "${moduleDir}/environment.yml"

input:
tuple val(meta), path(cna_RDS), path(snv_RDS)

Expand All @@ -14,7 +15,6 @@ process TINC {
path "versions.yml", emit: versions

script:

def args = task.ext.args
def prefix = task.ext.prefix ?: "${meta.id}"
def vaf_range_tumour = args!='' && args.vaf_range_tumour ? "$args.vaf_range_tumour" : ""
Expand Down
2 changes: 1 addition & 1 deletion modules/local/vcf2CNAqc/main.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
process VCF_PROCESSING {
tag "$meta.id"

label "process_single"
container "docker://lvaleriani/cnaqc:version1.0"

input:
Expand Down
23 changes: 12 additions & 11 deletions modules/local/viber/main.nf
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
process VIBER {
tag "$meta.id"
label "process_single"
container = 'docker://elenabuscaroli/viber:version0.1'

input:
tuple val(meta), path(rds_join), val(tumour_samples) //rds from either JOIN_CNAQC or JOIN_FIT, should be always grouped
tuple val(meta), path(rds_join), val(tumour_samples) //rds from either JOIN_CNAQC or JOIN_FIT, should be always grouped

output:
tuple val(meta), path("*_viber_best_st_fit.rds"), emit: viber_rds
tuple val(meta), path("*_viber_best_st_heuristic_fit.rds"), emit: viber_heuristic_rds
tuple val(meta), path("*_${plot1}"), emit: viber_plots_rds
tuple val(meta), path("*_${plot2}"), emit: viber_heuristic_plots_rds
tuple val(meta), path("*_REPORT_plots_viber.rds"), emit: viber_report_rds
tuple val(meta), path("*_REPORT_plots_viber.pdf"), emit: viber_report_pdf
tuple val(meta), path("*_REPORT_plots_viber.png"), emit: viber_report_png
path "versions.yml", emit: versions

script:
tuple val(meta), path("*_viber_best_st_fit.rds"), emit: viber_rds
tuple val(meta), path("*_viber_best_st_heuristic_fit.rds"), emit: viber_heuristic_rds
tuple val(meta), path("*_${plot1}"), emit: viber_plots_rds
tuple val(meta), path("*_${plot2}"), emit: viber_heuristic_plots_rds
tuple val(meta), path("*_REPORT_plots_viber.rds"), emit: viber_report_rds
tuple val(meta), path("*_REPORT_plots_viber.pdf"), emit: viber_report_pdf
tuple val(meta), path("*_REPORT_plots_viber.png"), emit: viber_report_png
path "versions.yml", emit: versions

script:
// viber fit params
def args = task.ext.args ?: ""
def prefix = task.ext.prefix ?:"${meta.id}"
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/bcftools/mpileup/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/nf-core/ensemblvep/download/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/nf-core/ensemblvep/vep/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion modules/nf-core/vcf2maf/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 08c3df0

Please sign in to comment.