Skip to content

Commit

Permalink
Merge pull request #156 from CenterForMedicalGeneticsGhent/update-pro…
Browse files Browse the repository at this point in the history
…files

update profiles seqplorer, hypercap and seqcap
  • Loading branch information
nvnieuwk authored Dec 11, 2023
2 parents 8105456 + 2d29367 commit 32b4fe0
Show file tree
Hide file tree
Showing 14 changed files with 75 additions and 77 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.5.0dev [date]
## v1.4.1dev [date]

### New Features

1. Added the `--output_suffix` option to add a custom suffix to the basename of the output files.

### Improvements

1. Updated the seqplorer profile so that the output filenames are correct for easy import
2. Changed the separator in `--vcfanno_resources` to `;`
instead of `,` to allow commas in glob patterns.

## v1.4.0 - Kingly Kortrijk - [December 6 2023]

### New Features
Expand Down
20 changes: 0 additions & 20 deletions conf/HyperCap.config

This file was deleted.

12 changes: 12 additions & 0 deletions conf/hypercap.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
========================================================================================
Nextflow config file for HyperCap runs
========================================================================================
*/

params {
callers = "vardict"
scatter_count = 5

output_suffix = "-vardict-decomposed-annotated"
}
41 changes: 16 additions & 25 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def individual_validation = { "${params.outdir}/${meta.sample}/validation/${getG

def callers = params.callers.tokenize(",")

def final_prefix = params.output_suffix ? { "${meta.id}${params.output_suffix}" } : { "${meta.id}.${getGenotypedCaller(meta.caller)}" }

process {

publishDir = [
Expand Down Expand Up @@ -76,7 +78,7 @@ process {
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
] // SAVE
ext.prefix = { "${meta.id}.${getGenotypedCaller(meta.caller)}" }
ext.prefix = final_prefix
}

/*
Expand Down Expand Up @@ -251,7 +253,7 @@ process {
}

withName: "^.*:GVCF_JOINT_GENOTYPE_GATK4:VCF_CONCAT_BCFTOOLS:BCFTOOLS_CONCAT\$" {
ext.prefix = {"${meta.id}.${getGenotypedCaller(meta.caller)}"}
ext.prefix = final_prefix
ext.args = "--allow-overlaps --output-type z"
publishDir = [
enabled: enableOutput("original"),
Expand All @@ -269,7 +271,7 @@ process {
}

withName: "^.*:CRAM_CALL_GENOTYPE_GATK4:VCF_FILTER_BCFTOOLS:FILTER_2\$" {
ext.prefix = {"${meta.id}.${getGenotypedCaller(meta.caller)}"}
ext.prefix = final_prefix
ext.args = {'--output-type z --soft-filter \'GATKCutoffIndel\' -e \'TYPE="indel" && (ReadPosRankSum < -20.0 || QD < 2.0 || FS > 200.0 || SOR > 10.0 || (QD < 10.0 && AD[0:1] / (AD[0:1] + AD[0:0]) < 0.25 && ReadPosRankSum < 0.0))\' -m \'+\''}
publishDir = [
enabled: enableOutput("filter"),
Expand Down Expand Up @@ -370,7 +372,7 @@ process {
enabled: enableOutput("normalize"),
mode: params.publish_dir_mode,
path: final_output,
saveAs: { filename -> filename.endsWith('.vcf.gz') ? "${meta.id}.${getGenotypedCaller(meta.caller)}.vcf.gz" : null }
saveAs: { filename -> filename.endsWith('.vcf.gz') ? filename.replaceAll(".normalized.vcf.gz\$", ".vcf.gz") : null }
] // SAVE
}

Expand All @@ -380,7 +382,7 @@ process {
enabled: enableOutput("normalize"),
mode: params.publish_dir_mode,
path: final_output,
saveAs: { filename -> filename.endsWith('.vcf.gz.tbi') ? "${meta.id}.${getGenotypedCaller(meta.caller)}.vcf.gz.tbi" : null }
saveAs: { filename -> filename.endsWith('.vcf.gz.tbi') ? filename.replaceAll(".normalized.vcf.gz.tbi\$", ".vcF.gz.tbi") : null }
] // SAVE
}
}
Expand All @@ -395,7 +397,7 @@ process {

withName: "^.*:VCF_EXTRACT_RELATE_SOMALIER:SOMALIER_RELATE\$" {
ext.args = { ped ? "" : "--infer"}
ext.prefix = { "${meta.sample ?: meta.id}.${getGenotypedCaller(meta.caller)}" }
ext.prefix = final_prefix
publishDir = [
overwrite: true,
enabled: true,
Expand All @@ -416,14 +418,14 @@ process {
}

withName: "^.*:VCF_PED_RTGTOOLS:BCFTOOLS_ANNOTATE\$" {
ext.prefix = { "${meta.sample ?: meta.id}.${getGenotypedCaller(meta.caller)}.pedheader" }
ext.prefix = final_prefix
ext.args = "--output-type z"
publishDir = [
enabled: enableOutput("add_ped"),
overwrite: true,
path: final_output,
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename.replace(".pedheader", "") }
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
] // SAVE
}
}
Expand Down Expand Up @@ -476,7 +478,7 @@ process {
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
] // SAVE
ext.prefix = { "${meta.id}.${getGenotypedCaller(meta.caller)}" }
ext.prefix = final_prefix
}

if (params.vcfanno){
Expand All @@ -488,7 +490,7 @@ process {
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
] // SAVE
ext.prefix = { "${meta.id}.${getGenotypedCaller(meta.caller)}" }
ext.prefix = final_prefix
}
}

Expand Down Expand Up @@ -536,8 +538,8 @@ process {
*/

if(params.gemini){
withName: VCF2DB{
ext.prefix = { "${meta.sample ?: meta.id}.${getGenotypedCaller(meta.caller)}" }
withName: "^.*:VCF2DB\$" {
ext.prefix = final_prefix
publishDir = [
overwrite: true,
path: final_output,
Expand All @@ -547,13 +549,13 @@ process {
}
}

withName: TABIX_FINAL {
withName: "^.*:TABIX_FINAL\$" {
publishDir = [
enabled: true,
overwrite: true,
path: final_output,
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : "${meta.id}.${getGenotypedCaller(meta.caller)}.vcf.gz.tbi" }
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
] // SAVE
}
}
Expand All @@ -568,17 +570,6 @@ process {
cache = false
}

withName: MULTIQC {
publishDir = [
overwrite: true,
path: { "${params.outdir}/multiqc_reports" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
] // SAVE => Fix the location problem
errorStrategy = {task.exitStatus == 143 ? 'retry' : 'ignore'}
ext.args = { params.multiqc_config ? "--config $multiqc_custom_config" : "" }
}

withName: 'MULTIQC' {
ext.args = params.multiqc_title ? "--title \"$params.multiqc_title\"" : ''
publishDir = [
Expand Down
File renamed without changes.
13 changes: 6 additions & 7 deletions conf/seqplorer.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
*/

params {
filter = true
decompose = true
normalize = true
filter = true
normalize = true
gemini = true

vcfanno = true
annotate = true
vep_dbnsfp = true
vep_merged = true
vep_spliceai = true
vep_mastermind = true
vep_eog = true
vep_maxentscan = true
vep_spliceregion = true


gemini = true

output_suffix = "-gatk4-haplotype-joint-decomposed-annotated"
}
2 changes: 1 addition & 1 deletion conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ params {
// VCFanno
vcfanno = true
vcfanno_config = "${projectDir}/assets/vcfanno.toml"
vcfanno_resources = "https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz,https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz.tbi"
vcfanno_resources = "https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz;https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz.tbi"

}
3 changes: 2 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ params.mastermind = WorkflowMain.getGenomeAttribute(params, 'mastermin
params.mastermind_tbi = WorkflowMain.getGenomeAttribute(params, 'mastermind_tbi')
params.eog = WorkflowMain.getGenomeAttribute(params, 'eog')
params.eog_tbi = WorkflowMain.getGenomeAttribute(params, 'eog_tbi')

params.vcfanno_resources = WorkflowMain.getGenomeAttribute(params, 'vcfanno_resources')
params.vcfanno_config = WorkflowMain.getGenomeAttribute(params, 'vcfanno_config')

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
9 changes: 4 additions & 5 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ params {
callers = "haplotypecaller"
vardict_min_af = 0.1 // Minimum allele frequency for VarDict
normalize = false
output_suffix = ""

// Module specific parameters
dragstr = false
Expand All @@ -51,9 +52,7 @@ params {

// VCFanno parameters
vcfanno = false
vcfanno_config = null
vcfanno_lua = null
vcfanno_resources = null

// References
genome = "GRCh38"
Expand Down Expand Up @@ -231,8 +230,8 @@ profiles {
WES { includeConfig 'conf/WES.config' }
WGS { includeConfig 'conf/WGS.config' }
seqplorer { includeConfig 'conf/seqplorer.config' }
SeqCap { includeConfig 'conf/SeqCap.config' }
HyperCap { includeConfig 'conf/HyperCap.config' }
seqcap { includeConfig 'conf/seqcap.config' }
hypercap { includeConfig 'conf/hypercap.config' }

}

Expand Down Expand Up @@ -296,7 +295,7 @@ manifest {
description = 'A nextflow pipeline for calling and annotating variants'
mainScript = 'main.nf'
nextflowVersion = '!>=23.04.0'
version = '1.5.0dev'
version = '1.4.1dev'
doi = ''
}

Expand Down
6 changes: 5 additions & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@
"normalize": {
"type": "boolean",
"description": "Normalize the VCF after joint genotyping (will run on the decomposed VCF when --decompose is also used)"
},
"output_suffix": {
"type": "string",
"description": "A custom suffix to add to the basename of the output files"
}
},
"required": ["scatter_count"]
Expand Down Expand Up @@ -610,7 +614,7 @@
},
"vcfanno_resources": {
"type": "string",
"description": "A comma-seperated list of resource files for VCFanno, please also supply their indices using this parameter"
"description": "A semicolon-seperated list of resource files for VCFanno, please also supply their indices using this parameter"
}
},
"help_text": "Annotation will only run when `--annotate true` is specified."
Expand Down
2 changes: 1 addition & 1 deletion tests/full_gvcf.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ nextflow_pipeline {

vcfanno = true
vcfanno_config = "https://github.com/nf-core/test-datasets/raw/modules/data/genomics/homo_sapiens/genome/vcf/vcfanno/vcfanno.toml"
vcfanno_resources = "https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz,https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz.tbi"
vcfanno_resources = "https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz;https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz.tbi"

}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/full_wes.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ nextflow_pipeline {

vcfanno = true
vcfanno_config = "https://github.com/nf-core/test-datasets/raw/modules/data/genomics/homo_sapiens/genome/vcf/vcfanno/vcfanno.toml"
vcfanno_resources = "https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz,https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz.tbi"
vcfanno_resources = "https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz;https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz.tbi"

}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/full_wgs.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ nextflow_pipeline {

vcfanno = true
vcfanno_config = "https://github.com/nf-core/test-datasets/raw/modules/data/genomics/homo_sapiens/genome/vcf/vcfanno/vcfanno.toml"
vcfanno_resources = "https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz,https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz.tbi"
vcfanno_resources = "https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz;https://github.com/brentp/vcfanno/raw/master/example/exac.vcf.gz.tbi"

}
}
Expand Down
Loading

0 comments on commit 32b4fe0

Please sign in to comment.