Skip to content

Port gget/gget to nf-test and update #8518

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
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/gget/gget/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- bioconda::gget=0.27.2
- conda-forge::gget=0.29.1
25 changes: 21 additions & 4 deletions modules/nf-core/gget/gget/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ process GGET_GGET {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gget:0.27.2--pyh4a94de4_2':
'biocontainers/gget:0.27.2--pyh4a94de4_2' }"
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/7c/7ca1a63d986bc5b68d0543ce326a703265d4a3645be7e05f9af94f2992aa8352/data':
'community.wave.seqera.io/library/gget:0.29.1--3b5a50589bc0feb3' }"

input:
tuple val(meta), path(files)

output:
tuple val(meta), path("*[!versions.yml][!${prefix}.${extension}]*"), emit: files, optional: true
tuple val(meta), path("${prefix}.${extension}") , emit: output, optional: true
tuple val(meta), path("*[!versions.yml][!${prefix}.${extension}]*"), emit: files , optional: true
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this "files" output ?
There aren't generated in the nf-test

tuple val(meta), path("${prefix}.${extension}") , emit: output, optional: true
path "versions.yml", emit: versions

when:
Expand All @@ -26,6 +26,7 @@ process GGET_GGET {
args.contains("-csv") ? "csv" :
"json"
"""
export MPLCONFIGDIR=\$PWD/.tmp
gget \\
$args \\
-o ${prefix}.${extension} \\
Expand All @@ -36,4 +37,20 @@ process GGET_GGET {
gget: \$(echo \$(gget --version 2>&1 | sed 's/gget version: //g'))
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
extension = args.startsWith("pdb") ? "pdb" :
args.contains("-csv") ? "csv" :
"json"
"""
export MPLCONFIGDIR=\$PWD/.tmp #included in stub to stop errors in the version string
touch ${prefix}.${extension}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
gget: \$(echo \$(gget --version 2>&1 | sed 's/gget version: //g'))
END_VERSIONS
"""
}
Loading
Loading