mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-14 13:43:09 +00:00
add mergemutectstats (#1314)
* add mergemutectstats * correct md5sum * Update modules/gatk4/mergemutectstats/main.nf Co-authored-by: Maxime U. Garcia <maxime.garcia@scilifelab.se>
This commit is contained in:
parent
fdb1664885
commit
3f364e2f31
6 changed files with 115 additions and 0 deletions
41
modules/gatk4/mergemutectstats/main.nf
Normal file
41
modules/gatk4/mergemutectstats/main.nf
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
process GATK4_MERGEMUTECTSTATS {
|
||||||
|
tag "$meta.id"
|
||||||
|
label 'process_low'
|
||||||
|
|
||||||
|
conda (params.enable_conda ? "bioconda::gatk4=4.2.5.0" : null)
|
||||||
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
|
'https://depot.galaxyproject.org/singularity/gatk4:4.2.5.0--hdfd78af_0' :
|
||||||
|
'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }"
|
||||||
|
|
||||||
|
input:
|
||||||
|
tuple val(meta), path(stats)
|
||||||
|
output:
|
||||||
|
tuple val(meta), path("*.vcf.gz.stats"), emit: stats
|
||||||
|
path "versions.yml" , emit: versions
|
||||||
|
|
||||||
|
when:
|
||||||
|
task.ext.when == null || task.ext.when
|
||||||
|
|
||||||
|
script:
|
||||||
|
def args = task.ext.args ?: ''
|
||||||
|
prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
|
def input = stats.collect{ " -stats ${it} "}.join()
|
||||||
|
|
||||||
|
def avail_mem = 3
|
||||||
|
if (!task.memory) {
|
||||||
|
log.info '[GATK MergeMutectStats] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
|
||||||
|
} else {
|
||||||
|
avail_mem = task.memory.giga
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
gatk --java-options "-Xmx${avail_mem}g" MergeMutectStats \\
|
||||||
|
${input} \\
|
||||||
|
-output ${meta.id}.vcf.gz.stats \\
|
||||||
|
$args
|
||||||
|
|
||||||
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
"${task.process}":
|
||||||
|
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
|
||||||
|
END_VERSIONS
|
||||||
|
"""
|
||||||
|
}
|
42
modules/gatk4/mergemutectstats/meta.yml
Normal file
42
modules/gatk4/mergemutectstats/meta.yml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
name: gatk4_mergemutectstats
|
||||||
|
description: Merges mutect2 stats generated on different intervals/regions
|
||||||
|
keywords:
|
||||||
|
- mutectstats
|
||||||
|
- merge
|
||||||
|
tools:
|
||||||
|
- gatk4:
|
||||||
|
description: Genome Analysis Toolkit (GATK4)
|
||||||
|
homepage: https://gatk.broadinstitute.org/hc/en-us
|
||||||
|
documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s
|
||||||
|
tool_dev_url: https://github.com/broadinstitute/gatk
|
||||||
|
doi: "10.1158/1538-7445.AM2017-3590"
|
||||||
|
licence: ["BSD-3-clause"]
|
||||||
|
|
||||||
|
input:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
- stats:
|
||||||
|
type: (list of) file(s)
|
||||||
|
description: Stats file
|
||||||
|
pattern: "*.{stats}"
|
||||||
|
|
||||||
|
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"
|
||||||
|
- stats:
|
||||||
|
type: file
|
||||||
|
description: Stats file
|
||||||
|
pattern: "*.vcf.gz.stats"
|
||||||
|
|
||||||
|
authors:
|
||||||
|
- "@FriederikeHanssen"
|
|
@ -628,6 +628,10 @@ gatk4/mergebamalignment:
|
||||||
- modules/gatk4/mergebamalignment/**
|
- modules/gatk4/mergebamalignment/**
|
||||||
- tests/modules/gatk4/mergebamalignment/**
|
- tests/modules/gatk4/mergebamalignment/**
|
||||||
|
|
||||||
|
gatk4/mergemutectstats:
|
||||||
|
- modules/gatk4/mergemutectstats/**
|
||||||
|
- tests/modules/gatk4/mergemutectstats/**
|
||||||
|
|
||||||
gatk4/mergevcfs:
|
gatk4/mergevcfs:
|
||||||
- modules/gatk4/mergevcfs/**
|
- modules/gatk4/mergevcfs/**
|
||||||
- tests/modules/gatk4/mergevcfs/**
|
- tests/modules/gatk4/mergevcfs/**
|
||||||
|
|
15
tests/modules/gatk4/mergemutectstats/main.nf
Normal file
15
tests/modules/gatk4/mergemutectstats/main.nf
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { GATK4_MERGEMUTECTSTATS } from '../../../../modules/gatk4/mergemutectstats/main.nf'
|
||||||
|
|
||||||
|
workflow test_gatk4_mergemutectstats {
|
||||||
|
|
||||||
|
input = [
|
||||||
|
[ id:'test', single_end:false ], // meta map
|
||||||
|
file(params.test_data['homo_sapiens']['illumina']['test_test2_paired_mutect2_calls_vcf_gz_stats'], checkIfExists: true)
|
||||||
|
]
|
||||||
|
|
||||||
|
GATK4_MERGEMUTECTSTATS ( input )
|
||||||
|
}
|
5
tests/modules/gatk4/mergemutectstats/nextflow.config
Normal file
5
tests/modules/gatk4/mergemutectstats/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
}
|
8
tests/modules/gatk4/mergemutectstats/test.yml
Normal file
8
tests/modules/gatk4/mergemutectstats/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
- name: gatk4 mergemutectstats
|
||||||
|
command: nextflow run ./tests/modules/gatk4/mergemutectstats -entry test_gatk4_mergemutectstats -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mergemutectstats/nextflow.config
|
||||||
|
tags:
|
||||||
|
- gatk4
|
||||||
|
- gatk4/mergemutectstats
|
||||||
|
files:
|
||||||
|
- path: output/gatk4/test.vcf.gz.stats
|
||||||
|
md5sum: 17d2091015d04cbd4a26b7a67dc659e6
|
Loading…
Reference in a new issue