Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 5 additions & 16 deletions modules/nf-core/getorganelle/config/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ process GETORGANELLE_CONFIG {
label 'process_single'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/getorganelle:1.7.7.0--pyh7cba7a3_0':
'quay.io/biocontainers/getorganelle:1.7.7.0--pyh7cba7a3_0' }"
container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/getorganelle:1.7.7.0--pyh7cba7a3_0'
: 'quay.io/biocontainers/getorganelle:1.7.7.0--pyh7cba7a3_0'}"

input:
val(organelle_type)

output:
tuple val(organelle_type), path("getorganelle"), emit: db
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('getorganelle'), eval("get_organelle_config.py --version |& sed 's/^GetOrganelle v//'"), topic: versions, emit: versions_getorganelle

when:
task.ext.when == null || task.ext.when
Expand All @@ -21,25 +21,14 @@ process GETORGANELLE_CONFIG {
def args = task.ext.args ?: ''
"""
get_organelle_config.py \\
$args \\
${args} \\
-a ${organelle_type} \\
--config-dir getorganelle

cat <<-END_VERSIONS > versions.yml
"${task.process}":
getorganelle: \$(get_organelle_config.py --version | sed 's/^GetOrganelle v//g')
END_VERSIONS
"""

stub:

"""
mkdir -p getorganelle/{LabelDatabase,SeedDatabase}
touch getorganelle/{LabelDatabase,SeedDatabase}/${organelle_type}.fasta

cat <<-END_VERSIONS > versions.yml
"${task.process}":
getorganelle: \$(get_organelle_config.py --version | sed 's/^GetOrganelle v//g')
END_VERSIONS
"""
}
30 changes: 22 additions & 8 deletions modules/nf-core/getorganelle/config/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ tools:
documentation: "https://github.com/Kinggerm/GetOrganelle"
tool_dev_url: "https://github.com/Kinggerm/GetOrganelle"
doi: "10.1186/s13059-020-02154-5"
licence: ["GPL v3"]
licence:
- "GPL v3"
identifier: biotools:getorganelle

input:
- organelle_type:
type: string
Expand All @@ -30,12 +30,26 @@ output:
- getorganelle:
type: directory
description: Downloaded database for GetOrganelle
versions_getorganelle:
- - ${task.process}:
type: string
description: The name of the process
- getorganelle:
type: string
description: Downloaded database for GetOrganelle
- get_organelle_config.py --version |& sed 's/^GetOrganelle v//':
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
- - ${task.process}:
type: string
description: The name of the process
- getorganelle:
type: string
description: Downloaded database for GetOrganelle
- get_organelle_config.py --version |& sed 's/^GetOrganelle v//':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@erinyoung"
36 changes: 11 additions & 25 deletions modules/nf-core/getorganelle/config/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,23 @@ nextflow_process {
process {
"""
input[0] = 'all'

"""
}
}

then {
assertAll(
{ assert process.success },
{
def all_files = []

file(process.out.db[0][1]).eachFileRecurse (FileType.FILES) { file ->
all_files << file
}

def all_file_names = all_files.collect { it.name }.toSorted()

def stable_file_names = [
'VERSION',
'animal_mt.fasta'
]

def stable_files = all_files.findAll { it.name in stable_file_names }.toSorted()

assert snapshot(
all_file_names,
stable_files,
process.out.versions[0]
).match()
}
{
def stable_name = getAllFilesFromDir(process.out.db[0][1].toString(), include:['*', '**/*'])
def stable_content = getAllFilesFromDir(process.out.db[0][1].toString(), include:["**/VERSION", "**/animal_mt.fasta"])

assert snapshot(
stable_name*.name.sort(),
stable_content,
process.out.findAll { key, val -> key.startsWith('versions') }
).match()
}
Comment on lines +25 to +34
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has lost its indentation

)
}
}
Expand All @@ -55,15 +42,14 @@ nextflow_process {
process {
"""
input[0] = 'all'

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
48 changes: 22 additions & 26 deletions modules/nf-core/getorganelle/config/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"test-getorganelle-config-stub": {
"content": [
{
"0": [
"db": [
[
"all",
[
Expand All @@ -15,32 +15,20 @@
]
]
],
"1": [
"versions.yml:md5,4e972ee1ef3a8d3509c9442fe644258b"
],
"db": [
"versions_getorganelle": [
[
"all",
[
[
"all.fasta:md5,d41d8cd98f00b204e9800998ecf8427e"
],
[
"all.fasta:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
"GETORGANELLE_CONFIG",
"getorganelle",
"1.7.7.0"
]
],
"versions": [
"versions.yml:md5,4e972ee1ef3a8d3509c9442fe644258b"
]
}
],
"timestamp": "2026-05-07T13:18:22.471441535",
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-02T12:42:17.160676"
"nf-test": "0.9.5",
"nextflow": "25.10.4"
}
},
"test-getorganelle-config": {
"content": [
Expand Down Expand Up @@ -166,12 +154,20 @@
"VERSION:md5,f3d5d8493c18ca2e553a6012d1505310",
"animal_mt.fasta:md5,2833e57f91c231bd19d678d869ed05df"
],
"versions.yml:md5,4e972ee1ef3a8d3509c9442fe644258b"
{
"versions_getorganelle": [
[
"GETORGANELLE_CONFIG",
"getorganelle",
"1.7.7.0"
]
]
}
],
"timestamp": "2026-05-07T13:49:20.038930564",
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-02T13:02:45.095312"
"nf-test": "0.9.5",
"nextflow": "25.10.4"
}
}
}
2 changes: 1 addition & 1 deletion modules/nf-core/getorganelle/fromreads/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- bioconda::getorganelle=1.7.7.1
- bioconda::getorganelle=1.7.7.0
5 changes: 2 additions & 3 deletions modules/nf-core/getorganelle/fromreads/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ process GETORGANELLE_FROMREADS {
output:
tuple val(meta), path("results/${prefix}.${organelle_type}.fasta.gz"), emit: fasta, optional: true
path "results/*", emit: etc
// the rest of the result files
tuple val("${task.process}"), val('getorganelle_from_reads'), eval("get_organelle_from_reads.py --version 2>&1 | sed -n 's/GetOrganelle //p'"), topic: versions, emit: versions_getorganelle
tuple val("${task.process}"), val('getorganelle_from_reads'), eval("get_organelle_from_reads.py --version |& sed 's/^GetOrganelle //'"), topic: versions, emit: versions_getorganelle

when:
task.ext.when == null || task.ext.when
Expand Down Expand Up @@ -49,6 +48,6 @@ process GETORGANELLE_FROMREADS {
mkdir results
touch results/test_1.fastq
touch results/test_2.fastq
echo ''| gzip > results/${prefix}.${organelle_type}.fasta.gz
echo "" | gzip > results/${prefix}.${organelle_type}.fasta.gz
"""
}
8 changes: 4 additions & 4 deletions modules/nf-core/getorganelle/fromreads/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ tools:
documentation: "https://github.com/Kinggerm/GetOrganelle"
tool_dev_url: "https://github.com/Kinggerm/GetOrganelle"
doi: "10.1186/s13059-020-02154-5"
licence: ["GPL v3"]
licence:
- "GPL v3"
identifier: biotools:getorganelle

input:
- - meta:
type: map
Expand Down Expand Up @@ -58,7 +58,7 @@ output:
- getorganelle_from_reads:
type: string
description: The name of the tool
- "get_organelle_from_reads.py --version 2>&1 | sed -n 's/GetOrganelle //p'":
- get_organelle_from_reads.py --version |& sed 's/^GetOrganelle //':
type: eval
description: The expression to obtain the version of the tool
topics:
Expand All @@ -69,7 +69,7 @@ topics:
- getorganelle_from_reads:
type: string
description: The name of the tool
- "get_organelle_from_reads.py --version 2>&1 | sed -n 's/GetOrganelle //p'":
- get_organelle_from_reads.py --version |& sed 's/^GetOrganelle //':
type: eval
description: The expression to obtain the version of the tool
authors:
Expand Down
20 changes: 5 additions & 15 deletions modules/nf-core/getorganelle/fromreads/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ nextflow_process {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
[ id:'test' ],
[
file(params.test_data['homo_sapiens']['illumina']['test_1_fastq_gz'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_2_fastq_gz'], checkIfExists: true)
]
]
input[1] = GETORGANELLE_CONFIG.out.db

"""
}
}
Expand All @@ -45,7 +44,8 @@ nextflow_process {
process.out.etc[0][1],
process.out.etc.flatten().collect { file(it).name }.sort(),
process.out.fasta,
process.out.findAll { key, val -> key.startsWith('versions') }).match('main_output') },
process.out.findAll { key, val -> key.startsWith('versions') }
).match() },
)
}

Expand All @@ -57,7 +57,7 @@ nextflow_process {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
[ id:'test' ],
[
file(params.test_data['homo_sapiens']['illumina']['test_1_fastq_gz'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_2_fastq_gz'], checkIfExists: true)
Expand All @@ -67,25 +67,15 @@ nextflow_process {
'animal_mt',
file('mock/getorganelle')
]

"""
}
}

then {
def fileList_results = process.out.etc.flatten().collect { file(it).name }.sort()
def fileList_fasta = file(process.out.fasta[0][1]).name
assertAll(
{ assert process.success },
{ assert snapshot(
fileList_results,
fileList_fasta,
process.out.findAll { key, val -> key.startsWith('versions') }
).match('file_list') }

{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}

}

}
Loading
Loading