Add HAMRONIZATION/FARGENE and updates all HARMONIZATION tools to 1.1.1 (#2107)
* Update main.nf * Update meta.yml * Re-add logos as not staged in a way that works with MultiQC config files * Update main.nf * Remove now unnecessary input channel * Remove unused channel from tests * Update hAMRonization to 1.1.1 and add hAMRonization farGene * Fix hamronizatio ntests * Prettier * Fix fargene linting * Correct file * Fix fargene output * Apply suggestions from code review Co-authored-by: Jasmin F <73216762+jasmezz@users.noreply.github.com> * Fix summarise tests * Prettier Co-authored-by: Jasmin F <73216762+jasmezz@users.noreply.github.com>master
parent
1780cf9bcf
commit
daab0a77dd
@ -0,0 +1,43 @@
|
|||||||
|
process HAMRONIZATION_FARGENE {
|
||||||
|
tag "$meta.id"
|
||||||
|
label 'process_single'
|
||||||
|
|
||||||
|
conda (params.enable_conda ? "bioconda::hamronization=1.1.1" : null)
|
||||||
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
|
'https://depot.galaxyproject.org/singularity/hamronization:1.1.1--pyhdfd78af_0':
|
||||||
|
'quay.io/biocontainers/hamronization:1.1.1--pyhdfd78af_0' }"
|
||||||
|
|
||||||
|
input:
|
||||||
|
tuple val(meta), path(report)
|
||||||
|
val(format)
|
||||||
|
val(software_version)
|
||||||
|
val(reference_db_version)
|
||||||
|
|
||||||
|
output:
|
||||||
|
tuple val(meta), path("*.json") , optional: true, emit: json
|
||||||
|
tuple val(meta), path("*.tsv") , optional: true, emit: tsv
|
||||||
|
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}"
|
||||||
|
"""
|
||||||
|
hamronize \\
|
||||||
|
fargene \\
|
||||||
|
${report} \\
|
||||||
|
$args \\
|
||||||
|
--format ${format} \\
|
||||||
|
--analysis_software_version ${software_version} \\
|
||||||
|
--reference_database_version ${reference_db_version} \\
|
||||||
|
--input_file_name ${prefix} \\
|
||||||
|
> ${prefix}.${format}
|
||||||
|
|
||||||
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
"${task.process}":
|
||||||
|
hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' )
|
||||||
|
END_VERSIONS
|
||||||
|
"""
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
name: "hamronization_fargene"
|
||||||
|
description: Tool to convert and summarize fARGene outputs using the hAMRonization specification
|
||||||
|
keywords:
|
||||||
|
- amr
|
||||||
|
- antimicrobial resistance
|
||||||
|
- arg
|
||||||
|
- antimicrobial resistance genes
|
||||||
|
- reporting
|
||||||
|
- fARGene
|
||||||
|
tools:
|
||||||
|
- hamronization:
|
||||||
|
description: "Tool to convert and summarize AMR gene detection outputs using the hAMRonization specification"
|
||||||
|
homepage: "https://github.com/pha4ge/hAMRonization/"
|
||||||
|
documentation: "https://github.com/pha4ge/hAMRonization/"
|
||||||
|
tool_dev_url: "https://github.com/pha4ge/hAMRonization"
|
||||||
|
doi: ""
|
||||||
|
licence: "['GNU Lesser General Public v3 (LGPL v3)']"
|
||||||
|
|
||||||
|
input:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
- report:
|
||||||
|
type: file
|
||||||
|
description: Output .txt file from fARGene
|
||||||
|
pattern: "*.txt"
|
||||||
|
- format:
|
||||||
|
type: value
|
||||||
|
description: Type of report file to be produced
|
||||||
|
pattern: "tsv|json"
|
||||||
|
- software_version:
|
||||||
|
type: value
|
||||||
|
description: Version of fARGene used
|
||||||
|
pattern: "[0-9].[0-9].[0-9]"
|
||||||
|
- reference_db_version:
|
||||||
|
type: value
|
||||||
|
description: Database version of fARGene used
|
||||||
|
pattern: "[0-9].[0-9].[0-9]"
|
||||||
|
|
||||||
|
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"
|
||||||
|
- json:
|
||||||
|
type: file
|
||||||
|
description: hAMRonised report in JSON format
|
||||||
|
pattern: "*.json"
|
||||||
|
- tsv:
|
||||||
|
type: file
|
||||||
|
description: hAMRonised report in TSV format
|
||||||
|
pattern: "*.json"
|
||||||
|
|
||||||
|
authors:
|
||||||
|
- "@jfy133"
|
@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { GUNZIP } from '../../../modules/gunzip/main.nf'
|
||||||
|
include { FARGENE } from '../../../modules/fargene/main.nf'
|
||||||
|
include { HAMRONIZATION_FARGENE } from '../../../../modules/hamronization/fargene/main.nf'
|
||||||
|
|
||||||
|
workflow test_hamronization_fargene {
|
||||||
|
|
||||||
|
input = [ [ id:'test', single_end:false ], // meta map
|
||||||
|
file(params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true) ]
|
||||||
|
hmm_model = 'class_a'
|
||||||
|
|
||||||
|
GUNZIP ( input )
|
||||||
|
FARGENE ( GUNZIP.out.gunzip, hmm_model )
|
||||||
|
|
||||||
|
HAMRONIZATION_FARGENE ( FARGENE.out.hmm, 'tsv', '0.1', '0.1' )
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
- name: hamronization fargene test_hamronization_fargene
|
||||||
|
command: nextflow run ./tests/modules/hamronization/fargene -entry test_hamronization_fargene -c ./tests/config/nextflow.config -c ./tests/modules/hamronization/fargene/nextflow.config
|
||||||
|
tags:
|
||||||
|
- hamronization
|
||||||
|
- hamronization/fargene
|
||||||
|
files:
|
||||||
|
- path: output/hamronization/test.tsv
|
@ -1,12 +1,12 @@
|
|||||||
- name: hamronization summarize test_hamronization_summarize
|
- name: hamronization summarize test_hamronization_summarize
|
||||||
command: nextflow run ./tests/modules/hamronization/summarize -entry test_hamronization_summarize -c ./tests/config/nextflow.config -c ./tests/modules/hamronization/summarize/nextflow.config
|
command: nextflow run ./tests/modules/hamronization/summarize -entry test_hamronization_summarize -c ./tests/config/nextflow.config -c ./tests/modules/hamronization/summarize/nextflow.config
|
||||||
tags:
|
tags:
|
||||||
- hamronization/summarize
|
|
||||||
- hamronization
|
- hamronization
|
||||||
|
- hamronization/summarize
|
||||||
files:
|
files:
|
||||||
- path: output/hamronization/hamronization_combined_report.json
|
- path: output/hamronization/hamronization_combined_report.json
|
||||||
md5sum: 1623b6cc3b213208a425e023edd94691
|
md5sum: ab0c899664398193a25a699b92f960b9
|
||||||
- path: output/hamronization/test.tsv
|
- path: output/hamronization/test.tsv
|
||||||
md5sum: 3c315605aca0c5964796bb5fd4cdd522
|
md5sum: e886d665bf9fc266be8193859863d2f4
|
||||||
- path: output/hamronization/test2.tsv
|
- path: output/hamronization/test2.tsv
|
||||||
md5sum: 453f38502e35261a50a0849dca34f05b
|
md5sum: 2d94ecb8be8d9036877e47a81ae92a41
|
||||||
|
Loading…
Reference in New Issue