From b75874e11fe1e8636c9436e034ad9b2a82c86025 Mon Sep 17 00:00:00 2001 From: Usman Rashid Date: Mon, 25 Nov 2024 17:06:16 +1300 Subject: [PATCH] Added mdust --- docs/AVAILABLE.txt | 1 + docs/index.html | 5 ++ modules/gallvp/mdust/environment.yml | 7 ++ modules/gallvp/mdust/main.nf | 50 ++++++++++++++ modules/gallvp/mdust/meta.yml | 46 +++++++++++++ modules/gallvp/mdust/tests/main.nf.test | 56 ++++++++++++++++ modules/gallvp/mdust/tests/main.nf.test.snap | 68 ++++++++++++++++++++ 7 files changed, 233 insertions(+) create mode 100644 modules/gallvp/mdust/environment.yml create mode 100644 modules/gallvp/mdust/main.nf create mode 100644 modules/gallvp/mdust/meta.yml create mode 100644 modules/gallvp/mdust/tests/main.nf.test create mode 100644 modules/gallvp/mdust/tests/main.nf.test.snap diff --git a/docs/AVAILABLE.txt b/docs/AVAILABLE.txt index b2fe100..5c0fa43 100644 --- a/docs/AVAILABLE.txt +++ b/docs/AVAILABLE.txt @@ -14,6 +14,7 @@
  • modules/gallvp/repeatmasker/repeatmasker
  • modules/gallvp/plotsr
  • modules/gallvp/minimap2/align
  • +
  • modules/gallvp/mdust
  • modules/gallvp/ltrretriever/ltrretriever
  • modules/gallvp/ltrretriever/lai
  • modules/gallvp/ltrharvest
  • diff --git a/docs/index.html b/docs/index.html index 788ccce..791a0b9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,6 +170,11 @@

    gallvp/nxf-components

    >modules/gallvp/minimap2/align +
  • + modules/gallvp/mdust +
  • modules/gallvp/ltrretriever/ltrretriever "${prefix}.fasta" + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mdust: $VERSION + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '2006.10.17' // WARN: Manually update when changing Bioconda assets + if( "$fasta" == "${prefix}.fasta" ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" + """ + touch ${prefix}.fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mdust: $VERSION + END_VERSIONS + """ +} diff --git a/modules/gallvp/mdust/meta.yml b/modules/gallvp/mdust/meta.yml new file mode 100644 index 0000000..3cb7c63 --- /dev/null +++ b/modules/gallvp/mdust/meta.yml @@ -0,0 +1,46 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "mdust" +description: mdust from DFCI Gene Indices Software Tools +keywords: + - genomics + - gene + - filter +tools: + - "mdust": + description: "" + homepage: "https://github.com/lh3/mdust" + documentation: "https://github.com/lh3/mdust" + tool_dev_url: "https://github.com/lh3/mdust" + licence: ["The Artistic License"] + identifier: "" + +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1' ]` + - fasta: + type: file + description: Input fasta file + pattern: "*.{fa,fsa,faa,fas,fasta}" +output: + - fasta: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1' ]` + - "*.fasta": + type: file + description: Output fasta file + pattern: "*.fasta" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@GallVp" +maintainers: + - "@GallVp" diff --git a/modules/gallvp/mdust/tests/main.nf.test b/modules/gallvp/mdust/tests/main.nf.test new file mode 100644 index 0000000..f297c10 --- /dev/null +++ b/modules/gallvp/mdust/tests/main.nf.test @@ -0,0 +1,56 @@ +nextflow_process { + + name "Test Process MDUST" + script "../main.nf" + process "MDUST" + + tag "modules" + tag "modules_gallvp" + tag "mdust" + + test("sarscov2 - fasta") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - fasta - stub") { + options '-stub' + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/gallvp/mdust/tests/main.nf.test.snap b/modules/gallvp/mdust/tests/main.nf.test.snap new file mode 100644 index 0000000..bab999c --- /dev/null +++ b/modules/gallvp/mdust/tests/main.nf.test.snap @@ -0,0 +1,68 @@ +{ + "sarscov2 - fasta - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,049b6354208f3470a1713aa90aed5e6e" + ], + "fasta": [ + [ + { + "id": "test" + }, + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,049b6354208f3470a1713aa90aed5e6e" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.1" + }, + "timestamp": "2024-11-25T17:04:59.601616" + }, + "sarscov2 - fasta": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.fasta:md5,483f4a5dfe60171c86ee9b7e6dff908b" + ] + ], + "1": [ + "versions.yml:md5,049b6354208f3470a1713aa90aed5e6e" + ], + "fasta": [ + [ + { + "id": "test" + }, + "test.fasta:md5,483f4a5dfe60171c86ee9b7e6dff908b" + ] + ], + "versions": [ + "versions.yml:md5,049b6354208f3470a1713aa90aed5e6e" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.1" + }, + "timestamp": "2024-11-25T17:04:16.863703" + } +} \ No newline at end of file