Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dsl2 updates #33

Merged
merged 3 commits into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
"gatk4/createsequencedictionary": {
"git_sha": "49b18b1639f4f7104187058866a8fab33332bdfe"
},
"gatk4/haplotypecaller": {
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
},
"gatk4/indexfeaturefile": {
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
},
Expand Down
78 changes: 0 additions & 78 deletions modules/local/functions.nf

This file was deleted.

78 changes: 0 additions & 78 deletions modules/local/gatk4/haplotypecaller/functions.nf

This file was deleted.

62 changes: 0 additions & 62 deletions modules/local/gatk4/haplotypecaller/main.nf

This file was deleted.

78 changes: 0 additions & 78 deletions modules/local/gatk4/splitncigarreads/functions.nf

This file was deleted.

39 changes: 19 additions & 20 deletions modules/local/gatk4/splitncigarreads/main.nf
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
// Import generic module functions
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'

params.options = [:]
options = initOptions(params.options)

process GATK4_SPLITNCIGARREADS {
tag "$meta.id"
label 'process_medium'
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.3.0" : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/gatk4:4.2.3.0--hdfd78af_0"
} else {
container "quay.io/biocontainers/gatk4:4.2.3.0--hdfd78af_0"
}
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(bam), path(bai), path(interval)
Expand All @@ -28,20 +17,30 @@ process GATK4_SPLITNCIGARREADS {
tuple val(meta), path('*.bam'), emit: bam
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def interval_option = interval ? "-L ${interval}" : ""
def avail_mem = 3
if (!task.memory) {
log.info '[GATK SplitNCigarReads] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
} else {
avail_mem = task.memory.giga
}
"""
gatk SplitNCigarReads \\
gatk --java-options "-Xmx${avail_mem}g" SplitNCigarReads \\
-R $fasta \\
-I $bam \\
${interval_option} \\
-O ${prefix}.bam \\
$options.args
$args

cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
"${task.process}":
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
END_VERSIONS
"""
}
7 changes: 7 additions & 0 deletions modules/local/gatk4/splitncigarreads/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ input:
type: list
description: BAM/SAM/CRAM file containing reads
pattern: "*.{bam,sam,cram}"
- bai:
type: file
description: BAI/CRAI file from alignment
pattern: "*.{bai,crai}"
- interval:
type: file
description: Bed file with the genomic regions included in the library
- fasta:
type: file
description: The reference fasta file
Expand Down
Loading