-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: add vcontact3/run module #12198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
3df0dff
3b9a1f4
d4a57f4
8734660
7a3722d
4c55c11
07453f0
edcc86d
b596bf8
a145020
1e34f8b
d22718b
3fa4165
86af038
a1ecfa1
b8d2a35
daf8b00
6d71d6f
34a4966
d3496d6
0bc0934
c5ae2fb
5f54945
22a1586
30342fb
2297055
4c79b75
5d48ffe
6b886be
77e66d8
8843047
9a5878b
90bb9e3
376c3b1
c14a5ea
362caa5
b46a157
c691e2d
4061869
c4872e8
50be805
94f164f
3b4f83b
713dd27
ee4c7cc
33221b6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| channels: | ||
| - conda-forge | ||
| - bioconda | ||
| dependencies: | ||
| - bioconda::vcontact3=3.1.6=pyhdfd78af_0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| process VCONTACT3_RUN { | ||
| tag "$meta.id" | ||
| label 'process_medium' | ||
|
|
||
| conda "${moduleDir}/environment.yml" | ||
| container "${ workflow.containerEngine == 'singularity' && !task.ext.singularityOptions ? | ||
| 'docker://quay.io/biocontainers/vcontact3:3.1.6--pyhdfd78af_0' : | ||
| 'quay.io/biocontainers/vcontact3:3.1.6--pyhdfd78af_0' }" | ||
|
|
||
| input: | ||
| tuple val(meta), path(genomes) | ||
|
|
||
| output: | ||
| tuple val(meta), path("vcontact3_output/"), emit: results | ||
| tuple val("${task.process}"), val('vcontact3'), val('3.1.6'), emit: versions_vcontact3, topic: versions | ||
|
|
||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|
|
||
| script: | ||
| def args = task.ext.args ?: '' | ||
|
|
||
| """ | ||
| vcontact3 run \\ | ||
| -n ${genomes.join(' ')} \\ | ||
| -o vcontact3_output/ \\ | ||
| --threads ${task.cpus} \\ | ||
| ${args} | ||
| """ | ||
|
|
||
| stub: | ||
| """ | ||
| mkdir -p vcontact3_output/ | ||
| touch vcontact3_output/clusters.csv | ||
| touch vcontact3_output/merged_df.csv | ||
| touch vcontact3_output/vContact_contig_id.txt | ||
| """ | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| name: vcontact3_run | ||
| description: Cluster viral genomes using protein-level homology comparison | ||
| keywords: | ||
| - virology | ||
| - clustering | ||
| - metagenomics | ||
| - virus | ||
| - homology | ||
| tools: | ||
| - vcontact3: | ||
| description: Automated host-to-phage gene-level similarity searching | ||
| homepage: https://bitbucket.org/MAVERICLab/vcontact3 | ||
| documentation: https://vcontact3.readthedocs.io/en/latest/ | ||
| tool_dev_url: https://bitbucket.org/MAVERICLab/vcontact3 | ||
| licence: | ||
| - GPL-3.0-or-later | ||
| doi: 10.1186/s13059-019-1879-9 | ||
| identifier: "" | ||
| input: | ||
| - - meta: | ||
| type: map | ||
| description: Groovy map containing sample metadata | ||
| - genomes: | ||
| type: file | ||
| description: Input FASTA or GenBank files with viral sequences | ||
| pattern: "*.{fasta,fa,faa,gbk,gb}" | ||
| ontologies: [] | ||
| output: | ||
| results: | ||
| - - meta: | ||
| type: map | ||
| description: Groovy map with sample metadata | ||
| - vcontact3_output/: | ||
| type: directory | ||
| description: VCONTACT3 output directory containing clustering results | ||
| pattern: "vcontact3_output/" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you also need to add the versions_vcontact3 channel here. |
||
| versions_vcontact3: | ||
| - - ${task.process}: | ||
| type: string | ||
| description: The name of the process | ||
| - vcontact3: | ||
| type: string | ||
| description: The name of the tool | ||
| - 3.1.6: | ||
| type: string | ||
| description: The expression to obtain the version of the tool | ||
| topics: | ||
| versions: | ||
| - - ${task.process}: | ||
| type: string | ||
| description: The name of the process | ||
| - vcontact3: | ||
| type: string | ||
| description: The name of the tool | ||
| - 3.1.6: | ||
| type: string | ||
| description: The expression to obtain the version of the tool | ||
| authors: | ||
| - "@JP-Bro" | ||
| maintainers: | ||
| - "@JP-Bro" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| nextflow_process { | ||
| name "Test Process VCONTACT3_RUN" | ||
| script "../main.nf" | ||
| process "VCONTACT3_RUN" | ||
|
|
||
| tag "modules" | ||
| tag "modules_nfcore" | ||
| tag "vcontact3" | ||
| tag "vcontact3/run" | ||
|
|
||
| test("vcontact3_run - stub") { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not a full test? |
||
| options "-stub" | ||
|
|
||
| when { | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id:'test' ], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| } | ||
| } | ||
|
|
||
| test("vcontact3_run - real") { | ||
| when { | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [ id:'test' ], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assert path(process.out.results[0][1]).exists() | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "vcontact3_run - stub": { | ||
| "results": [ | ||
| [ | ||
| { | ||
| "id": "test" | ||
| }, | ||
| [ | ||
| "vcontact3_output" | ||
| ] | ||
| ] | ||
| ], | ||
| "versions_vcontact3": [ | ||
| [ | ||
| "VCONTACT3_RUN", | ||
| "vcontact3", | ||
| "3.1.6" | ||
| ] | ||
| ] | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on this, the output section should capture the csv files, not the whole directory