-
Notifications
You must be signed in to change notification settings - Fork 868
Add the deacon/index tool. #8640
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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::deacon=0.5.0" |
This file contains hidden or 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 DEACON_INDEX { | ||
tag "$fasta" | ||
label 'process_single' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/deacon:0.5.0--h4349ce8_0': | ||
'biocontainers/deacon:0.5.0--h4349ce8_0' }" | ||
|
||
input: | ||
tuple val(meta), path(fasta) | ||
|
||
output: | ||
tuple val(meta), path("*.idx"), emit: index | ||
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}" | ||
""" | ||
deacon \\ | ||
index \\ | ||
build \\ | ||
--threads ${task.cpus} \\ | ||
$args \\ | ||
$fasta > ${prefix}.idx | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
deacon: \$(deacon --version | head -n1 | sed 's/deacon //g') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def prefix = task.ext.prefix ?: "${fasta.baseName}" | ||
""" | ||
touch ${prefix}.idx | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
deacon: \$(deacon --version | head -n1 | sed 's/deacon //g') | ||
END_VERSIONS | ||
""" | ||
} |
This file contains hidden or 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,58 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
name: "deacon_index" | ||
description: Create deacon index for reference genome | ||
keywords: | ||
- index | ||
- fasta | ||
- genome | ||
- reference | ||
- minimizer | ||
- decontamination | ||
tools: | ||
- "deacon": | ||
description: "Fast alignment-free sequence filter" | ||
homepage: "https://github.com/bede/deacon" | ||
documentation: "https://github.com/bede/deacon#readme" | ||
tool_dev_url: "https://github.com/bede/deacon" | ||
doi: "10.1093/bioinformatics/btae004" | ||
licence: ["MIT"] | ||
identifier: "biotools:deacon" | ||
|
||
input: | ||
- - meta: | ||
type: map | ||
description: | | ||
Groovy Map containing reference information. | ||
e.g. [ id:'test', single_end:false ] | ||
- fasta: | ||
type: file | ||
description: Input genome fasta file | ||
pattern: "*.{fasta,fasta.gz,fas,fas.gz,fa,fa.gz,fna,fna.gz}" | ||
ontologies: | ||
- edam: "http://edamontology.org/data_2044" # Sequence | ||
- edam: "http://edamontology.org/format_1929" # FASTA | ||
|
||
output: | ||
- index: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing reference information. | ||
e.g. [ id:'test', single_end:false ] | ||
- "*.idx": | ||
type: file | ||
description: Deacon minimizer index file | ||
pattern: "*.idx" | ||
ontologies: | ||
- edam: "http://edamontology.org/data_3210" # Genome index | ||
- versions: | ||
- "versions.yml": | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
|
||
authors: | ||
- "@mberacochea" | ||
maintainers: | ||
- "@mberacochea" |
This file contains hidden or 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,88 @@ | ||
nextflow_process { | ||
|
||
name "Test Process DEACON_INDEX" | ||
script "../main.nf" | ||
process "DEACON_INDEX" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "deacon" | ||
tag "deacon/index" | ||
|
||
test("index sarscov2 - fasta") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test'], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.index, | ||
process.out.versions.collect { path(it).yaml } | ||
).match() | ||
} | ||
) | ||
} | ||
|
||
} | ||
|
||
test("index sarscov2 - fasta gzipped") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test'], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out, | ||
process.out.versions.collect{ path(it).yaml } | ||
).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("index sarscov2 - fasta - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test'], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out, | ||
process.out.versions.collect{ path(it).yaml } | ||
).match() } | ||
) | ||
} | ||
} | ||
} |
This file contains hidden or 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,106 @@ | ||
{ | ||
"index sarscov2 - fasta": { | ||
"content": [ | ||
[ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.idx:md5,7437b25e6659ebfd5cf9be7b325f90c3" | ||
] | ||
], | ||
[ | ||
{ | ||
"DEACON_INDEX": { | ||
"deacon": "0.5.0" | ||
} | ||
} | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "25.04.3" | ||
}, | ||
"timestamp": "2025-06-16T08:54:38.622063" | ||
}, | ||
"index sarscov2 - fasta - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"genome.idx:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,60749febc4eaab16229dc078af00ea27" | ||
], | ||
"index": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"genome.idx:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,60749febc4eaab16229dc078af00ea27" | ||
] | ||
}, | ||
[ | ||
{ | ||
"DEACON_INDEX": { | ||
"deacon": "0.5.0" | ||
} | ||
} | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "25.04.3" | ||
}, | ||
"timestamp": "2025-06-16T12:31:10.825365" | ||
}, | ||
"index sarscov2 - fasta gzipped": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.idx:md5,7437b25e6659ebfd5cf9be7b325f90c3" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,60749febc4eaab16229dc078af00ea27" | ||
], | ||
"index": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.idx:md5,7437b25e6659ebfd5cf9be7b325f90c3" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,60749febc4eaab16229dc078af00ea27" | ||
] | ||
}, | ||
[ | ||
{ | ||
"DEACON_INDEX": { | ||
"deacon": "0.5.0" | ||
} | ||
} | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "25.04.3" | ||
}, | ||
"timestamp": "2025-06-16T12:31:07.212408" | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.