-
Notifications
You must be signed in to change notification settings - Fork 695
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* proovframe map init push * stub test renamed properly * text contains test instead, because conda was failing (produces 0s column isntead of a values column) * meta spacing fixed
- Loading branch information
1 parent
aa2f432
commit eaeecb1
Showing
5 changed files
with
219 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
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::proovframe=0.9.7" |
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,48 @@ | ||
process PROOVFRAME_MAP { | ||
tag "$meta.id" | ||
label 'process_medium' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/proovframe:0.9.7--hdfd78af_1': | ||
'biocontainers/proovframe:0.9.7--hdfd78af_1' }" | ||
|
||
input: | ||
tuple val(meta), path(faa), path(fasta) | ||
|
||
output: | ||
tuple val(meta), path("*.tsv"), emit: tsv | ||
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}" | ||
""" | ||
proovframe \\ | ||
map \\ | ||
${args} \\ | ||
-a ${faa} \\ | ||
-o ${prefix}.tsv \\ | ||
${fasta} | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
proovframe: 0.9.7 | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
touch ${prefix}.tsv | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
proovframe: 0.9.7 | ||
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,56 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
name: "proovframe_map" | ||
description: frame-shift correction for long read (meta)genomics - maps proteins to reads | ||
keywords: | ||
- frame-shift correction | ||
- long-read sequencing | ||
- sequence analysis | ||
tools: | ||
- "proovframe": | ||
description: "frame-shift correction for long read (meta)genomics" | ||
homepage: "https://github.com/thackl/proovframe" | ||
documentation: "https://github.com/thackl/proovframe" | ||
tool_dev_url: "https://github.com/thackl/proovframe" | ||
doi: "10.1101/2021.08.23.457338" | ||
licence: ["MIT"] | ||
identifier: biotools:proovframe | ||
|
||
input: | ||
- - meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1', single_end:false ]` | ||
- faa: | ||
type: file | ||
description: A FASTA file containing a database of guide protein sequences | ||
pattern: "*.{faa,fasta,fa}" | ||
- fasta: | ||
type: file | ||
description: A FASTA file containing raw read nucleotide sequences | ||
pattern: "*.{fasta,fa}" | ||
|
||
output: | ||
- tsv: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1', single_end:false ]` | ||
- "*.tsv": | ||
type: file | ||
description: Output TSV file with the frameshift-aware protein to read alignments | ||
pattern: "*.tsv" | ||
- versions: | ||
- "versions.yml": | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
|
||
authors: | ||
- "@manuelcarbajo" | ||
- "@MGS-sails" | ||
- "@vagkaratzas" | ||
maintainers: | ||
- "@vagkaratzas" |
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,59 @@ | ||
nextflow_process { | ||
|
||
name "Test Process PROOVFRAME_MAP" | ||
script "../main.nf" | ||
process "PROOVFRAME_MAP" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "proovframe" | ||
tag "proovframe/map" | ||
|
||
test("sarscov2 - tsv") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert path(process.out.tsv[0][1]).text.contains('MT192765.1 ENSSASP00005000002.1 100.0 7096 1 0 259 21545 1') }, | ||
{ assert snapshot(process.out.versions).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("sarscov2 - tsv - stub") { | ||
options '-stub' | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true), | ||
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,49 @@ | ||
{ | ||
"sarscov2 - tsv": { | ||
"content": [ | ||
[ | ||
"versions.yml:md5,f49f29b8134fdb539364ee46855eb313" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "23.04.5" | ||
}, | ||
"timestamp": "2024-10-16T15:02:00.599243234" | ||
}, | ||
"sarscov2 - tsv - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,f49f29b8134fdb539364ee46855eb313" | ||
], | ||
"tsv": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,f49f29b8134fdb539364ee46855eb313" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "23.04.5" | ||
}, | ||
"timestamp": "2024-10-16T15:02:21.855444606" | ||
} | ||
} |