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
2 changes: 1 addition & 1 deletion modules/nf-core/getorganelle/config/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.0
- bioconda::getorganelle=1.7.7.1
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.1--pyhdfd78af_0'
: 'quay.io/biocontainers/getorganelle:1.7.7.1--pyhdfd78af_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"
26 changes: 6 additions & 20 deletions modules/nf-core/getorganelle/config/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ nextflow_process {
process {
"""
input[0] = 'all'

"""
}
}
Expand All @@ -24,25 +23,13 @@ nextflow_process {
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()
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(
all_file_names,
stable_files,
process.out.versions[0]
stable_name*.name.sort(),
stable_content,
process.out.findAll { key, val -> key.startsWith('versions') }
).match()
}
)
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.1"
]
],
"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.1"
]
]
}
],
"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"
}
}
}
11 changes: 5 additions & 6 deletions modules/nf-core/getorganelle/fromreads/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ process GETORGANELLE_FROMREADS {

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'}"
? 'https://depot.galaxyproject.org/singularity/getorganelle:1.7.7.1--pyhdfd78af_0'
: 'quay.io/biocontainers/getorganelle:1.7.7.1--pyhdfd78af_0'}"

input:
tuple val(meta), path(fastq)
tuple val(organelle_type), path(db)

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(meta), path("results/*"), emit: etc
tuple val("${task.process}"), val('getorganelle'), eval("get_organelle_from_reads.py --version |& sed 's/^GetOrganelle v//'"), 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
"""
}
27 changes: 16 additions & 11 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 @@ -45,31 +45,36 @@ output:
description: Complete or partial organelle sequences
pattern: "*.fasta.gz"
ontologies:
- edam: http://edamontology.org/format_3989 # GZIP format
- edam: http://edamontology.org/format_3989 # GZIP
etc:
- results/*:
type: file
description: Other output files
ontologies: []
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'test', single_end:false ]`
- results/*:
type: file
description: Other output files
ontologies: []
versions_getorganelle:
- - ${task.process}:
type: string
description: The name of the process
- getorganelle_from_reads:
- getorganelle:
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 v//':
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- - ${task.process}:
type: string
description: The name of the process
- getorganelle_from_reads:
- getorganelle:
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 v//':
type: eval
description: The expression to obtain the version of the tool
authors:
Expand Down
32 changes: 8 additions & 24 deletions modules/nf-core/getorganelle/fromreads/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,21 @@ 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)
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz', checkIfExists: true)
]
]
input[1] = GETORGANELLE_CONFIG.out.db

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.etc[0][0],
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') },
{ assert snapshot(sanitizeOutput(process.out, unstableKeys: ["etc"])).match() },
)
}

Expand All @@ -57,35 +51,25 @@ 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)
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz', checkIfExists: true)
]
]
input[1] = [
'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