Skip to content
Draft
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
7 changes: 7 additions & 0 deletions modules/nf-core/macsyfinder/download/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- bioconda::macsyfinder=2.1.6
39 changes: 39 additions & 0 deletions modules/nf-core/macsyfinder/download/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
process MACSYFINDER_DOWNLOAD {
tag "${model_name}"
label 'process_single'

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

input:
val model_name

output:
path "models" , emit: models
tuple val("${task.process}"), val('macsyfinder'), eval('macsyfinder --version 2>&1 | sed "1!d;s/^.*MacSyFinder //;s/ .*$//"'), topic: versions, emit: versions_macsyfinder
tuple val("${task.process}"), val('msf_data'), eval('msf_data --version 2>&1 | awk "NR==4{print \$2}"'), topic: versions, emit: versions_macsydata

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

script:
def args = task.ext.args ?: ''
"""
# msf_data installs models into the current directory by default
# We'll create a models directory to store them
mkdir -p models

msf_data install \\
--target models \\
${args} \\
${model_name}
"""

stub:
"""
mkdir -p models/${model_name}
touch models/${model_name}/definitions.txt
"""
}
73 changes: 73 additions & 0 deletions modules/nf-core/macsyfinder/download/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: "macsyfinder_download"
description: Download MacSyFinder models using msf_data
keywords:
- genomics
- protein
- macromolecular systems
- models
- database
tools:
- "macsyfinder":
description: "Detection of macromolecular systems in protein datasets using systems\
\ modelling and similarity search"
homepage: "https://github.com/gem-pasteur/macsyfinder"
documentation: "https://macsyfinder.readthedocs.io"
tool_dev_url: "https://github.com/gem-pasteur/macsyfinder"
doi: "10.24072/pcjournal.250"
licence:
- "GPL v3"
identifier: biotools:macsyfinder
input:
- model_name:
type: string
description: Name of the MacSyFinder model to download (e.g., 'TXSScan', 'CasFinder')
output:
models:
- models:
type: directory
description: Directory containing downloaded MacSyFinder model definitions
pattern: "models"
versions_macsyfinder:
- - ${task.process}:
type: string
description: The name of the process
- macsyfinder:
type: string
description: The name of the tool
- macsyfinder --version 2>&1 | sed "1!d;s/^.*MacSyFinder //;s/ .*$//":
type: eval
description: The expression to obtain the version of the tool
versions_macsydata:
- - ${task.process}:
type: string
description: The name of the process
- msf_data:
type: string
description: The name of the tool
- msf_data --version 2>&1 | awk "NR==4{print \$2}":
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- - ${task.process}:
type: string
description: The name of the process
- macsyfinder:
type: string
description: The name of the tool
- macsyfinder --version 2>&1 | sed "1!d;s/^.*MacSyFinder //;s/ .*$//":
type: eval
description: The expression to obtain the version of the tool
- - ${task.process}:
type: string
description: The name of the process
- msf_data:
type: string
description: The name of the tool
- msf_data --version 2>&1 | awk "NR==4{print \$2}":
type: eval
description: The expression to obtain the version of the tool
authors:
- "@brovolia"
maintainers:
- "@brovolia"
50 changes: 50 additions & 0 deletions modules/nf-core/macsyfinder/download/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
nextflow_process {

name "Test Process MACSYFINDER_DOWNLOAD"
script "../main.nf"
process "MACSYFINDER_DOWNLOAD"
tag "modules"
tag "modules_nfcore"
tag "macsyfinder"
tag "macsyfinder/download"

test("macsyfinder_download - TXSScan") {

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

then {
assertAll(
{ assert process.success },
{ assert snapshot(sanitizeOutput(process.out)).match("txsscan_output") },
{ assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match("txsscan_versions") }
)
}
}

test("macsyfinder_download - TXSScan - stub") {

options "-stub"

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

then {
assertAll(
{ assert process.success },
{ assert snapshot(sanitizeOutput(process.out)).match("txsscan_stub_output") },
{ assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match("txsscan_stub_versions") }
)
}
}
}
Loading
Loading