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
12 changes: 1 addition & 11 deletions modules/nf-core/drep/compare/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ process DREP_COMPARE {

output:
tuple val(meta), path("${prefix}"), emit: directory
path "versions.yml", emit: versions
tuple val("${task.process}"), val("drep"), eval("dRep | head -n 2 | sed 's/.*v//g;s/ .*//g' | tail -n 1"), emit:versions_drep, topic:versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -27,11 +27,6 @@ process DREP_COMPARE {
-p ${task.cpus} \\
${args} \\
-g fastas/*

cat <<-END_VERSIONS > versions.yml
"${task.process}":
drep: \$(dRep | head -n 2 | sed 's/.*v//g;s/ .*//g' | tail -n 1)
END_VERSIONS
"""

stub:
Expand All @@ -40,10 +35,5 @@ process DREP_COMPARE {
"""
echo "${args}"
mkdir -p ${prefix}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
drep: \$(dRep | head -n 2 | sed 's/.*v//g;s/ .*//g' | tail -n 1)
END_VERSIONS
"""
}
34 changes: 23 additions & 11 deletions modules/nf-core/drep/compare/meta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "drep_compare"
description: Performs rapid genome comparisons for a group of genomes and visualize
their relatedness
Expand All @@ -13,17 +12,16 @@ keywords:
- assembly
- microbial genomics
- dereplication

tools:
- "drep":
description: "De-replication of microbial genomes assembled from multiple samples"
homepage: "https://drep.readthedocs.io/en/latest/"
documentation: "https://drep.readthedocs.io/en/latest/"
tool_dev_url: "https://github.com/MrOlm/drep"
doi: "10.1038/ismej.2017.126"
licence: ["MIT"]
licence:
- "MIT"
identifier: biotools:drep

input:
- - meta:
type: map
Expand All @@ -35,7 +33,7 @@ input:
description: List of FASTA files to compare
pattern: "*.{fasta,fa,fna,fas}"
ontologies:
- edam: http://edamontology.org/format_1929 # FASTA
- edam: http://edamontology.org/format_1929
output:
directory:
- - meta:
Expand All @@ -50,13 +48,27 @@ output:
pattern: "${prefix}/"
ontologies:
- edam: "http://edamontology.org/data_1049"
versions_drep:
- - ${task.process}:
type: string
description: The name of the process
- drep:
type: string
description: The name of the tool
- dRep | head -n 2 | sed 's/.*v//g;s/ .*//g' | tail -n 1:
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
- drep:
type: string
description: The name of the tool
- dRep | head -n 2 | sed 's/.*v//g;s/ .*//g' | tail -n 1:
type: eval
description: The expression to obtain the version of the tool
authors:
- "@jfy133"
maintainers:
Expand Down
12 changes: 4 additions & 8 deletions modules/nf-core/drep/compare/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ nextflow_process {
}
}

then {

then {
def stablefiles = []
file(process.out.directory.get(0).get(1)).eachFileRecurse{ file -> if (!file.isDirectory() && ["Secondary_clustering_MDS.pdf", "Secondary_clustering_dendrograms.pdf", "cluster_arguments.json", "warnings.txt", "Cdb.csv", "Ndb.csv"].find {file.toString().endsWith(it)}) {stablefiles.add(file)} }
def unstablefiles = []
Expand All @@ -37,11 +36,10 @@ then {
{ assert snapshot(
stablefiles.sort(),
unstablefiles.sort(),
process.out.versions
).match() }
process.out.findAll { key, val -> key.startsWith('versions') }
).match() }
)
}

}

test("sarscov2 - fasta - stub") {
Expand All @@ -68,7 +66,5 @@ then {
{ assert snapshot(process.out).match() }
)
}

}

}
}
Loading