Skip to content

Commit 7b40ee7

Browse files
authored
Merge pull request #460 from sanger-tol/strict_syntax
Strict syntax
2 parents 3751dd5 + 5f7f90c commit 7b40ee7

File tree

27 files changed

+131
-289
lines changed

27 files changed

+131
-289
lines changed

assets/schema_input.json

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@
1313
"errorMessage": "Assembly level must be provided"
1414
},
1515
"assem_version": {
16-
"anyOf": [{ "type": "string" }, { "type": "integer" }],
16+
"anyOf": [
17+
{
18+
"type": "string"
19+
},
20+
{
21+
"type": "integer"
22+
}
23+
],
1724
"errorMessage": "Assembly version must be provided"
1825
},
1926
"sample_id": {
@@ -41,15 +48,24 @@
4148
},
4249
"map_order": {
4350
"type": "string",
44-
"errorMessage": "Map order"
51+
"errorMessage": "Map order",
52+
"enum": [
53+
"length",
54+
"unsorted"
55+
]
4556
},
4657
"assem_reads": {
4758
"type": "object",
4859
"properties": {
4960
"read_type": {
5061
"type": "string",
5162
"errorMessage": "Long read data type",
52-
"enum": ["hifi", "clr", "ont", "illumina"]
63+
"enum": [
64+
"hifi",
65+
"clr",
66+
"ont",
67+
"illumina"
68+
]
5369
},
5470
"read_data": {
5571
"type": "array",
@@ -77,7 +93,10 @@
7793
"hic_aligner": {
7894
"type": "string",
7995
"errorMessage": "HiC Aligner - minimap2 (default), bwamem2",
80-
"enum": ["minimap2", "bwamem2"]
96+
"enum": [
97+
"minimap2",
98+
"bwamem2"
99+
]
81100
}
82101
}
83102
},

modules/local/assign/ancestral/main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
process ASSIGN_ANCESTRAL {
2-
tag "$meta.id"
2+
tag "${meta.id}"
33
label 'process_low'
44

55
conda "conda-forge::python=3.9"

modules/local/bamtobed/sort/main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
process BAMTOBED_SORT {
2-
tag "$meta.id"
2+
tag "${meta.id}"
33
label "process_high"
44

55
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?

modules/local/cram/filter_align_bwamem2_fixmate_sort/main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
process CRAM_FILTER_ALIGN_BWAMEM2_FIXMATE_SORT {
2-
tag "$meta.id"
2+
tag "${meta.id}"
33
label "process_high"
44

55
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?

modules/local/cram/filter_minimap2_filter5end_fixmate_sort/main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
process CRAM_FILTER_MINIMAP2_FILTER5END_FIXMATE_SORT {
2-
tag "$meta.id"
2+
tag "${meta.id}"
33
label "process_high"
44

55
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?

modules/local/extract/ancestral/main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
process EXTRACT_ANCESTRAL {
2-
tag "$meta.id"
2+
tag "${meta.id}"
33
label 'process_low'
44

55
conda "conda-forge::python=3.9"
Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
process EXTRACT_REPEAT {
2-
tag "$meta.id"
2+
tag "${meta.id}"
33
label 'process_low'
44

55
conda "conda-forge::perl=5.26.2"
@@ -8,38 +8,25 @@ process EXTRACT_REPEAT {
88
'biocontainers/perl:5.26.2' }"
99

1010
input:
11-
tuple val( meta ), path( file )
11+
tuple val(meta), path(file)
1212

1313
output:
1414
tuple val( meta ), path( "*.bed" ) , emit: bed
15-
path "versions.yml" , emit: versions
15+
tuple val("${task.process}"), val('extract_repeat.pl'), val("1.0.0"), topic: versions, emit: versions_extractrepeat
16+
tuple val("${task.process}"), val('perl'), eval("perl --version | sed -n 's/.*(v\\([0-9.]\\+\\)).*/\\1/p'"), topic: versions, emit: versions_perl
1617

1718
when:
1819
task.ext.when == null || task.ext.when
1920

2021
script:
21-
def prefix = task.ext.prefix ?: "${meta.id}"
22-
def VERSION = "1.0" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
22+
def prefix = task.ext.prefix ?: "${meta.id}"
2323
"""
2424
extract_repeat.pl $file > ${prefix}_repeats.bed
25-
26-
cat <<-END_VERSIONS > versions.yml
27-
"${task.process}":
28-
perl: \$(echo \$(perl --version 2>&1) | sed 's/^.*perl //; s/Using.*\$//')
29-
extract_repeat.pl: $VERSION
30-
END_VERSIONS
3125
"""
3226

3327
stub:
34-
def prefix = task.ext.prefix ?: "${meta.id}"
35-
def VERSION = "1.0" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
28+
def prefix = task.ext.prefix ?: "${meta.id}"
3629
"""
3730
touch ${prefix}_repeats.bed
38-
39-
cat <<-END_VERSIONS > versions.yml
40-
"${task.process}":
41-
perl: \$(echo \$(perl --version 2>&1) | sed 's/^.*perl //; s/Using.*\$//')
42-
extract_repeat.pl: $VERSION
43-
END_VERSIONS
4431
"""
4532
}

modules/local/find/half_coverage/main.nf

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ process FIND_HALF_COVERAGE {
1414

1515
output:
1616
tuple val(meta), path("*.bed") , emit: bed
17-
path "versions.yml" , emit: versions
17+
tuple val("${task.process}"), val('findHalfcoverage.py'), eval("findHalfcoverage.py --version | sed 's/^.*.py //'"), topic: versions, emit: versions_findhalfcoverage
18+
tuple val("${task.process}"), val('python'), eval("python --version | sed 's/^Python //'"), topic: versions, emit: versions_python
1819

1920
when:
2021
task.ext.when == null || task.ext.when
@@ -23,23 +24,11 @@ process FIND_HALF_COVERAGE {
2324
def prefix = task.ext.prefix ?: "halfcoverage"
2425
"""
2526
findHalfcoverage.py -c $bedfile -m $my_genome -d $depthgraph > ${prefix}.bed
26-
27-
cat <<-END_VERSIONS > versions.yml
28-
"${task.process}":
29-
python: \$(echo \$(python --version 2>&1) | sed 's/^.*python //; s/Using.*\$//')
30-
findHalfcoverage.py: \$(findHalfcoverage.py --version | cut -d' ' -f2)
31-
END_VERSIONS
3227
"""
3328

3429
stub:
3530
def prefix = task.ext.prefix ?: "halfcoverage"
3631
"""
3732
touch ${prefix}.bed
38-
39-
cat <<-END_VERSIONS > versions.yml
40-
"${task.process}":
41-
python: \$(echo \$(python --version 2>&1) | sed 's/^.*python //; s/Using.*\$//')
42-
findHalfcoverage.py: \$(findHalfcoverage.py --version | cut -d' ' -f2)
43-
END_VERSIONS
4433
"""
4534
}

modules/local/get/paired_contact_bed/main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
process GET_PAIRED_CONTACT_BED {
2-
tag "$meta.id"
2+
tag "${meta.id}"
33
label 'process_low'
44

55
conda "conda-forge::coreutils=9.1"
Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
process GRAPH_OVERALL_COVERAGE {
2-
tag "$meta.id"
2+
tag "${meta.id}"
33
label "process_single"
44

55
conda "conda-forge::perl=5.26.2"
@@ -12,7 +12,8 @@ process GRAPH_OVERALL_COVERAGE {
1212

1313
output:
1414
tuple val(meta), path("*.part") , emit: part
15-
path "versions.yml" , emit: versions
15+
tuple val("${task.process}"), val('graph_overall_coverage.pl'), eval("graph_overall_coverage.pl --version"), topic: versions, emit: versions_graph_overall_coverage
16+
tuple val("${task.process}"), val('perl'), eval("perl --version | sed -n 's/.*(v\\([0-9.]\\+\\)).*/\\1/p'"), topic: versions, emit: versions_perl
1617

1718
when:
1819
task.ext.when == null || task.ext.when
@@ -21,23 +22,11 @@ process GRAPH_OVERALL_COVERAGE {
2122
def prefix = task.ext.prefix ?: "${meta.id}"
2223
"""
2324
graph_overall_coverage.pl $bed > ${prefix}.part
24-
25-
cat <<-END_VERSIONS > versions.yml
26-
"${task.process}":
27-
perl: \$(echo \$(perl --version 2>&1) | sed 's/^.*perl //; s/Using.*\$//')
28-
graph_overall_coverage.pl: \$(graph_overall_coverage.pl --version)
29-
END_VERSIONS
3025
"""
3126

3227
stub:
3328
def prefix = task.ext.prefix ?: "${meta.id}"
3429
"""
3530
touch ${prefix}.part
36-
37-
cat <<-END_VERSIONS > versions.yml
38-
"${task.process}":
39-
perl: \$(echo \$(perl --version 2>&1) | sed 's/^.*perl //; s/Using.*\$//')
40-
graph_overall_coverage.pl: \$(graph_overall_coverage.pl --version)
41-
END_VERSIONS
4231
"""
4332
}

0 commit comments

Comments
 (0)