mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-14 05:43:08 +00:00
3c8ca3fec4
* files created for createsompon, script written, meta written, still needs tests * updated to 2.0.0 method input, however this requires a genomicsDB input now * script finished, meta yaml updated. Tests working locally, test yaml made, needs genomicsdb example on nf-core to run repository tests * versions updated, issue with test data not able to download directory * updated tests to include repo-side data * Apply suggestions from code review * Update modules/gatk4/createsomaticpanelofnormals/main.nf Co-authored-by: GCJMackenzie <gavin.mackenzie@nibsc.org> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
47 lines
1.5 KiB
Text
47 lines
1.5 KiB
Text
// Import generic module functions
|
|
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
|
|
|
params.options = [:]
|
|
options = initOptions(params.options)
|
|
|
|
process GATK4_CREATESOMATICPANELOFNORMALS {
|
|
tag "$meta.id"
|
|
label 'process_low'
|
|
publishDir "${params.outdir}",
|
|
mode: params.publish_dir_mode,
|
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
|
|
|
|
conda (params.enable_conda ? "bioconda::gatk4=4.2.0.0" : null)
|
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
|
container "https://depot.galaxyproject.org/singularity/gatk4:4.2.0.0--0"
|
|
} else {
|
|
container "quay.io/biocontainers/gatk4:4.2.0.0--0"
|
|
}
|
|
|
|
input:
|
|
tuple val(meta), path(genomicsdb)
|
|
path fasta
|
|
path fastaidx
|
|
path dict
|
|
|
|
output:
|
|
tuple val(meta), path("*.vcf.gz"), emit: vcf
|
|
tuple val(meta), path("*.tbi") , emit: tbi
|
|
path "versions.yml" , emit: versions
|
|
|
|
script:
|
|
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
|
"""
|
|
gatk \\
|
|
CreateSomaticPanelOfNormals \\
|
|
-R $fasta \\
|
|
-V gendb://$genomicsdb \\
|
|
-O ${prefix}.vcf.gz \\
|
|
$options.args
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
${getProcessName(task.process)}:
|
|
${getSoftwareName(task.process)}: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
|
|
END_VERSIONS
|
|
"""
|
|
}
|