mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
add gatk4/gatherbqsr (#1130)
* nf-core modules create * add module files * indent * remove templte code * manually revert pytest changes from tools * manually revert pytest changes from tools * add include statement back in Co-authored-by: Maxime U. Garcia <max.u.garcia@gmail.com>
This commit is contained in:
parent
ca3ae9ff4f
commit
a9dd46f010
6 changed files with 153 additions and 12 deletions
41
modules/gatk4/gatherbqsrreports/main.nf
Normal file
41
modules/gatk4/gatherbqsrreports/main.nf
Normal file
|
@ -0,0 +1,41 @@
|
|||
process GATK4_GATHERBQSRREPORTS {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.3.0" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_1':
|
||||
'quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_1' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(recal_table)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.table"), emit: table
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def input = recal_table.collect{"-I ${it}"}.join(' ')
|
||||
|
||||
def avail_mem = 3
|
||||
if (!task.memory) {
|
||||
log.info '[GATK GatherBQSRReports] 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" \\
|
||||
GatherBQSRReports \
|
||||
${input} \
|
||||
--tmp-dir . \
|
||||
$args \
|
||||
--output ${prefix}.table
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
43
modules/gatk4/gatherbqsrreports/meta.yml
Normal file
43
modules/gatk4/gatherbqsrreports/meta.yml
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: gatk4_gatherbqsrreports
|
||||
description: write your description here
|
||||
keywords:
|
||||
- gatk4
|
||||
- gatk4_gatherbqsrreports
|
||||
- base_recalibration
|
||||
tools:
|
||||
- gatk4:
|
||||
description: Genome Analysis Toolkit (GATK4)
|
||||
homepage: https://gatk.broadinstitute.org/hc/en-us
|
||||
documentation: https://gatk.broadinstitute.org/hc/en-us
|
||||
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 ]
|
||||
- recal_table:
|
||||
type: file
|
||||
description: File(s) containing BQSR table(s)
|
||||
pattern: "*.table"
|
||||
|
||||
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"
|
||||
- recal_table:
|
||||
type: file
|
||||
description: File containing joined BQSR table
|
||||
pattern: "*.table"
|
||||
|
||||
authors:
|
||||
- "@FriederikeHanssen"
|
|
@ -314,26 +314,26 @@ cnvkit/batch:
|
|||
- modules/cnvkit/batch/**
|
||||
- tests/modules/cnvkit/batch/**
|
||||
|
||||
cooler/digest:
|
||||
- modules/cooler/digest/**
|
||||
- tests/modules/cooler/digest/**
|
||||
|
||||
cooler/cload:
|
||||
- modules/cooler/cload/**
|
||||
- tests/modules/cooler/cload/**
|
||||
|
||||
cooler/digest:
|
||||
- modules/cooler/digest/**
|
||||
- tests/modules/cooler/digest/**
|
||||
|
||||
cooler/dump:
|
||||
- modules/cooler/dump/**
|
||||
- tests/modules/cooler/dump/**
|
||||
|
||||
cooler/zoomify:
|
||||
- modules/cooler/zoomify/**
|
||||
- tests/software/cooler/zoomify/**
|
||||
|
||||
cooler/merge:
|
||||
- modules/cooler/merge/**
|
||||
- tests/modules/cooler/merge/**
|
||||
|
||||
cooler/zoomify:
|
||||
- modules/cooler/zoomify/**
|
||||
- tests/software/cooler/zoomify/**
|
||||
|
||||
csvtk/concat:
|
||||
- modules/csvtk/concat/**
|
||||
- tests/modules/csvtk/concat/**
|
||||
|
@ -538,6 +538,10 @@ gatk4/filtermutectcalls: #&gatk4_filtermutectcalls
|
|||
- modules/gatk4/filtermutectcalls/**
|
||||
- tests/modules/gatk4/filtermutectcalls/**
|
||||
|
||||
gatk4/gatherbqsrreports:
|
||||
- modules/gatk4/gatherbqsrreports/**
|
||||
- tests/modules/gatk4/gatherbqsrreports/**
|
||||
|
||||
gatk4/genomicsdbimport: #&gatk4_genomicsdbimport
|
||||
- modules/gatk4/genomicsdbimport/**
|
||||
- tests/modules/gatk4/genomicsdbimport/**
|
||||
|
@ -1035,6 +1039,10 @@ pbccs:
|
|||
- modules/pbccs/**
|
||||
- tests/modules/pbccs/**
|
||||
|
||||
peddy:
|
||||
- modules/peddy/**
|
||||
- tests/modules/peddy/**
|
||||
|
||||
phyloflash:
|
||||
- modules/phyloflash/**
|
||||
- tests/modules/phyloflash/**
|
||||
|
@ -1043,10 +1051,6 @@ picard/collecthsmetrics:
|
|||
- modules/picard/collecthsmetrics/**
|
||||
- tests/modules/picard/collecthsmetrics/**
|
||||
|
||||
peddy:
|
||||
- modules/peddy/**
|
||||
- tests/modules/peddy/**
|
||||
|
||||
picard/collectmultiplemetrics:
|
||||
- modules/picard/collectmultiplemetrics/**
|
||||
- tests/modules/picard/collectmultiplemetrics/**
|
||||
|
|
27
tests/modules/gatk4/gatherbqsrreports/main.nf
Normal file
27
tests/modules/gatk4/gatherbqsrreports/main.nf
Normal file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { GATK4_GATHERBQSRREPORTS } from '../../../../modules/gatk4/gatherbqsrreports/main.nf'
|
||||
|
||||
workflow test_gatk4_gatherbqsrreports {
|
||||
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['homo_sapiens']['illumina']['test_baserecalibrator_table'], checkIfExists: true)
|
||||
]
|
||||
|
||||
GATK4_GATHERBQSRREPORTS ( input )
|
||||
}
|
||||
|
||||
workflow test_gatk4_gatherbqsrreports_multiple {
|
||||
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
[file(params.test_data['homo_sapiens']['illumina']['test_baserecalibrator_table'], checkIfExists: true),
|
||||
file(params.test_data['homo_sapiens']['illumina']['test2_baserecalibrator_table'], checkIfExists: true)
|
||||
]
|
||||
]
|
||||
|
||||
GATK4_GATHERBQSRREPORTS ( input )
|
||||
}
|
5
tests/modules/gatk4/gatherbqsrreports/nextflow.config
Normal file
5
tests/modules/gatk4/gatherbqsrreports/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
}
|
21
tests/modules/gatk4/gatherbqsrreports/test.yml
Normal file
21
tests/modules/gatk4/gatherbqsrreports/test.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
- name: gatk4 gatherbqsrreports test_gatk4_gatherbqsrreports
|
||||
command: nextflow run tests/modules/gatk4/gatherbqsrreports -entry test_gatk4_gatherbqsrreports -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4
|
||||
- gatk4/gatherbqsrreports
|
||||
files:
|
||||
- path: output/gatk4/test.table
|
||||
md5sum: 9603b69fdc3b5090de2e0dd78bfcc4bf
|
||||
- path: output/gatk4/versions.yml
|
||||
md5sum: 50238fd0f3b6f4efb2b5335b6324f905
|
||||
|
||||
- name: gatk4 gatherbqsrreports test_gatk4_gatherbqsrreports_multiple
|
||||
command: nextflow run tests/modules/gatk4/gatherbqsrreports -entry test_gatk4_gatherbqsrreports_multiple -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4
|
||||
- gatk4/gatherbqsrreports
|
||||
files:
|
||||
- path: output/gatk4/test.table
|
||||
md5sum: 0c1257eececf95db8ca378272d0f21f9
|
||||
- path: output/gatk4/versions.yml
|
||||
md5sum: c6ce163062dd3609848fc5bc10660427
|
Loading…
Reference in a new issue