mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Add gatherpileupsummaries (#1311)
* Add gatherpileupsummaries * fix checksum * Update modules/gatk4/gatherpileupsummaries/main.nf * Add in when
This commit is contained in:
parent
8717792135
commit
8c8be7d7c6
6 changed files with 121 additions and 0 deletions
45
modules/gatk4/gatherpileupsummaries/main.nf
Normal file
45
modules/gatk4/gatherpileupsummaries/main.nf
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
process GATK4_GATHERPILEUPSUMMARIES {
|
||||||
|
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(pileup)
|
||||||
|
path dict
|
||||||
|
|
||||||
|
output:
|
||||||
|
tuple val(meta), path("*.pileupsummaries.table"), emit: table
|
||||||
|
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 input = pileup.collect{ "-I ${it} " }.join(' ')
|
||||||
|
|
||||||
|
def avail_mem = 3
|
||||||
|
if (!task.memory) {
|
||||||
|
log.info '[GATK GatherPileupSummaries] 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" \
|
||||||
|
GatherPileupSummaries \
|
||||||
|
--sequence-dictionary ${dict} \
|
||||||
|
${input} \
|
||||||
|
-O ${prefix}.pileupsummaries.table
|
||||||
|
|
||||||
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
"${task.process}":
|
||||||
|
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
|
||||||
|
END_VERSIONS
|
||||||
|
"""
|
||||||
|
}
|
41
modules/gatk4/gatherpileupsummaries/meta.yml
Normal file
41
modules/gatk4/gatherpileupsummaries/meta.yml
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
name: gatk4_gatherpileupsummaries
|
||||||
|
description: write your description here
|
||||||
|
keywords:
|
||||||
|
- sort
|
||||||
|
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 ]
|
||||||
|
- pileup:
|
||||||
|
type: (list of) file(s)
|
||||||
|
description: Pileup files from gatk4/getpileupsummaries
|
||||||
|
pattern: "*.pileups.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"
|
||||||
|
- table:
|
||||||
|
type: file
|
||||||
|
description: Pileup file
|
||||||
|
pattern: "*.pileups.table"
|
||||||
|
|
||||||
|
authors:
|
||||||
|
- "@FriederikeHanssen"
|
|
@ -580,6 +580,10 @@ gatk4/gatherbqsrreports:
|
||||||
- modules/gatk4/gatherbqsrreports/**
|
- modules/gatk4/gatherbqsrreports/**
|
||||||
- tests/modules/gatk4/gatherbqsrreports/**
|
- tests/modules/gatk4/gatherbqsrreports/**
|
||||||
|
|
||||||
|
gatk4/gatherpileupsummaries:
|
||||||
|
- modules/gatk4/gatherpileupsummaries/**
|
||||||
|
- tests/modules/gatk4/gatherpileupsummaries/**
|
||||||
|
|
||||||
gatk4/genomicsdbimport:
|
gatk4/genomicsdbimport:
|
||||||
- modules/gatk4/genomicsdbimport/**
|
- modules/gatk4/genomicsdbimport/**
|
||||||
- tests/modules/gatk4/genomicsdbimport/**
|
- tests/modules/gatk4/genomicsdbimport/**
|
||||||
|
|
18
tests/modules/gatk4/gatherpileupsummaries/main.nf
Normal file
18
tests/modules/gatk4/gatherpileupsummaries/main.nf
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { GATK4_GATHERPILEUPSUMMARIES } from '../../../../modules/gatk4/gatherpileupsummaries/main.nf'
|
||||||
|
|
||||||
|
workflow test_gatk4_gatherpileupsummaries {
|
||||||
|
|
||||||
|
input = [
|
||||||
|
[ id:'test', single_end:false ], // meta map
|
||||||
|
[file(params.test_data['homo_sapiens']['illumina']['test_pileups_table'], checkIfExists: true)]
|
||||||
|
//file(params.test_data['homo_sapiens']['illumina']['test_pileups_table'], checkIfExists: true)]
|
||||||
|
]
|
||||||
|
|
||||||
|
dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true)
|
||||||
|
|
||||||
|
GATK4_GATHERPILEUPSUMMARIES ( input, dict )
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
}
|
8
tests/modules/gatk4/gatherpileupsummaries/test.yml
Normal file
8
tests/modules/gatk4/gatherpileupsummaries/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
- name: gatk4 gatherpileupsummaries
|
||||||
|
command: nextflow run ./tests/modules/gatk4/gatherpileupsummaries -entry test_gatk4_gatherpileupsummaries -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/gatherpileupsummaries/nextflow.config
|
||||||
|
tags:
|
||||||
|
- gatk4
|
||||||
|
- gatk4/gatherpileupsummaries
|
||||||
|
files:
|
||||||
|
- path: output/gatk4/test.pileupsummaries.table
|
||||||
|
md5sum: 8e0ca6f66e112bd2f7ec1d31a2d62469
|
Loading…
Reference in a new issue