forked from nf-core/modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new module: kaiju/mkfmi (nf-core#4125)
* new module: kaiju/mkfmi * local tests * Update modules/nf-core/kaiju/mkfmi/main.nf Co-authored-by: James A. Fellows Yates <[email protected]> * Update modules/nf-core/kaiju/mkfmi/meta.yml Co-authored-by: James A. Fellows Yates <[email protected]> * Update modules/nf-core/kaiju/mkfmi/meta.yml Co-authored-by: James A. Fellows Yates <[email protected]> --------- Co-authored-by: James A. Fellows Yates <[email protected]>
- Loading branch information
1 parent
bb0fc44
commit 7365564
Showing
6 changed files
with
117 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,36 @@ | ||
process KAIJU_MKFMI { | ||
tag "$meta.id" | ||
label 'process_high' | ||
|
||
conda "bioconda::kaiju=1.9.2" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/kaiju:1.9.2--h5b5514e_0': | ||
'biocontainers/kaiju:1.9.2--h5b5514e_0' }" | ||
|
||
input: | ||
tuple val(meta), path(fasta) | ||
|
||
output: | ||
tuple val(meta), path("*.fmi"), emit: fmi | ||
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}" | ||
""" | ||
kaiju-mkbwt \\ | ||
$args \\ | ||
-n $task.cpus \\ | ||
-o ${prefix} \\ | ||
${fasta} | ||
kaiju-mkfmi ${prefix} | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
kaiju: \$(echo \$( kaiju -h 2>&1 | sed -n 1p | sed 's/^.*Kaiju //' )) | ||
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,44 @@ | ||
name: "kaiju_mkfmi" | ||
description: Make Kaiju FMI-index file from a protein FASTA file | ||
keywords: | ||
- classify | ||
- metagenomics | ||
- fastq | ||
- taxonomic profiling | ||
- database | ||
- index | ||
tools: | ||
- "kaiju": | ||
description: "Fast and sensitive taxonomic classification for metagenomics" | ||
homepage: "https://bioinformatics-centre.github.io/kaiju/" | ||
documentation: "https://github.com/bioinformatics-centre/kaiju/blob/master/README.md" | ||
tool_dev_url: "https://github.com/bioinformatics-centre/kaiju" | ||
doi: "10.1038/ncomms11257" | ||
licence: ["GNU GPL v3"] | ||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'test', single_end:false ]` | ||
- fasta: | ||
type: file | ||
description: Uncompressed Protein FASTA file (mandatory) | ||
pattern: "*.{fa,faa,fasta}" | ||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'test', single_end:false ]` | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
- fmi: | ||
type: file | ||
description: Kaiju FM-index file | ||
pattern: "*.{fmi}" | ||
|
||
authors: | ||
- "@alxndrdiaz" |
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,15 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
nextflow.enable.dsl = 2 | ||
|
||
include { KAIJU_MKFMI } from '../../../../../modules/nf-core/kaiju/mkfmi/main.nf' | ||
|
||
workflow test_kaiju_mkfmi { | ||
|
||
input = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) | ||
] | ||
|
||
KAIJU_MKFMI ( input ) | ||
} |
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,9 @@ | ||
process { | ||
|
||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } | ||
|
||
withName: KAIJU_MKFMI { | ||
ext.args = '-a ACDEFGHIKLMNPQRSTVWY' | ||
} | ||
|
||
} |
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,9 @@ | ||
- name: kaiju mkfmi test_kaiju_mkfmi | ||
command: nextflow run ./tests/modules/nf-core/kaiju/mkfmi -entry test_kaiju_mkfmi -c ./tests/config/nextflow.config | ||
tags: | ||
- kaiju/mkfmi | ||
- kaiju | ||
files: | ||
- path: output/kaiju/test.fmi | ||
md5sum: 05615794180a9c2e739a9bf1c24c99d5 | ||
- path: output/kaiju/versions.yml |