mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-11 04:33:10 +00:00
1a4c7cec1b
* New modules added: issues #200 and #310 * Update main.nf * Update meta.yml * Update tests/modules/gatk4/genotypegvcfs/main.nf * Apply suggestions from code review * Update main.nf * Updating tests for GenomicsDB input and adding the path for this test resource to test_data.config * Some minor changes on one of the test files I forgot to include Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: GCJMackenzie <43276267+GCJMackenzie@users.noreply.github.com>
40 lines
1.3 KiB
Text
40 lines
1.3 KiB
Text
// Import generic module functions
|
|
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
|
|
|
params.options = [:]
|
|
options = initOptions(params.options)
|
|
|
|
process GATK4_INDEXFEATUREFILE {
|
|
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(feature_file)
|
|
|
|
output:
|
|
tuple val(meta), path("*.{tbi,idx}"), emit: index
|
|
path "versions.yml" , emit: versions
|
|
|
|
script:
|
|
"""
|
|
gatk \\
|
|
IndexFeatureFile \\
|
|
$options.args \\
|
|
-I $feature_file
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
${getProcessName(task.process)}:
|
|
${getSoftwareName(task.process)}: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
|
|
END_VERSIONS
|
|
"""
|
|
}
|