mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-21 18:58:16 +00:00
add module for mcroni (#1750)
Co-authored-by: Jose Espinosa-Carrasco <kadomu@gmail.com>
This commit is contained in:
parent
b036288a86
commit
81232af296
6 changed files with 118 additions and 0 deletions
43
modules/mcroni/main.nf
Normal file
43
modules/mcroni/main.nf
Normal file
|
@ -0,0 +1,43 @@
|
|||
def VERSION = '1.0.4' // Version information not provided by tool on CLI
|
||||
|
||||
process MCRONI {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::mcroni=1.0.4" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/mcroni%3A1.0.4--pyh5e36f6f_0':
|
||||
'quay.io/biocontainers/mcroni:1.0.4--pyh5e36f6f_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(fasta)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.tsv") , emit: tsv
|
||||
tuple val(meta), path("*.fa"), optional: true, emit: fa
|
||||
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}"
|
||||
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
|
||||
|
||||
mcroni \\
|
||||
$args \\
|
||||
--output $prefix \\
|
||||
--fasta $fasta_name
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
mcroni: $VERSION
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
46
modules/mcroni/meta.yml
Normal file
46
modules/mcroni/meta.yml
Normal file
|
@ -0,0 +1,46 @@
|
|||
name: "mcroni"
|
||||
description: Analysis of mcr-1 gene (mobilized colistin resistance) for sequence variation
|
||||
keywords:
|
||||
- resistance
|
||||
- fasta
|
||||
tools:
|
||||
- "mcroni":
|
||||
description: "Scripts for finding and processing promoter variants upstream of mcr-1"
|
||||
homepage: "https://github.com/liampshaw/mcroni"
|
||||
documentation: "https://github.com/liampshaw/mcroni"
|
||||
tool_dev_url: "https://github.com/liampshaw/mcroni"
|
||||
doi: ""
|
||||
licence: "['MIT']"
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- fasta:
|
||||
type: file
|
||||
description: A fasta file.
|
||||
pattern: "*.{fasta.gz,fasta,fa.gz,fa,fna.gz,fna}"
|
||||
|
||||
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: mcroni results in TSV format
|
||||
pattern: "*.tsv"
|
||||
- fa:
|
||||
type: file
|
||||
description: mcr-1 matching sequences
|
||||
pattern: "*.fa"
|
||||
|
||||
authors:
|
||||
- "@rpetit3"
|
|
@ -1290,6 +1290,10 @@ maxquant/lfq:
|
|||
- modules/maxquant/lfq/**
|
||||
- tests/modules/maxquant/lfq/**
|
||||
|
||||
mcroni:
|
||||
- modules/mcroni/**
|
||||
- tests/modules/mcroni/**
|
||||
|
||||
md5sum:
|
||||
- modules/md5sum/**
|
||||
- tests/modules/md5sum/**
|
||||
|
|
13
tests/modules/mcroni/main.nf
Normal file
13
tests/modules/mcroni/main.nf
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { MCRONI } from '../../../modules/mcroni/main.nf'
|
||||
|
||||
workflow test_mcroni {
|
||||
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ]
|
||||
|
||||
MCRONI ( input )
|
||||
}
|
5
tests/modules/mcroni/nextflow.config
Normal file
5
tests/modules/mcroni/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
}
|
7
tests/modules/mcroni/test.yml
Normal file
7
tests/modules/mcroni/test.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
- name: mcroni test_mcroni
|
||||
command: nextflow run ./tests/modules/mcroni -entry test_mcroni -c ./tests/config/nextflow.config -c ./tests/modules/mcroni/nextflow.config
|
||||
tags:
|
||||
- mcroni
|
||||
files:
|
||||
- path: output/mcroni/test_table.tsv
|
||||
md5sum: 64f8438dcc476e8b4d762fedc2e3f69e
|
Loading…
Reference in a new issue