Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add bactopia tool for shigeifinder, start updating tests
- Loading branch information
Showing
23 changed files
with
538 additions
and
48 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
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
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
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,53 @@ | ||
// Import generic module functions | ||
include { get_resources; initOptions; saveFiles } from '../../../lib/nf/functions' | ||
RESOURCES = get_resources(workflow.profile, params.max_memory, params.max_cpus) | ||
options = initOptions(params.options ? params.options : [:], 'shigeifinder') | ||
publish_dir = params.is_subworkflow ? "${params.outdir}/bactopia-tools/${params.wf}/${params.run_name}" : params.outdir | ||
conda_tools = "bioconda::shigeifinder=1.3.2" | ||
conda_name = conda_tools.replace("=", "-").replace(":", "-").replace(" ", "-") | ||
conda_env = file("${params.condadir}/${conda_name}").exists() ? "${params.condadir}/${conda_name}" : conda_tools | ||
|
||
process SHIGEIFINDER { | ||
tag "$meta.id" | ||
label 'process_low' | ||
publishDir "${publish_dir}/${meta.id}", mode: params.publish_dir_mode, overwrite: params.force, | ||
saveAs: { filename -> saveFiles(filename:filename, opts:options) } | ||
|
||
conda (params.enable_conda ? conda_env : null) | ||
container "${ workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/shigeifinder:1.3.2--pyhdfd78af_0': | ||
'quay.io/biocontainers/shigeifinder:1.3.2--pyhdfd78af_0' }" | ||
|
||
input: | ||
tuple val(meta), path(fasta) | ||
|
||
output: | ||
tuple val(meta), path("*.tsv"), emit: tsv | ||
path "*.{log,err}" , emit: logs, optional: true | ||
path ".command.*" , emit: nf_logs | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def prefix = options.suffix ? "${options.suffix}" : "${meta.id}" | ||
def VERSION = '1.3.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. | ||
def is_compressed = fasta.getName().endsWith(".gz") ? true : false | ||
def fasta_name = fasta.getName().replace(".gz", "") | ||
""" | ||
if [ "$is_compressed" == "true" ]; then | ||
gzip -c -d $fasta > $fasta_name | ||
fi | ||
shigeifinder \\ | ||
$options.args \\ | ||
--output ${prefix}.tsv \\ | ||
-t $task.cpus \\ | ||
-i $fasta_name | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
shigeifinder: $VERSION | ||
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: "shigeifinder" | ||
description: Determine Shigella serotype from assemblies or Illumina paired-end reads | ||
keywords: | ||
- fastq | ||
- fasta | ||
- shigella | ||
- serotype | ||
tools: | ||
- "shigeifinder": | ||
description: "Cluster informed Shigella and EIEC serotyping tool from Illumina reads and assemblies" | ||
homepage: "https://mgtdb.unsw.edu.au/ShigEiFinder/" | ||
documentation: "https://github.com/LanLab/ShigEiFinder" | ||
tool_dev_url: "https://github.com/LanLab/ShigEiFinder" | ||
doi: "10.1099/mgen.0.000704" | ||
licence: "['GPL v3']" | ||
|
||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- seqs: | ||
type: file | ||
description: Assembly or paired-end Illumina reads | ||
pattern: "*.{fasta.gz,fasta.gz}" | ||
|
||
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" | ||
- tsv: | ||
type: file | ||
description: A TSV formatted file with ShigEiFinder results | ||
pattern: "*.tsv" | ||
|
||
authors: | ||
- "@rpetit3" |
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 @@ | ||
/* | ||
This file includes default parameter values. | ||
*/ | ||
|
||
params { | ||
// ShigEiFinder has no opts for assemblies | ||
} |
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,23 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema", | ||
"$id": "https://raw.githubusercontent.com/bactopia/bactopia/master/modules/nf-core/shigeifinder/params.json", | ||
"title": "ShigEiFinder Module", | ||
"description": "A module serotype prediction of Shigella and EIEC assemblies", | ||
"type": "object", | ||
"definitions": { | ||
"shigeifinder_parameters": { | ||
"title": "ShigEiFinder Parameters", | ||
"type": "object", | ||
"description": "", | ||
"default": "", | ||
"fa_icon": "fas fa-exclamation-circle", | ||
"properties": { | ||
} | ||
} | ||
}, | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/shigeifinder_parameters" | ||
} | ||
] | ||
} |
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
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
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
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.