-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from GallVp/mdust
Added mdust
- Loading branch information
Showing
7 changed files
with
233 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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::mdust=2006.10.17" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
process MDUST { | ||
tag "$meta.id" | ||
label 'process_single' | ||
|
||
// WARN: Manually update when changing Bioconda assets | ||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/mdust:2006.10.17--h470a237_1': | ||
'biocontainers/mdust:2006.10.17--h470a237_1' }" | ||
|
||
input: | ||
tuple val(meta), path(fasta) | ||
|
||
output: | ||
tuple val(meta), path("*.fasta") , emit: fasta | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
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!" | ||
""" | ||
mdust \\ | ||
$fasta \\ | ||
$args \\ | ||
> "${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 | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
} |