Skip to content

Commit c6bfc26

Browse files
FriederikeHanssenchaochaowong
authored andcommitted
Nextflow Language Server Compliance for Freec Modules (nf-core#9017)
* format test config * lint assesssignificance * lint freec2* and makegraph* * lint freec * see if we can find a middle ground between language server and what works * try the old way * add null check back * use getAt explicitely
1 parent fbd14ec commit c6bfc26

File tree

12 files changed

+241
-224
lines changed

12 files changed

+241
-224
lines changed
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,47 @@
11
process CONTROLFREEC_ASSESSSIGNIFICANCE {
2-
tag "$meta.id"
2+
tag "${meta.id}"
33
label 'process_low'
44

55
conda "${moduleDir}/environment.yml"
6-
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
7-
'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0' :
8-
'biocontainers/control-freec:11.6b--hdbdd923_0' }"
6+
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
7+
? 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0'
8+
: 'biocontainers/control-freec:11.6b--hdbdd923_0'}"
99

1010
input:
1111
tuple val(meta), path(cnvs), path(ratio)
1212

1313
output:
1414
tuple val(meta), path("*.p.value.txt"), emit: p_value_txt
15-
path "versions.yml" , emit: versions
15+
path "versions.yml", emit: versions
1616

1717
when:
1818
task.ext.when == null || task.ext.when
1919

2020
script:
21-
def args = task.ext.args ?: ''
2221
def prefix = task.ext.prefix ?: "${meta.id}"
23-
def VERSION = '11.6b' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
22+
def VERSION = '11.6b'
23+
// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
2424
"""
2525
cat \$(which assess_significance.R) | R --slave --args ${cnvs} ${ratio}
2626
2727
mv *.p.value.txt ${prefix}.p.value.txt
2828
2929
cat <<-END_VERSIONS > versions.yml
3030
"${task.process}":
31-
controlfreec: $VERSION
31+
controlfreec: ${VERSION}
3232
END_VERSIONS
3333
"""
3434

3535
stub:
3636
def prefix = task.ext.prefix ?: "${meta.id}"
37-
def VERSION = '11.6b' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
37+
def VERSION = '11.6b'
38+
// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
3839
"""
3940
touch ${prefix}.p.value.txt
4041
4142
cat <<-END_VERSIONS > versions.yml
4243
"${task.process}":
43-
controlfreec: $VERSION
44+
controlfreec: ${VERSION}
4445
END_VERSIONS
4546
"""
4647
}
Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
process {
2-
withName:CONTROLFREEC_FREEC{
3-
ext.args = { [
4-
"sample":[
5-
inputformat: 'pileup',
6-
mateorientation: 'FR'
7-
],
8-
"general" :[
9-
bedgraphoutput: "TRUE",
10-
noisydata: "TRUE",
11-
minexpectedgc: "0",
12-
readcountthreshold: "1",
13-
sex: meta.sex,
14-
window: "10",
15-
],
16-
"control":[
17-
inputformat: "pileup",
18-
mateorientation: "FR"
19-
]
20-
]
2+
withName: CONTROLFREEC_FREEC {
3+
ext.args = {
4+
[
5+
"sample": [
6+
inputformat: 'pileup',
7+
mateorientation: 'FR',
8+
],
9+
"general": [
10+
bedgraphoutput: "TRUE",
11+
noisydata: "TRUE",
12+
minexpectedgc: "0",
13+
readcountthreshold: "1",
14+
sex: meta.sex,
15+
window: "10",
16+
],
17+
"control": [
18+
inputformat: "pileup",
19+
mateorientation: "FR",
20+
],
21+
]
2122
}
2223
}
2324
}

modules/nf-core/controlfreec/freec/main.nf

Lines changed: 58 additions & 56 deletions
Large diffs are not rendered by default.
Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
process {
2-
withName:CONTROLFREEC_FREEC{
3-
ext.args = { [
4-
"sample":[
5-
inputformat: 'pileup',
6-
mateorientation: 'FR'
7-
],
8-
"general" :[
9-
bedgraphoutput: "TRUE",
10-
noisydata: "TRUE",
11-
minexpectedgc: "0",
12-
readcountthreshold: "1",
13-
sex: meta.sex,
14-
window: "10",
15-
],
16-
"control":[
17-
inputformat: "pileup",
18-
mateorientation: "FR"
19-
]
20-
]
2+
withName: CONTROLFREEC_FREEC {
3+
ext.args = {
4+
[
5+
"sample": [
6+
inputformat: 'pileup',
7+
mateorientation: 'FR',
8+
],
9+
"general": [
10+
bedgraphoutput: "TRUE",
11+
noisydata: "TRUE",
12+
minexpectedgc: "0",
13+
readcountthreshold: "1",
14+
sex: meta.sex,
15+
window: "10",
16+
],
17+
"control": [
18+
inputformat: "pileup",
19+
mateorientation: "FR",
20+
],
21+
]
2122
}
2223
}
2324
}
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,46 @@
11
process CONTROLFREEC_FREEC2BED {
2-
tag "$meta.id"
2+
tag "${meta.id}"
33
label 'process_low'
44

55
conda "${moduleDir}/environment.yml"
6-
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
7-
'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0' :
8-
'biocontainers/control-freec:11.6b--hdbdd923_0' }"
6+
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
7+
? 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0'
8+
: 'biocontainers/control-freec:11.6b--hdbdd923_0'}"
99

1010
input:
1111
tuple val(meta), path(ratio)
1212

1313
output:
1414
tuple val(meta), path("*.bed"), emit: bed
15-
path "versions.yml" , emit: versions
15+
path "versions.yml", emit: versions
1616

1717
when:
1818
task.ext.when == null || task.ext.when
1919

2020
script:
2121
def args = task.ext.args ?: ''
2222
def prefix = task.ext.prefix ?: "${meta.id}"
23-
def VERSION = '11.6b' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
23+
def VERSION = '11.6b'
24+
// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
2425
"""
2526
freec2bed.pl -f ${ratio} ${args} > ${prefix}.bed
2627
2728
cat <<-END_VERSIONS > versions.yml
2829
"${task.process}":
29-
controlfreec: $VERSION
30+
controlfreec: ${VERSION}
3031
END_VERSIONS
3132
"""
3233

3334
stub:
3435
def prefix = task.ext.prefix ?: "${meta.id}"
35-
def VERSION = '11.6b' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
36+
def VERSION = '11.6b'
37+
// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
3638
"""
3739
touch ${prefix}.bed
3840
3941
cat <<-END_VERSIONS > versions.yml
4042
"${task.process}":
41-
controlfreec: $VERSION
43+
controlfreec: ${VERSION}
4244
END_VERSIONS
4345
"""
4446
}
Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
process {
2-
withName:CONTROLFREEC_FREEC{
3-
ext.args = { [
4-
"sample":[
5-
inputformat: 'pileup',
6-
mateorientation: 'FR'
7-
],
8-
"general" :[
9-
bedgraphoutput: "TRUE",
10-
noisydata: "TRUE",
11-
minexpectedgc: "0",
12-
readcountthreshold: "1",
13-
sex: meta.sex,
14-
window: "10",
15-
],
16-
"control":[
17-
inputformat: "pileup",
18-
mateorientation: "FR"
19-
]
20-
]
2+
withName: CONTROLFREEC_FREEC {
3+
ext.args = {
4+
[
5+
"sample": [
6+
inputformat: 'pileup',
7+
mateorientation: 'FR',
8+
],
9+
"general": [
10+
bedgraphoutput: "TRUE",
11+
noisydata: "TRUE",
12+
minexpectedgc: "0",
13+
readcountthreshold: "1",
14+
sex: meta.sex,
15+
window: "10",
16+
],
17+
"control": [
18+
inputformat: "pileup",
19+
mateorientation: "FR",
20+
],
21+
]
2122
}
2223
}
2324
}
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,46 @@
11
process CONTROLFREEC_FREEC2CIRCOS {
2-
tag "$meta.id"
2+
tag "${meta.id}"
33
label 'process_low'
44

55
conda "${moduleDir}/environment.yml"
6-
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
7-
'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0' :
8-
'biocontainers/control-freec:11.6b--hdbdd923_0' }"
6+
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
7+
? 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0'
8+
: 'biocontainers/control-freec:11.6b--hdbdd923_0'}"
99

1010
input:
1111
tuple val(meta), path(ratio)
1212

1313
output:
1414
tuple val(meta), path("*.circos.txt"), emit: circos
15-
path "versions.yml" , emit: versions
15+
path "versions.yml", emit: versions
1616

1717
when:
1818
task.ext.when == null || task.ext.when
1919

2020
script:
2121
def args = task.ext.args ?: ''
2222
def prefix = task.ext.prefix ?: "${meta.id}"
23-
def VERSION = '11.6b' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
23+
def VERSION = '11.6b'
24+
// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
2425
"""
2526
freec2circos.pl -f ${ratio} ${args} > ${prefix}.circos.txt
2627
2728
cat <<-END_VERSIONS > versions.yml
2829
"${task.process}":
29-
controlfreec: $VERSION
30+
controlfreec: ${VERSION}
3031
END_VERSIONS
3132
"""
3233

3334
stub:
3435
def prefix = task.ext.prefix ?: "${meta.id}"
35-
def VERSION = '11.6b' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
36+
def VERSION = '11.6b'
37+
// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
3638
"""
3739
touch ${prefix}.circos.txt
3840
3941
cat <<-END_VERSIONS > versions.yml
4042
"${task.process}":
41-
controlfreec: $VERSION
43+
controlfreec: ${VERSION}
4244
END_VERSIONS
4345
"""
4446
}
Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
process {
2-
withName:CONTROLFREEC_FREEC{
3-
ext.args = { [
4-
"sample":[
5-
inputformat: 'pileup',
6-
mateorientation: 'FR'
7-
],
8-
"general" :[
9-
bedgraphoutput: "TRUE",
10-
noisydata: "TRUE",
11-
minexpectedgc: "0",
12-
readcountthreshold: "1",
13-
sex: meta.sex,
14-
window: "10",
15-
],
16-
"control":[
17-
inputformat: "pileup",
18-
mateorientation: "FR"
19-
]
20-
]
2+
withName: CONTROLFREEC_FREEC {
3+
ext.args = {
4+
[
5+
"sample": [
6+
inputformat: 'pileup',
7+
mateorientation: 'FR',
8+
],
9+
"general": [
10+
bedgraphoutput: "TRUE",
11+
noisydata: "TRUE",
12+
minexpectedgc: "0",
13+
readcountthreshold: "1",
14+
sex: meta.sex,
15+
window: "10",
16+
],
17+
"control": [
18+
inputformat: "pileup",
19+
mateorientation: "FR",
20+
],
21+
]
2122
}
2223
}
2324
}

0 commit comments

Comments
 (0)