Skip to content

Commit 9b2a2c6

Browse files
authored
Merge branch 'master' into master
2 parents 6a8df72 + e374618 commit 9b2a2c6

File tree

6 files changed

+68
-65
lines changed

6 files changed

+68
-65
lines changed

.github/workflows/main.yml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Configs tests
2-
3-
on: [pull_request, push]
2+
on:
3+
pull_request:
4+
branches:
5+
- "*"
6+
push:
7+
branches:
8+
- master
49

510
# Cancel if a newer run is started
611
concurrency:
@@ -17,21 +22,29 @@ jobs:
1722
run: python ${GITHUB_WORKSPACE}/bin/cchecker.py ${GITHUB_WORKSPACE}/nfcore_custom.config ${GITHUB_WORKSPACE}/.github/workflows/main.yml
1823

1924
check_nextflow_config:
20-
runs-on: ubuntu-latest
2125
name: Check if nextflow config runs in repository root
26+
runs-on: ubuntu-latest
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
NXF_VER:
31+
- 25.04.0
32+
- latest-everything
2233
steps:
23-
- uses: actions/checkout@v4
24-
- name: Install Nextflow
25-
run: |
26-
wget -qO- get.nextflow.io | bash
27-
sudo mv nextflow /usr/local/bin/
28-
- run: nextflow config -show-profiles ${GITHUB_WORKSPACE}
34+
- uses: actions/checkout@v4
35+
- name: Set up Nextflow
36+
uses: nf-core/setup-nextflow@v2
37+
with:
38+
version: ${{ matrix.NXF_VER }}
39+
- run: nextflow config -show-profiles ${GITHUB_WORKSPACE}
40+
- run: nextflow lint ${GITHUB_WORKSPACE}
2941

3042
profile_test:
3143
runs-on: ubuntu-latest
3244
name: Run ${{ matrix.profile }} profile
3345
needs: test_all_profiles
3446
strategy:
47+
fail-fast: false
3548
matrix:
3649
profile:
3750
- "abims"

conf/cfc.config

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,24 @@ params {
3838
* in your config, or use the
3939
* `-plugins nf-co2footprint@<VERSION>` parameter in your nextflow call.
4040
*/
41-
co2footprint {
42-
String co2Timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')
43-
44-
// Determine timestamp suffix
45-
String timestampSuffix = params.get('trace_report_suffix') ?: (this.hasProperty('trace_timestamp') ? this.trace_timestamp : co2Timestamp)
41+
params {
42+
// Uses nf-core's `trace_report_suffix`
43+
trace_report_suffix = new java.util.Date().format('yyyy-MM-dd_HH-mm-ss')
44+
}
4645

47-
// File parameters
48-
if (params.containsKey('outdir')) {
49-
String infoDir = "${params.outdir}/pipeline_info"
50-
traceFile = "${infoDir}/co2footprint_trace_${timestampSuffix}.txt"
51-
reportFile = "${infoDir}/co2footprint_report_${timestampSuffix}.html"
52-
summaryFile = "${infoDir}/co2footprint_summary_${timestampSuffix}.txt"
46+
co2footprint {
47+
trace {
48+
file = "${params.outdir}/pipeline_info/co2footprint_trace_${params.trace_report_suffix}.txt"
49+
}
50+
summary {
51+
file = "${params.outdir}/pipeline_info/co2footprint_summary_${params.trace_report_suffix}.txt"
52+
}
53+
report {
54+
file = "${params.outdir}/pipeline_info/co2footprint_report_${params.trace_report_suffix}.html"
5355
}
5456

5557
// Standard parameters
5658
location = 'DE'
5759
pue = 1.3
5860
}
61+

conf/cfc_dev.config

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,20 @@ params {
3737
* in your config, or use the
3838
* `-plugins nf-co2footprint@<VERSION>` parameter in your nextflow call.
3939
*/
40-
co2footprint {
41-
String co2Timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')
42-
43-
// Determine timestamp suffix
44-
String timestampSuffix = params.get('trace_report_suffix') ?: (this.hasProperty('trace_timestamp') ? this.trace_timestamp : co2Timestamp)
40+
params {
41+
// Uses nf-core's `trace_report_suffix`
42+
trace_report_suffix = new java.util.Date().format('yyyy-MM-dd_HH-mm-ss')
43+
}
4544

46-
// File parameters
47-
if (params.containsKey('outdir')) {
48-
String infoDir = "${params.outdir}/pipeline_info"
49-
traceFile = "${infoDir}/co2footprint_trace_${timestampSuffix}.txt"
50-
reportFile = "${infoDir}/co2footprint_report_${timestampSuffix}.html"
51-
summaryFile = "${infoDir}/co2footprint_summary_${timestampSuffix}.txt"
45+
co2footprint {
46+
trace {
47+
file = "${params.outdir}/pipeline_info/co2footprint_trace_${params.trace_report_suffix}.txt"
48+
}
49+
summary {
50+
file = "${params.outdir}/pipeline_info/co2footprint_summary_${params.trace_report_suffix}.txt"
51+
}
52+
report {
53+
file = "${params.outdir}/pipeline_info/co2footprint_report_${params.trace_report_suffix}.html"
5254
}
5355

5456
// Standard parameters

conf/m3c.config

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,20 @@ params {
5858
* in your config, or use the
5959
* `-plugins nf-co2footprint@<VERSION>` parameter in your nextflow call.
6060
*/
61-
co2footprint {
62-
String co2Timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')
63-
64-
// Determine timestamp suffix
65-
String timestampSuffix = params.get('trace_report_suffix') ?: (this.hasProperty('trace_timestamp') ? this.trace_timestamp : co2Timestamp)
61+
params {
62+
// Uses nf-core's `trace_report_suffix`
63+
trace_report_suffix = new java.util.Date().format('yyyy-MM-dd_HH-mm-ss')
64+
}
6665

67-
// File parameters
68-
if (params.containsKey('outdir')) {
69-
String infoDir = "${params.outdir}/pipeline_info"
70-
traceFile = "${infoDir}/co2footprint_trace_${timestampSuffix}.txt"
71-
reportFile = "${infoDir}/co2footprint_report_${timestampSuffix}.html"
72-
summaryFile = "${infoDir}/co2footprint_summary_${timestampSuffix}.txt"
66+
co2footprint {
67+
trace {
68+
file = "${params.outdir}/pipeline_info/co2footprint_trace_${params.trace_report_suffix}.txt"
69+
}
70+
summary {
71+
file = "${params.outdir}/pipeline_info/co2footprint_summary_${params.trace_report_suffix}.txt"
72+
}
73+
report {
74+
file = "${params.outdir}/pipeline_info/co2footprint_report_${params.trace_report_suffix}.html"
7375
}
7476

7577
// Standard parameters

conf/pipeline/sarek/cfc.config

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,20 @@ params {
99
// Specific nf-core/sarek process configuration
1010
process {
1111
withName:'StrelkaSingle|Strelka|StrelkaBP|MantaSingle|Manta' {
12-
cpus = { check_resource( 20 * task.attempt) }
13-
memory = { check_resource( 59.GB * task.attempt) }
12+
cpus = { 20 * task.attempt }
13+
memory = { 59.GB * task.attempt }
1414
}
1515
withName:'MSIsensor_scan|MSIsensor_msi' {
16-
memory = { check_resource( 55.GB * task.attempt ) }
16+
memory = { 55.GB * task.attempt }
1717

1818
}
1919
withName:BamQC {
20-
memory = { check_resource( 372.GB * task.attempt) }
20+
memory = { 372.GB * task.attempt }
2121
}
2222

2323
withName:MapReads{
24-
cpus = { check_resource( 20 * task.attempt ) }
25-
memory = { check_resource( 59.GB * task.attempt) }
24+
cpus = { 20 * task.attempt }
25+
memory = { 59.GB * task.attempt }
2626
}
2727
}
2828

29-
def check_resource(obj) {
30-
try {
31-
if (obj.getClass() == nextflow.util.MemoryUnit && obj.compareTo(params.max_memory as nextflow.util.MemoryUnit) == 1)
32-
return params.max_memory as nextflow.util.MemoryUnit
33-
else if (obj.getClass() == nextflow.util.Duration && obj.compareTo(params.max_time as nextflow.util.Duration) == 1)
34-
return params.max_time as nextflow.util.Duration
35-
else if (obj.getClass() == java.lang.Integer)
36-
return Math.min(obj, params.max_cpus as int)
37-
else
38-
return obj
39-
} catch (all) {
40-
println " ### ERROR ### Max params max_memory:'${params.max_memory}', max_time:'${params.max_time}' or max_cpus:'${params.max_cpus}' is not valid! Using default value: $obj"
41-
}
42-
}

pipeline/sarek.config

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,4 @@ profiles {
3030
munin {
3131
includeConfig "${params.custom_config_base}/conf/pipeline/sarek/munin.config"
3232
}
33-
uppmax {
34-
includeConfig "${params.custom_config_base}/conf/pipeline/sarek/uppmax.config"
35-
}
3633
}

0 commit comments

Comments
 (0)