mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
new module: GAMMA (#1532)
* initial version of gamma module * remove trailing whitespace * prettier fix * hardcode version number * Update modules/gamma/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/gamma/main.nf Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> * Update modules/gamma/meta.yml Co-authored-by: Robert A. Petit III <robbie.petit@gmail.com> * update meta and prettier * add whitespaces * add fasta output and tests Co-authored-by: Robert A. Petit III <robbie.petit@gmail.com> Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>
This commit is contained in:
parent
9957689568
commit
378fa5fbb4
6 changed files with 145 additions and 0 deletions
41
modules/gamma/main.nf
Normal file
41
modules/gamma/main.nf
Normal file
|
@ -0,0 +1,41 @@
|
|||
def VERSION = '2.1' // Version information not provided by tool on CLI
|
||||
|
||||
process GAMMA {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gamma=2.1" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gamma%3A2.1--hdfd78af_0':
|
||||
'quay.io/biocontainers/gamma:2.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(fasta)
|
||||
path(db)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.gamma") , emit: gamma
|
||||
tuple val(meta), path("*.psl") , emit: psl
|
||||
tuple val(meta), path("*.gff") , optional:true , emit: gff
|
||||
tuple val(meta), path("*.fasta"), optional:true , emit: fasta
|
||||
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}"
|
||||
"""
|
||||
GAMMA.py \\
|
||||
$args \\
|
||||
$fasta \\
|
||||
$db \\
|
||||
$prefix
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
gamma: $VERSION
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
63
modules/gamma/meta.yml
Normal file
63
modules/gamma/meta.yml
Normal file
|
@ -0,0 +1,63 @@
|
|||
name: "gamma"
|
||||
description: Gene Allele Mutation Microbial Assessment
|
||||
keywords:
|
||||
- gamma
|
||||
- gene-calling
|
||||
tools:
|
||||
- "gamma":
|
||||
description: "Tool for Gene Allele Mutation Microbial Assessment"
|
||||
homepage: "https://github.com/rastanton/GAMMA"
|
||||
documentation: "https://github.com/rastanton/GAMMA"
|
||||
tool_dev_url: "https://github.com/rastanton/GAMMA"
|
||||
doi: "10.1093/bioinformatics/btab607"
|
||||
licence: "['Apache License 2.0']"
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- fasta:
|
||||
type: file
|
||||
description: FASTA file
|
||||
pattern: "*.{fa,fasta}"
|
||||
- db:
|
||||
type: file
|
||||
description: Database in FASTA format
|
||||
pattern: "*.{fa,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"
|
||||
|
||||
- gamma:
|
||||
type: file
|
||||
description: GAMMA file with annotated gene matches
|
||||
pattern: "*.{gamma}"
|
||||
|
||||
- psl:
|
||||
type: file
|
||||
description: PSL file with all gene matches found
|
||||
pattern: "*.{psl}"
|
||||
|
||||
- gff:
|
||||
type: file
|
||||
description: GFF file
|
||||
pattern: "*.{gff}"
|
||||
|
||||
- fasta:
|
||||
type: file
|
||||
description: multifasta file of the gene matches
|
||||
pattern: "*.{fasta}"
|
||||
|
||||
authors:
|
||||
- "@sateeshperi"
|
||||
- "@rastanton"
|
|
@ -675,6 +675,10 @@ freebayes:
|
|||
- modules/freebayes/**
|
||||
- tests/modules/freebayes/**
|
||||
|
||||
gamma:
|
||||
- modules/gamma/**
|
||||
- tests/modules/gamma/**
|
||||
|
||||
gatk4/applybqsr:
|
||||
- modules/gatk4/applybqsr/**
|
||||
- tests/modules/gatk4/applybqsr/**
|
||||
|
|
17
tests/modules/gamma/main.nf
Normal file
17
tests/modules/gamma/main.nf
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { GAMMA } from '../../../modules/gamma/main.nf'
|
||||
|
||||
workflow test_gamma {
|
||||
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
|
||||
]
|
||||
|
||||
db = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ]
|
||||
|
||||
GAMMA ( input, db )
|
||||
}
|
7
tests/modules/gamma/nextflow.config
Normal file
7
tests/modules/gamma/nextflow.config
Normal file
|
@ -0,0 +1,7 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
ext.args = '--fasta'
|
||||
|
||||
}
|
13
tests/modules/gamma/test.yml
Normal file
13
tests/modules/gamma/test.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
- name: gamma test_gamma
|
||||
command: nextflow run tests/modules/gamma -entry test_gamma -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gamma
|
||||
files:
|
||||
- path: output/gamma/test.fasta
|
||||
md5sum: df37b48466181311e0a679f3c5878484
|
||||
- path: output/gamma/test.gamma
|
||||
md5sum: 3256708fa517a65ed01d99e0e3c762ae
|
||||
- path: output/gamma/test.psl
|
||||
md5sum: 162a2757ed3b167ae1e0cdb24213f940
|
||||
- path: output/gamma/versions.yml
|
||||
md5sum: 3fefb5b46c94993362243c5f9a472057
|
Loading…
Reference in a new issue