-
Notifications
You must be signed in to change notification settings - Fork 734
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add first version module * add test * add tests * add * ass * add * up * update containers * update version * update version easymsa * Update modules/nf-core/foldmason/createdb/main.nf Co-authored-by: Jose Espinosa-Carrasco <kadomu@gmail.com> * Update modules/nf-core/foldmason/createdb/meta.yml Co-authored-by: Jose Espinosa-Carrasco <kadomu@gmail.com> * Update modules/nf-core/foldmason/createdb/main.nf Co-authored-by: Jose Espinosa-Carrasco <kadomu@gmail.com> * Update modules/nf-core/foldmason/createdb/main.nf Co-authored-by: Jose Espinosa-Carrasco <kadomu@gmail.com> --------- Co-authored-by: Jose Espinosa-Carrasco <kadomu@gmail.com>
- Loading branch information
1 parent
8aef0e0
commit 0270c0f
Showing
8 changed files
with
315 additions
and
20 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,5 @@ | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- bioconda::foldmason=2.7bd21ed |
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,47 @@ | ||
process FOLDMASON_CREATEDB { | ||
tag "$meta.id" | ||
label 'process_low' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/a8/a88d162c3f39a1518d48c3faec235e6fcde750586da868b62fc5f0a08a89aa9d/data' : | ||
'community.wave.seqera.io/library/foldmason:2.7bd21ed--e7f739473ad6578d' }" | ||
|
||
input: | ||
tuple val(meta) , path(structures) | ||
|
||
output: | ||
tuple val(meta), path("${prefix}*"), emit: db | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
foldmason createdb \\ | ||
${structures} \\ | ||
${prefix} \\ | ||
$args \\ | ||
--threads $task.cpus | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
foldmason: \$(foldmason | grep "foldmason Version:" | cut -d":" -f 2 | awk '{\$1=\$1;print}') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
touch ${prefix} | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
foldmason: \$(foldmason | grep "foldmason Version:" | cut -d":" -f 2 | awk '{\$1=\$1;print}') | ||
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,48 @@ | ||
name: "foldmason_createdb" | ||
description: Creates a database for Foldmason. | ||
keywords: | ||
- alignment | ||
- MSA | ||
- genomics | ||
- structure | ||
tools: | ||
- "foldmason": | ||
description: "Multiple Protein Structure Alignment at Scale with FoldMason" | ||
homepage: "https://github.com/steineggerlab/foldmason" | ||
documentation: "https://github.com/steineggerlab/foldmason" | ||
tool_dev_url: "https://github.com/steineggerlab/foldmason" | ||
doi: "10.1101/2024.08.01.606130" | ||
licence: ["GPL v3"] | ||
identifier: biotools:foldmason | ||
|
||
input: | ||
- - meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1', single_end:false ]` | ||
- structures: | ||
type: file | ||
description: Input protein structures in `PDB` or `mmCIF` format. | ||
pattern: "*.{pdb,mmcif}" | ||
|
||
output: | ||
- db: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1', single_end:false ]` | ||
- "${prefix}*": | ||
type: file | ||
description: All database files created by Foldmason | ||
pattern: "*" | ||
- versions: | ||
- versions.yml: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
authors: | ||
- "@luisas" | ||
maintainers: | ||
- "@luisas" |
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,66 @@ | ||
nextflow_process { | ||
|
||
name "Test Process FOLDMASON_CREATEDB" | ||
script "../main.nf" | ||
process "FOLDMASON_CREATEDB" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "foldmason" | ||
tag "foldmason/createdb" | ||
tag "untar" | ||
|
||
setup { | ||
|
||
run("UNTAR") { | ||
script "../../../../../modules/nf-core/untar/main.nf" | ||
process { | ||
""" | ||
archive = file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/af2_structures/seatoxin-ref.tar.gz", checkIfExists: true) | ||
input[0] = Channel.of(tuple([id:'test'], archive)) | ||
""" | ||
} | ||
} | ||
} | ||
|
||
test("seatoxin") { | ||
|
||
when { | ||
|
||
process { | ||
""" | ||
input[0] = UNTAR.out.untar.map { meta,dir -> [meta, file(dir).listFiles().collect()]} | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("seatoxin - stub ") { | ||
|
||
when { | ||
|
||
process { | ||
""" | ||
input[0] = UNTAR.out.untar.map { meta,dir -> [meta, file(dir).listFiles().collect()]} | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
128 changes: 128 additions & 0 deletions
128
modules/nf-core/foldmason/createdb/tests/main.nf.test.snap
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,128 @@ | ||
{ | ||
"seatoxin - stub ": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
[ | ||
"test:md5,941321067eae439b4a8ccf6425d84751", | ||
"test.dbtype:md5,f1d3ff8443297732862df21dc4e57262", | ||
"test.index:md5,8d3c65fcda8b216fff2f1eb2c4dcc015", | ||
"test.lookup:md5,83047fddf9b6fbaa99f00cdf5a7dd274", | ||
"test.source:md5,7968a6cb6577ead230c31910380af948", | ||
"test_ca:md5,2738c516c1a15238a5c62c4ba6dee0b9", | ||
"test_ca.dbtype:md5,3fd85f9ee7ca8882c8caa747d0eef0b3", | ||
"test_ca.index:md5,cfdf544c3aa6d7e2034e4a01dac1d0ba", | ||
"test_h:md5,ab9ce99a99fc6ba6a98c4460410b6a16", | ||
"test_h.dbtype:md5,740bab4f9ec8808aedb68d6b1281aeb2", | ||
"test_h.index:md5,dc7c33ddb6a3dc54ad033120ef4c9af4", | ||
"test_ss:md5,75d329b63c0383c3e43090ba89238e14", | ||
"test_ss.dbtype:md5,f1d3ff8443297732862df21dc4e57262", | ||
"test_ss.index:md5,8d3c65fcda8b216fff2f1eb2c4dcc015" | ||
] | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,6ebe56979a45b356d374cfc65c8a2b45" | ||
], | ||
"db": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
[ | ||
"test:md5,941321067eae439b4a8ccf6425d84751", | ||
"test.dbtype:md5,f1d3ff8443297732862df21dc4e57262", | ||
"test.index:md5,8d3c65fcda8b216fff2f1eb2c4dcc015", | ||
"test.lookup:md5,83047fddf9b6fbaa99f00cdf5a7dd274", | ||
"test.source:md5,7968a6cb6577ead230c31910380af948", | ||
"test_ca:md5,2738c516c1a15238a5c62c4ba6dee0b9", | ||
"test_ca.dbtype:md5,3fd85f9ee7ca8882c8caa747d0eef0b3", | ||
"test_ca.index:md5,cfdf544c3aa6d7e2034e4a01dac1d0ba", | ||
"test_h:md5,ab9ce99a99fc6ba6a98c4460410b6a16", | ||
"test_h.dbtype:md5,740bab4f9ec8808aedb68d6b1281aeb2", | ||
"test_h.index:md5,dc7c33ddb6a3dc54ad033120ef4c9af4", | ||
"test_ss:md5,75d329b63c0383c3e43090ba89238e14", | ||
"test_ss.dbtype:md5,f1d3ff8443297732862df21dc4e57262", | ||
"test_ss.index:md5,8d3c65fcda8b216fff2f1eb2c4dcc015" | ||
] | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,6ebe56979a45b356d374cfc65c8a2b45" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.2" | ||
}, | ||
"timestamp": "2024-12-09T15:11:27.426024133" | ||
}, | ||
"seatoxin": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
[ | ||
"test:md5,941321067eae439b4a8ccf6425d84751", | ||
"test.dbtype:md5,f1d3ff8443297732862df21dc4e57262", | ||
"test.index:md5,8d3c65fcda8b216fff2f1eb2c4dcc015", | ||
"test.lookup:md5,83047fddf9b6fbaa99f00cdf5a7dd274", | ||
"test.source:md5,7968a6cb6577ead230c31910380af948", | ||
"test_ca:md5,2738c516c1a15238a5c62c4ba6dee0b9", | ||
"test_ca.dbtype:md5,3fd85f9ee7ca8882c8caa747d0eef0b3", | ||
"test_ca.index:md5,cfdf544c3aa6d7e2034e4a01dac1d0ba", | ||
"test_h:md5,ab9ce99a99fc6ba6a98c4460410b6a16", | ||
"test_h.dbtype:md5,740bab4f9ec8808aedb68d6b1281aeb2", | ||
"test_h.index:md5,dc7c33ddb6a3dc54ad033120ef4c9af4", | ||
"test_ss:md5,75d329b63c0383c3e43090ba89238e14", | ||
"test_ss.dbtype:md5,f1d3ff8443297732862df21dc4e57262", | ||
"test_ss.index:md5,8d3c65fcda8b216fff2f1eb2c4dcc015" | ||
] | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,6ebe56979a45b356d374cfc65c8a2b45" | ||
], | ||
"db": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
[ | ||
"test:md5,941321067eae439b4a8ccf6425d84751", | ||
"test.dbtype:md5,f1d3ff8443297732862df21dc4e57262", | ||
"test.index:md5,8d3c65fcda8b216fff2f1eb2c4dcc015", | ||
"test.lookup:md5,83047fddf9b6fbaa99f00cdf5a7dd274", | ||
"test.source:md5,7968a6cb6577ead230c31910380af948", | ||
"test_ca:md5,2738c516c1a15238a5c62c4ba6dee0b9", | ||
"test_ca.dbtype:md5,3fd85f9ee7ca8882c8caa747d0eef0b3", | ||
"test_ca.index:md5,cfdf544c3aa6d7e2034e4a01dac1d0ba", | ||
"test_h:md5,ab9ce99a99fc6ba6a98c4460410b6a16", | ||
"test_h.dbtype:md5,740bab4f9ec8808aedb68d6b1281aeb2", | ||
"test_h.index:md5,dc7c33ddb6a3dc54ad033120ef4c9af4", | ||
"test_ss:md5,75d329b63c0383c3e43090ba89238e14", | ||
"test_ss.dbtype:md5,f1d3ff8443297732862df21dc4e57262", | ||
"test_ss.index:md5,8d3c65fcda8b216fff2f1eb2c4dcc015" | ||
] | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,6ebe56979a45b356d374cfc65c8a2b45" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.2" | ||
}, | ||
"timestamp": "2024-12-09T15:11:15.375341633" | ||
} | ||
} |
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 |
---|---|---|
@@ -1,8 +1,6 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- bioconda::foldmason=1.763a428 | ||
- bioconda::foldmason=2.7bd21ed | ||
- conda-forge::pigz=2.8 |
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
Oops, something went wrong.