mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
new module hamronization/rgi (#1844)
* new module hamronization/rgi * remove comments * Update modules/hamronization/rgi/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>
This commit is contained in:
parent
b3acfc54f5
commit
057a889d3b
6 changed files with 139 additions and 0 deletions
44
modules/hamronization/rgi/main.nf
Normal file
44
modules/hamronization/rgi/main.nf
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
|
||||||
|
process HAMRONIZATION_RGI {
|
||||||
|
tag "$meta.id"
|
||||||
|
label 'process_low'
|
||||||
|
|
||||||
|
conda (params.enable_conda ? "bioconda::hamronization=1.0.3" : null)
|
||||||
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
|
'https://depot.galaxyproject.org/singularity/hamronization:1.0.3--py_0':
|
||||||
|
'quay.io/biocontainers/hamronization:1.0.3--py_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 \\
|
||||||
|
rgi \\
|
||||||
|
${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
|
||||||
|
"""
|
||||||
|
}
|
62
modules/hamronization/rgi/meta.yml
Normal file
62
modules/hamronization/rgi/meta.yml
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
name: "hamronization_rgi"
|
||||||
|
description: Tool to convert and summarize RGI outputs using the hAMRonization specification.
|
||||||
|
keywords:
|
||||||
|
- amr
|
||||||
|
- antimicrobial resistance
|
||||||
|
- arg
|
||||||
|
- antimicrobial resistance genes
|
||||||
|
- reporting
|
||||||
|
- rgi
|
||||||
|
tools:
|
||||||
|
- hamronization:
|
||||||
|
description: "Tool to convert and summarize AMR gene detection outputs using the hAMRonization specification"
|
||||||
|
homepage: "https://github.com/pha4ge/hAMRonization/blob/master/README.md"
|
||||||
|
documentation: "https://github.com/pha4ge/hAMRonization/blob/master/README.md"
|
||||||
|
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 RGI
|
||||||
|
pattern: "*.txt"
|
||||||
|
- format:
|
||||||
|
type: value
|
||||||
|
description: Type of report file to be produced
|
||||||
|
pattern: "tsv|json"
|
||||||
|
- software_version:
|
||||||
|
type: value
|
||||||
|
description: Version of DeepARG used
|
||||||
|
pattern: "[0-9].[0-9].[0-9]"
|
||||||
|
- reference_db_version:
|
||||||
|
type: value
|
||||||
|
description: Database version of DeepARG 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:
|
||||||
|
- "@louperelo"
|
|
@ -1011,6 +1011,10 @@ hamronization/deeparg:
|
||||||
- modules/hamronization/deeparg/**
|
- modules/hamronization/deeparg/**
|
||||||
- tests/modules/hamronization/deeparg/**
|
- tests/modules/hamronization/deeparg/**
|
||||||
|
|
||||||
|
hamronization/rgi:
|
||||||
|
- modules/hamronization/rgi/**
|
||||||
|
- tests/modules/hamronization/rgi/**
|
||||||
|
|
||||||
hamronization/summarize:
|
hamronization/summarize:
|
||||||
- modules/hamronization/summarize/**
|
- modules/hamronization/summarize/**
|
||||||
- tests/modules/hamronization/summarize/**
|
- tests/modules/hamronization/summarize/**
|
||||||
|
|
16
tests/modules/hamronization/rgi/main.nf
Normal file
16
tests/modules/hamronization/rgi/main.nf
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
include { RGI_MAIN } from '../../../../modules/rgi/main/main.nf'
|
||||||
|
include { HAMRONIZATION_RGI } from '../../../../modules/hamronization/rgi/main.nf'
|
||||||
|
|
||||||
|
workflow test_hamronization_rgi {
|
||||||
|
|
||||||
|
input = [
|
||||||
|
[ id:'test', single_end:false ], // meta map
|
||||||
|
file(params.test_data['haemophilus_influenzae']['genome']['genome_fna_gz'], checkIfExists: true)
|
||||||
|
]
|
||||||
|
|
||||||
|
RGI_MAIN ( input )
|
||||||
|
HAMRONIZATION_RGI ( RGI_MAIN.out.tsv, 'tsv', '1.0.2', '3.2.3' )
|
||||||
|
}
|
5
tests/modules/hamronization/rgi/nextflow.config
Normal file
5
tests/modules/hamronization/rgi/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
}
|
8
tests/modules/hamronization/rgi/test.yml
Normal file
8
tests/modules/hamronization/rgi/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
- name: hamronization rgi
|
||||||
|
command: nextflow run ./tests/modules/hamronization/rgi -entry test_hamronization_rgi -c ./tests/config/nextflow.config -c ./tests/modules/hamronization/rgi/nextflow.config
|
||||||
|
tags:
|
||||||
|
- hamronization
|
||||||
|
- hamronization/rgi
|
||||||
|
files:
|
||||||
|
- path: output/hamronization/test.tsv
|
||||||
|
md5sum: 3e0f7e9321afbc947dd1ea32ce9c0559
|
Loading…
Reference in a new issue