Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New module: busco/download #7788

Merged
merged 8 commits into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from 6 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
8 changes: 8 additions & 0 deletions modules/nf-core/busco/download/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda

dependencies:
- bioconda::busco=5.8.2
48 changes: 48 additions & 0 deletions modules/nf-core/busco/download/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
process BUSCO_DOWNLOAD {
tag "$lineage"
label 'process_low'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/busco:5.8.2--pyhdfd78af_0':
'biocontainers/busco:5.8.2--pyhdfd78af_0' }"

input:
val lineage

output:
path "busco_downloads", emit: download_dir
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${lineage}"
"""
busco \\
--download $lineage \\
$args

cat <<-END_VERSIONS > versions.yml
"${task.process}":
busco: \$( busco --version 2>&1 | sed 's/^BUSCO //' )
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
"""
echo "busco \\
--download $lineage \\
$args"

mkdir busco_downloads

cat <<-END_VERSIONS > versions.yml
"${task.process}":
busco: \$( busco --version 2>&1 | sed 's/^BUSCO //' )
END_VERSIONS
"""
}
38 changes: 38 additions & 0 deletions modules/nf-core/busco/download/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: busco_download
description: Download database for BUSCO
keywords:
- quality control
- genome
- transcriptome
- proteome
tools:
- busco:
description: BUSCO provides measures for quantitative assessment of genome assembly,
gene set, and transcriptome completeness based on evolutionarily informed expectations
of gene content from near-universal single-copy orthologs selected from OrthoDB.
homepage: https://busco.ezlab.org/
documentation: https://busco.ezlab.org/busco_userguide.html
tool_dev_url: https://gitlab.com/ezlab/busco
doi: "10.1007/978-1-4939-9173-0_14"
licence: ["MIT"]
identifier: biotools:busco
input:
- - lineage:
type: string
description: The BUSCO lineage to use, or "auto", "auto_prok" or "auto_euk"
to automatically select lineage
output:
- download_dir:
- busco_downloads:
type: file
description: Directory with busco database
pattern: "busco_downloads"
- versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@zachary-foster"
maintainers:
- "@zachary-foster"
53 changes: 53 additions & 0 deletions modules/nf-core/busco/download/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
nextflow_process {

name "Test Process BUSCO_DOWNLOAD"
script "../main.nf"
process "BUSCO_DOWNLOAD"

tag "modules"
tag "modules_nfcore"
tag "busco"
tag "busco/download"

test("BUSCO database download") {

when {
process {
"""
input[0] = [ 'eukaryota_odb10' ]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert path(process.out.download_dir.get(0)).exists() },
{ assert snapshot(process.out.versions).match() }
)
}

}

test("BUSCO database download - stub") {

options "-stub"

when {
process {
"""
input[0] = [ 'stub' ]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}

}

}
41 changes: 41 additions & 0 deletions modules/nf-core/busco/download/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"BUSCO database download": {
"content": [
[
"versions.yml:md5,48283b252a072b5cc4054d311e315c10"
]
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2025-03-12T13:48:41.389560409"
},
"BUSCO database download - stub": {
"content": [
{
"0": [
[

]
],
"1": [
"versions.yml:md5,48283b252a072b5cc4054d311e315c10"
],
"download_dir": [
[

]
],
"versions": [
"versions.yml:md5,48283b252a072b5cc4054d311e315c10"
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2025-03-12T17:24:32.861082849"
}
}
2 changes: 2 additions & 0 deletions modules/nf-core/busco/download/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
busco/download:
- "modules/nf-core/busco/download/**"
Loading