Skip to content
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -334,3 +334,5 @@ fabric.properties
.nf-test/
.nf-test/*
.nf-test*

null/
4 changes: 4 additions & 0 deletions conf/hpc.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ params {
ref_flat = "${params.dx_tracks_path}/rna/${params.gencode_version_name}.ref_annot.gtf.refflat"
rrna_intervals = "${params.dx_tracks_path}/rna/GRCh38_rRNA_genbank.interval_list"

// dbSNP
dbsnp = "/hpc/diaggen/data/databases/dbSNP/dbSNP_v156.vcf.gz"

// Fusion config
starfusion_ref = params.genome_base
Expand Down Expand Up @@ -66,4 +68,6 @@ params {
]
]

cache_dir = "/hpc/diaggen/data/databases/Nextflow_cache/DxNextflowRNA/"

}
70 changes: 67 additions & 3 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,70 @@ process {
scratch = true
}

withName: GATK4_BEDTOINTERVALLIST {
ext.args = '--DROP_MISSING_CONTIGS TRUE'
storeDir = params.cache_dir ? "${params.cache_dir}/gatk4/bedtointervallist" : null
}

withName: GATK4_CREATESEQUENCEDICTIONARY {
storeDir = params.cache_dir ? "${params.cache_dir}/gatk4/createsequencedictionary" : null
}

withName: GATK4_INTERVALLISTTOOLS {
ext.args = { [
"--SUBDIVISION_MODE BALANCING_WITHOUT_INTERVAL_SUBDIVISION_WITH_OVERFLOW",
"--UNIQUE true",
"--SORT true",
"--SCATTER_COUNT ${params.scatter_size}"
].join(' ').trim() }
storeDir = params.cache_dir ? "${params.cache_dir}/gatk4/intervallisttools" : null
}

withName: GATK4_HAPLOTYPECALLER {
cpus = 2
memory = { 8.GB * task.attempt }
time = { 4.h * task.attempt }
array = params.scatter_size
Comment thread
Jorisvansteenbrugge marked this conversation as resolved.

ext.args = { [
"--dont-use-soft-clipped-bases",
"--standard-min-confidence-threshold-for-calling ${params.min_confidence_threshold}",
"--emit-ref-confidence GVCF"
].join(' ').trim() }
}

withName: GATK4_SPLITNCIGARREADS {
cpus = 2
memory = { 16.GB * task.attempt }
time = { 4.h * task.attempt }
array = params.scatter_size

ext.args = '--create-output-bam-index false'
ext.prefix = { "${meta.id}.splitncigarreads" }
}

withName: GATK4_VARIANTFILTRATION {
cpus = 1
memory = { 6.GB * task.attempt }
time = { 2.h * task.attempt }

ext.prefix = { "${meta.id}.hc.filtered" }
ext.args = { [
params.gatk_vf_window_size ? "--cluster-window-size ${params.gatk_vf_window_size}" : '',
params.gatk_vf_cluster_size ? "--cluster-size ${params.gatk_vf_cluster_size}" : '',
params.gatk_vf_fs_filter ? "--filter-name \"FS\" --filter-expression \"FS > ${params.gatk_vf_fs_filter}\" " : '',
params.gatk_vf_qd_filter ? "--filter-name \"QD\" --filter-expression \"QD < ${params.gatk_vf_qd_filter}\" " : '',
].join(' ').trim() }
publishDir = [
path: { "${params.outdir}/variant_calling/" },
mode: params.publish_dir_mode
]
}

withName: BEDOPS_GTF2BED {
storeDir = params.cache_dir ? "${params.cache_dir}/gtf2bed" : null
}

withName: HGNC_DOWNLOAD {
cpus = 1
memory = { 1.GB }
Expand All @@ -82,10 +146,10 @@ process {
time = { 15.m * task.attempt }

ext.args = { params.multiqc_title ? "--title \"${params.multiqc_title}\"" : "--title \"${params.analysis_id}\"" }
ext.prefix = { $ { params.analysis_id } }
ext.prefix = { params.analysis_id }
publishDir = [
[
path: "${params.outdir}/QC",
path: { "${params.outdir}/QC" },
mode: params.publish_dir_mode,
]
]
Expand Down Expand Up @@ -311,7 +375,7 @@ process {
path: "${params.outdir}/QC/star_align",
mode: params.publish_dir_mode,
saveAs: { filename ->
filename.endsWith('.bam') || filename.endsWith(".fastq.gz") : null ? filename
filename.endsWith('.bam') || filename.endsWith(".fastq.gz") ? null : filename
}
Comment thread
Jorisvansteenbrugge marked this conversation as resolved.
]
]
Expand Down
46 changes: 46 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@
"git_sha": "025a6f75e1f72e4ab60abb4bd65b3f289d4ad910",
"installed_by": ["modules"]
},
"bcftools/index": {
"branch": "master",
"git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120",
"installed_by": ["modules"]
},
"bedops/gtf2bed": {
"branch": "master",
"git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120",
"installed_by": ["modules"],
"patch": "modules/nf-core/bedops/gtf2bed/bedops-gtf2bed.diff"
},
"fastqc": {
"branch": "master",
"git_sha": "dc94b6ee04a05ddb9f7ae050712ff30a13149164",
Expand All @@ -25,6 +36,41 @@
"git_sha": "e753770db613ce014b3c4bc94f6cba443427b726",
"installed_by": ["modules"]
},
"gatk4/bedtointervallist": {
"branch": "master",
"git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120",
"installed_by": ["modules"]
},
"gatk4/createsequencedictionary": {
"branch": "master",
"git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120",
"installed_by": ["modules"]
},
"gatk4/haplotypecaller": {
"branch": "master",
"git_sha": "b73338eca19d798eb0ef6ed112ef4d27a30d2871",
"installed_by": ["modules"]
},
"gatk4/intervallisttools": {
"branch": "master",
"git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120",
"installed_by": ["modules"]
},
"gatk4/mergevcfs": {
"branch": "master",
"git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120",
"installed_by": ["modules"]
},
"gatk4/splitncigarreads": {
"branch": "master",
"git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120",
"installed_by": ["modules"]
},
"gatk4/variantfiltration": {
"branch": "master",
"git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120",
"installed_by": ["modules"]
},
"multiqc": {
"branch": "master",
"git_sha": "cf17ca47590cc578dfb47db1c2a44ef86f89976d",
Expand Down
10 changes: 10 additions & 0 deletions modules/nf-core/bcftools/index/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
# renovate: datasource=conda depName=bioconda/htslib
- bioconda::htslib=1.23.1
# renovate: datasource=conda depName=bioconda/bcftools
- bioconda::bcftools=1.23.1
40 changes: 40 additions & 0 deletions modules/nf-core/bcftools/index/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
process BCFTOOLS_INDEX {
tag "${meta.id}"
label 'process_low'

conda "${moduleDir}/environment.yml"
container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/0b/0b4d52ca9a56d07be3f78a12af654e5116f5112908dba277e6796fd9dfb83fe5/data'
: 'community.wave.seqera.io/library/bcftools_htslib:1.23.1--9f08ec665533d64a'}"

input:
tuple val(meta), path(vcf)

output:
tuple val(meta), path("*.csi"), emit: csi, optional: true
tuple val(meta), path("*.tbi"), emit: tbi, optional: true
tuple val("${task.process}"), val('bcftools'), eval("bcftools --version | sed '1!d; s/^.*bcftools //'"), topic: versions, emit: versions_bcftools

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

script:
def args = task.ext.args ?: ''

"""
bcftools \\
index \\
${args} \\
--threads ${task.cpus} \\
${vcf}
"""

stub:
def args = task.ext.args ?: ''
def extension = args.contains("--tbi") || args.contains("-t")
? "tbi"
: "csi"
"""
touch ${vcf}.${extension}
"""
}
82 changes: 82 additions & 0 deletions modules/nf-core/bcftools/index/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: bcftools_index
description: Index VCF tools
keywords:
- vcf
- index
- bcftools
- csi
- tbi
tools:
- bcftools:
description: BCFtools is a set of utilities that manipulate variant calls in the
Variant Call Format (VCF) and its binary counterpart BCF. All commands work
transparently with both VCFs and BCFs, both uncompressed and BGZF-compressed. Most
commands accept VCF, bgzipped VCF and BCF with filetype detected automatically
even when streaming from a pipe. Indexed VCF and BCF will work in all situations.
Un-indexed VCF and BCF and streams will work in most, but not all situations.
homepage: https://samtools.github.io/bcftools/
documentation: https://samtools.github.io/bcftools/howtos/index.html
tool_dev_url: https://github.com/samtools/bcftools
doi: "10.1093/gigascience/giab008"
licence: ["MIT", "GPL-3.0-or-later"]
identifier: biotools:bcftools
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- vcf:
type: file
description: VCF file (optionally GZIPPED)
pattern: "*.{vcf,vcf.gz}"
ontologies: []
output:
csi:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- "*.csi":
type: file
description: Default VCF file index file
pattern: "*.csi"
ontologies: []
tbi:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- "*.tbi":
type: file
description: Alternative VCF file index file for larger files (activated with
-t parameter)
pattern: "*.tbi"
ontologies: []
versions_bcftools:
- - ${task.process}:
type: string
description: The process the versions were collected from
- bcftools:
type: string
description: The tool name
- "bcftools --version | sed '1!d; s/^.*bcftools //'":
type: string
description: The command used to generate the version of the tool
topics:
versions:
- - ${task.process}:
type: string
description: The process the versions were collected from
- bcftools:
type: string
description: The tool name
- "bcftools --version | sed '1!d; s/^.*bcftools //'":
type: string
description: The command used to generate the version of the tool
authors:
- "@jfy133"
maintainers:
- "@jfy133"
Loading
Loading