Merge pull request #1714 from nvnieuwk/new-module-gatk4/ComposeSTRTableFile

added gatk4/composestrtablefile
This commit is contained in:
nvnieuwk 2022-06-01 09:33:08 +02:00 committed by GitHub
commit 95e8afe627
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 128 additions and 0 deletions

View file

@ -0,0 +1,53 @@
process GATK4_COMPOSESTRTABLEFILE {
tag "$fasta"
label 'process_low'
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
input:
path(fasta)
path(fasta_fai)
path(dict)
output:
path "*.zip" , emit: str_table
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def avail_mem = 6
if (!task.memory) {
log.info '[GATK ComposeSTRTableFile] Available memory not known - defaulting to 6GB. Specify process memory requirements to change this.'
} else {
avail_mem = task.memory.giga
}
"""
gatk --java-options "-Xmx${avail_mem}g" ComposeSTRTableFile \\
--reference $fasta \\
--output ${fasta.baseName}.zip \\
--tmp-dir . \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
END_VERSIONS
"""
stub:
"""
touch test.zip
cat <<-END_VERSIONS > versions.yml
"${task.process}":
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
END_VERSIONS
"""
}

View file

@ -0,0 +1,43 @@
name: "gatk4_composestrtablefile"
description: This tool looks for low-complexity STR sequences along the reference that are later used to estimate the Dragstr model during single sample auto calibration CalibrateDragstrModel.
keywords:
- gatk4
- composestrtablefile
tools:
- gatk4:
description:
Genome Analysis Toolkit (GATK4). Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools
with a primary focus on variant discovery and genotyping. Its powerful processing engine
and high-performance computing features make it capable of taking on projects of any size.
homepage: https://gatk.broadinstitute.org/hc/en-us
documentation: https://gatk.broadinstitute.org/hc/en-us/articles/4405451249819-ComposeSTRTableFile
tool_dev_url: https://github.com/broadinstitute/gatk
doi: 10.1158/1538-7445.AM2017-3590
licence: ["Apache-2.0"]
input:
- fasta:
type: file
description: FASTA reference file
pattern: "*.{fasta,fa}"
- fasta_fai:
type: file
description: index of the FASTA reference file
pattern: "*.fai"
- dict:
type: file
description: Sequence dictionary of the FASTA reference file
pattern: "*.dict"
output:
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- str_table:
type: file
description: A zipped folder containing the STR table files
pattern: "*.zip"
authors:
- "@nvnieuwk"

View file

@ -751,6 +751,10 @@ gatk4/combinegvcfs:
- modules/gatk4/combinegvcfs/**
- tests/modules/gatk4/combinegvcfs/**
gatk4/composestrtablefile:
- modules/gatk4/composestrtablefile/**
- tests/modules/gatk4/composestrtablefile/**
gatk4/createsequencedictionary:
- modules/gatk4/createsequencedictionary/**
- tests/modules/gatk4/createsequencedictionary/**

View file

@ -0,0 +1,16 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { GATK4_COMPOSESTRTABLEFILE } from '../../../../modules/gatk4/composestrtablefile/main.nf'
workflow test_gatk4_composestrtablefile {
fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
fasta_fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true)
dict = file(params.test_data['homo_sapiens']['genome']['genome_dict'], checkIfExists: true)
GATK4_COMPOSESTRTABLEFILE ( fasta, fasta_fai, dict )
}

View file

@ -0,0 +1,5 @@
process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
}

View file

@ -0,0 +1,7 @@
- name: gatk4 composestrtablefile test_gatk4_composestrtablefile
command: nextflow run ./tests/modules/gatk4/composestrtablefile -entry test_gatk4_composestrtablefile -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/composestrtablefile/nextflow.config
tags:
- gatk4/composestrtablefile
- gatk4
files:
- path: output/gatk4/genome.zip