Merge pull request #1657 from sysbiocoder/hmtnote

Hmtnote
This commit is contained in:
Matthias De Smet 2022-05-17 08:21:32 +02:00 committed by GitHub
commit 53c4a2d1cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 115 additions and 0 deletions

45
modules/hmtnote/main.nf Normal file
View file

@ -0,0 +1,45 @@
process HMTNOTE {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::hmtnote=0.7.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/hmtnote:0.7.2--pyhdfd78af_0':
'quay.io/biocontainers/hmtnote:0.7.2--pyhdfd78af_0' }"
input:
tuple val(meta), path(vcf)
output:
tuple val(meta), path("*_annotated.vcf"), emit: vcf
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}"
"""
hmtnote \\
annotate \\
$vcf \\
${prefix}_annotated.vcf \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
hmtnote: \$(echo \$(hmtnote --version 2>&1) | sed 's/^.*hmtnote, version //; s/Using.*\$//' ))
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_annotated.vcf
cat <<-END_VERSIONS > versions.yml
"${task.process}":
hmtnote: \$(echo \$(hmtnote --version 2>&1) | sed 's/^.*hmtnote, version //; s/Using.*\$//' ))
END_VERSIONS
"""
}

39
modules/hmtnote/meta.yml Normal file
View file

@ -0,0 +1,39 @@
name: hmtnote
description: Human mitochondrial variants annotation using HmtVar.
keywords:
- hmtnote mitochondria annotation
tools:
- hmtnote:
description: Human mitochondrial variants annotation using HmtVar.
homepage: https://github.com/robertopreste/HmtNote
documentation: https://hmtnote.readthedocs.io/en/latest/usage.html
tool_dev_url: None
doi: "https://doi.org/10.1101/600619"
licence: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
- vcf:
type: file
description: vcf file
pattern: "*.vcf"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- vcf:
type: file
description: annotated vcf
pattern: "*_annotated.vcf"
authors:
- "@sysbiocoder"

View file

@ -966,6 +966,10 @@ hmmer/hmmsearch:
- modules/hmmer/hmmsearch/**
- tests/modules/hmmer/hmmsearch/**
hmtnote:
- modules/hmtnote/**
- tests/modules/hmtnote/**
homer/annotatepeaks:
- modules/homer/annotatepeaks/**
- tests/modules/homer/annotatepeaks/**

View file

@ -0,0 +1,14 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { HMTNOTE } from '../../../modules/hmtnote/main.nf'
workflow test_hmtnote {
input = [ [ id:'test' ], // meta map
file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)
]
HMTNOTE ( input)
}

View file

@ -0,0 +1,7 @@
process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
withName: HMTNOTE {
ext.args = '--basic --variab'
}
}

View file

@ -0,0 +1,6 @@
- name: hmtnote test_hmtnote
command: nextflow run ./tests/modules/hmtnote -entry test_hmtnote -c ./tests/config/nextflow.config -c ./tests/modules/hmtnote/nextflow.config
tags:
- hmtnote
files:
- path: output/hmtnote/test_annotated.vcf