Skip to content

Commit d318e34

Browse files
LouisLeNezetLouis Le Nezet
andauthored
Update to topics mageck/* (#12111)
Update to topics Co-authored-by: Louis Le Nezet <louis.le-nezet@inserm.fr>
1 parent 42b9026 commit d318e34

14 files changed

Lines changed: 294 additions & 273 deletions

File tree

modules/nf-core/mageck/count/main.nf

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,32 @@ process MAGECK_COUNT {
1212
path(library)
1313

1414
output:
15-
tuple val(meta), path("*count.txt") , emit: count
15+
tuple val(meta), path("*count.txt") , emit: count
1616
tuple val(meta), path("*.count_normalized.txt"), emit: norm
17-
path "versions.yml" , emit: versions
17+
tuple val("${task.process}"), val("mageck"), eval("mageck -v"), emit: versions_mageck, topic: versions
1818

1919
when:
2020
task.ext.when == null || task.ext.when
2121

2222
script:
2323
def args = task.ext.args ?: ''
2424
def prefix = task.ext.prefix ?: "${meta.id}"
25-
def input_file = ("$inputfile".endsWith(".fastq.gz")) ? "--fastq ${inputfile}" : "-k ${inputfile}"
26-
def sample_label = ("$inputfile".endsWith(".fastq.gz") || "$inputfile".endsWith(".fq.gz")) ? "--sample-label ${meta.id}" : ''
25+
def input_file = ("${inputfile}".endsWith(".fastq.gz")) ? "--fastq ${inputfile}" : "-k ${inputfile}"
26+
def sample_label = ("${inputfile}".endsWith(".fastq.gz") || "${inputfile}".endsWith(".fq.gz")) ? "--sample-label ${meta.id}" : ''
2727

2828
"""
2929
mageck \\
3030
count \\
31-
$args \\
32-
-l $library \\
33-
-n $prefix \\
34-
$sample_label \\
35-
$input_file \\
36-
37-
38-
cat <<-END_VERSIONS > versions.yml
39-
"${task.process}":
40-
mageck: \$(mageck -v)
41-
END_VERSIONS
31+
${args} \\
32+
-l ${library} \\
33+
-n ${prefix} \\
34+
${sample_label} \\
35+
${input_file}
4236
"""
4337
stub:
4438
def prefix = task.ext.prefix ?: "${meta.id}"
4539
"""
4640
touch ${prefix}.count.txt
4741
touch ${prefix}.count_normalized.txt
48-
cat <<-END_VERSIONS > versions.yml
49-
"${task.process}":
50-
mageck: \$(mageck -v)
51-
END_VERSIONS
5242
"""
5343
}

modules/nf-core/mageck/count/meta.yml

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "mageck_count"
2-
description: mageck count for functional genomics, reads are usually mapped to a specific
3-
sgRNA
2+
description: mageck count for functional genomics, reads are usually mapped to a
3+
specific sgRNA
44
keywords:
55
- sort
66
- functional genomics
@@ -13,7 +13,8 @@ tools:
1313
homepage: "https://sourceforge.net/p/mageck/wiki/Home/"
1414
documentation: "https://sourceforge.net/p/mageck/wiki/demo/#step-4-run-the-mageck-count-command"
1515
doi: "10.1186/s13059-014-0554-4"
16-
licence: ["BSD License"]
16+
licence:
17+
- "BSD License"
1718
identifier: biotools:mageck
1819
input:
1920
- - meta:
@@ -23,8 +24,8 @@ input:
2324
e.g. [ id:'test', single_end:false ]
2425
- inputfile:
2526
type: file
26-
description: library fastq file containing the sgRNA and gene name or count
27-
table containing the sgRNA and number of reads to per sample
27+
description: library fastq file containing the sgRNA and gene name or
28+
count table containing the sgRNA and number of reads to per sample
2829
pattern: "*.{fq,fastq,fastq.gz,fq.gz,csv,txt,tsv}"
2930
ontologies:
3031
- edam: http://edamontology.org/format_1930 # FASTQ
@@ -60,13 +61,29 @@ output:
6061
description: File containing normalized read counts
6162
pattern: "*.count_normalized.txt"
6263
ontologies: []
64+
versions_mageck:
65+
- - ${task.process}:
66+
type: string
67+
description: The name of the process
68+
- mageck:
69+
type: string
70+
description: The name of the tool
71+
- mageck -v:
72+
type: eval
73+
description: The expression to obtain the version of the tool
74+
75+
topics:
6376
versions:
64-
- versions.yml:
65-
type: file
66-
description: File containing software versions
67-
pattern: "versions.yml"
68-
ontologies:
69-
- edam: http://edamontology.org/format_3750 # YAML
77+
- - ${task.process}:
78+
type: string
79+
description: The name of the process
80+
- mageck:
81+
type: string
82+
description: The name of the tool
83+
- mageck -v:
84+
type: eval
85+
description: The expression to obtain the version of the tool
86+
7087
authors:
7188
- "@LaurenceKuhl"
7289
maintainers:

modules/nf-core/mageck/count/tests/main.nf.test

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ nextflow_process {
1414
when {
1515
process {
1616
"""
17-
input[0] = [ [ id:'test,test2', single_end:true] , // meta map
18-
[file(params.modules_testdata_base_path + 'genomics/mus_musculus/mageck/ERR376998.small.fastq.gz', checkIfExists: true),
19-
file(params.modules_testdata_base_path + 'genomics/mus_musculus/mageck/ERR376999.small.fastq.gz', checkIfExists: true)]
17+
input[0] = [
18+
[ id:'test,test2' ],
19+
[
20+
file(params.modules_testdata_base_path + 'genomics/mus_musculus/mageck/ERR376998.small.fastq.gz', checkIfExists: true),
21+
file(params.modules_testdata_base_path + 'genomics/mus_musculus/mageck/ERR376999.small.fastq.gz', checkIfExists: true)
22+
]
2023
]
2124
input[1] = file(params.modules_testdata_base_path + 'genomics/mus_musculus/mageck/yusa_library.csv')
2225
"""
@@ -26,7 +29,7 @@ nextflow_process {
2629
then {
2730
assertAll(
2831
{ assert process.success },
29-
{ assert snapshot(process.out).match() }
32+
{ assert snapshot(sanitizeOutput(process.out)).match() }
3033
)
3134
}
3235

@@ -39,9 +42,12 @@ nextflow_process {
3942
when {
4043
process {
4144
"""
42-
input[0] = [ [ id:'test,test2', single_end:true] , // meta map
43-
[file(params.modules_testdata_base_path + 'genomics/mus_musculus/mageck/ERR376998.small.fastq.gz', checkIfExists: true),
44-
file(params.modules_testdata_base_path + 'genomics/mus_musculus/mageck/ERR376999.small.fastq.gz', checkIfExists: true)]
45+
input[0] = [
46+
[ id:'test,test2' ],
47+
[
48+
file(params.modules_testdata_base_path + 'genomics/mus_musculus/mageck/ERR376998.small.fastq.gz', checkIfExists: true),
49+
file(params.modules_testdata_base_path + 'genomics/mus_musculus/mageck/ERR376999.small.fastq.gz', checkIfExists: true)
50+
]
4551
]
4652
input[1] = file(params.modules_testdata_base_path + 'genomics/mus_musculus/mageck/yusa_library.csv')
4753
"""
@@ -51,8 +57,7 @@ nextflow_process {
5157
then {
5258
assertAll(
5359
{ assert process.success },
54-
{ assert snapshot(process.out).match()
55-
}
60+
{ assert snapshot(sanitizeOutput(process.out)).match() }
5661
)
5762
}
5863

modules/nf-core/mageck/count/tests/main.nf.test.snap

Lines changed: 26 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -2,99 +2,69 @@
22
"mus_musculus - fastq": {
33
"content": [
44
{
5-
"0": [
6-
[
7-
{
8-
"id": "test,test2",
9-
"single_end": true
10-
},
11-
"test,test2.count.txt:md5,2759bdc010998f863518cf7a2df812dc"
12-
]
13-
],
14-
"1": [
15-
[
16-
{
17-
"id": "test,test2",
18-
"single_end": true
19-
},
20-
"test,test2.count_normalized.txt:md5,d79f3863168ee0f0750a59d94f70ce1a"
21-
]
22-
],
23-
"2": [
24-
"versions.yml:md5,8fd54f61f3c77976003f79397f6b12d9"
25-
],
265
"count": [
276
[
287
{
29-
"id": "test,test2",
30-
"single_end": true
8+
"id": "test,test2"
319
},
3210
"test,test2.count.txt:md5,2759bdc010998f863518cf7a2df812dc"
3311
]
3412
],
3513
"norm": [
3614
[
3715
{
38-
"id": "test,test2",
39-
"single_end": true
16+
"id": "test,test2"
4017
},
4118
"test,test2.count_normalized.txt:md5,d79f3863168ee0f0750a59d94f70ce1a"
4219
]
4320
],
44-
"versions": [
45-
"versions.yml:md5,8fd54f61f3c77976003f79397f6b12d9"
21+
"versions_mageck": [
22+
[
23+
"MAGECK_COUNT",
24+
"mageck",
25+
"0.5.9.5"
26+
]
4627
]
4728
}
4829
],
49-
"timestamp": "2024-06-14T17:31:00.990366"
30+
"timestamp": "2026-06-19T14:46:05.983468802",
31+
"meta": {
32+
"nf-test": "0.9.5",
33+
"nextflow": "26.04.3"
34+
}
5035
},
5136
"mus_musculus - fastq - stub": {
5237
"content": [
5338
{
54-
"0": [
55-
[
56-
{
57-
"id": "test,test2",
58-
"single_end": true
59-
},
60-
"test,test2.count.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
61-
]
62-
],
63-
"1": [
64-
[
65-
{
66-
"id": "test,test2",
67-
"single_end": true
68-
},
69-
"test,test2.count_normalized.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
70-
]
71-
],
72-
"2": [
73-
"versions.yml:md5,8fd54f61f3c77976003f79397f6b12d9"
74-
],
7539
"count": [
7640
[
7741
{
78-
"id": "test,test2",
79-
"single_end": true
42+
"id": "test,test2"
8043
},
8144
"test,test2.count.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
8245
]
8346
],
8447
"norm": [
8548
[
8649
{
87-
"id": "test,test2",
88-
"single_end": true
50+
"id": "test,test2"
8951
},
9052
"test,test2.count_normalized.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
9153
]
9254
],
93-
"versions": [
94-
"versions.yml:md5,8fd54f61f3c77976003f79397f6b12d9"
55+
"versions_mageck": [
56+
[
57+
"MAGECK_COUNT",
58+
"mageck",
59+
"0.5.9.5"
60+
]
9561
]
9662
}
9763
],
98-
"timestamp": "2024-06-14T17:31:12.173269"
64+
"timestamp": "2026-06-19T14:46:14.042271757",
65+
"meta": {
66+
"nf-test": "0.9.5",
67+
"nextflow": "26.04.3"
68+
}
9969
}
10070
}

modules/nf-core/mageck/mle/main.nf

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ process MAGECK_MLE {
1414
output:
1515
tuple val(meta), path("*.gene_summary.txt") , emit: gene_summary
1616
tuple val(meta), path("*.sgrna_summary.txt"), emit: sgrna_summary
17-
path "versions.yml" , emit: versions
17+
tuple val("${task.process}"), val("mageck"), eval("mageck -v"), emit: versions_mageck, topic: versions
1818

1919
when:
2020
task.ext.when == null || task.ext.when
@@ -26,28 +26,18 @@ process MAGECK_MLE {
2626
"""
2727
mageck \\
2828
mle \\
29-
$args \\
30-
--threads $task.cpus \\
31-
-k $count_table \\
32-
-d $design_matrix \\
33-
-n $prefix
34-
35-
cat <<-END_VERSIONS > versions.yml
36-
"${task.process}":
37-
mageck: \$(mageck -v)
38-
END_VERSIONS
29+
${args} \\
30+
--threads ${task.cpus} \\
31+
-k ${count_table} \\
32+
-d ${design_matrix} \\
33+
-n ${prefix}
3934
"""
4035
stub:
4136
def prefix = task.ext.prefix ?: "${meta.id}"
4237

4338
"""
4439
touch ${prefix}.gene_summary.txt
4540
touch ${prefix}.sgrna_summary.txt
46-
47-
cat <<-END_VERSIONS > versions.yml
48-
"${task.process}":
49-
mageck: \$(mageck -v)
50-
END_VERSIONS
5141
"""
5242

5343

modules/nf-core/mageck/mle/meta.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ tools:
1212
documentation: "https://sourceforge.net/p/mageck/wiki/Home/"
1313
tool_dev_url: "https://bitbucket.org/liulab/mageck/src"
1414
doi: "10.1186/s13059-015-0843-6"
15-
licence: ["BSD"]
15+
licence:
16+
- "BSD"
1617
identifier: biotools:mageck
1718
input:
1819
- - meta:
@@ -63,13 +64,29 @@ output:
6364
associated gene
6465
pattern: "*.{gene_summary}"
6566
ontologies: []
67+
versions_mageck:
68+
- - ${task.process}:
69+
type: string
70+
description: The name of the process
71+
- mageck:
72+
type: string
73+
description: The name of the tool
74+
- mageck -v:
75+
type: eval
76+
description: The expression to obtain the version of the tool
77+
78+
topics:
6679
versions:
67-
- versions.yml:
68-
type: file
69-
description: File containing software versions
70-
pattern: "versions.yml"
71-
ontologies:
72-
- edam: http://edamontology.org/format_3750 # YAML
80+
- - ${task.process}:
81+
type: string
82+
description: The name of the process
83+
- mageck:
84+
type: string
85+
description: The name of the tool
86+
- mageck -v:
87+
type: eval
88+
description: The expression to obtain the version of the tool
89+
7390
authors:
7491
- "@LaurenceKuhl"
7592
maintainers:

0 commit comments

Comments
 (0)