Skip to content

Commit

Permalink
Merge pull request #160 from CenterForMedicalGeneticsGhent/dev
Browse files Browse the repository at this point in the history
Release PR v1.4.1
  • Loading branch information
nvnieuwk authored Jan 15, 2024
2 parents 384ed60 + bddaca3 commit e43f55d
Show file tree
Hide file tree
Showing 56 changed files with 777 additions and 808 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,10 @@ jobs:
if: always() # always run even if the previous step fails
with:
report_paths: "default.xml"

- name: Upload log file artifact
if: failure()
uses: actions/upload-artifact@v3
with:
name: nf-test-workdir
path: .nf-test/
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade --force-reinstall git+https://github.com/nf-core/tools.git@dev
python -m pip install nf-core
- name: Run nf-core lint
env:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ testing/
testing*
*.pyc
null
.nf-test
.nf-test*
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@
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.4.1 - Lively Leuven - [January 15 2024]

### New Features

1. Added the `--output_suffix` parameter to add a custom suffix to the basename of the output files.
2. Implemented files for the alphamissense plugin of VEP.
3. Added the `--only_pass` parameter to only output variants that have the `PASS` flag in the FILTER column. (This is only applied when `--filter` is also given)
4. Added the `--keep_alt_contigs` parameter. This will tell the pipeline to not filter out the alternate contigs, which will now be done by default.
5. Add dbsnp Ids to VCFs coming from vardict. This will be done automatically if a dbsnp VCF is given to the pipeline through the `--dbsnp` parameter.

### 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.
3. Removed the reheader step from the vardict subworkflow and added a simple sed substitution to the vardictjava module
4. `vcf2db` now uses a python 2 environment to increase it's stability

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

### New Features
Expand Down
15 changes: 15 additions & 0 deletions assets/dbsnp.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[[annotation]]
file="DBSNP_FILE"
fields=["ID"]
names=["rs_ids"]
ops=["concat"]

[[postannotation]]
name="ID"
fields=["rs_ids"]
op="setid"
type="String"

[[postannotation]]
fields=["rs_ids"]
op="delete"
2 changes: 1 addition & 1 deletion assets/multiqc_config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
report_comment: >
This report has been generated by the <a href="https://github.com/CenterForMedicalGeneticsGhent/nf-cmgg-germline/1.4.0" target="_blank">CenterForMedicalGeneticsGhent/nf-cmgg-germline</a>
This report has been generated by the <a href="https://github.com/CenterForMedicalGeneticsGhent/nf-cmgg-germline/dev" target="_blank">CenterForMedicalGeneticsGhent/nf-cmgg-germline</a>
analysis pipeline.
report_section_order:
"CenterForMedicalGeneticsGhent-nf-cmgg-germline-methods-description":
Expand Down
Binary file removed assets/vardict.header.vcf.gz
Binary file not shown.
20 changes: 0 additions & 20 deletions conf/HyperCap.config

This file was deleted.

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

params {
callers = "vardict"
scatter_count = 5
only_pass = true

output_suffix = "-vardict-decomposed-annotated"
}
65 changes: 33 additions & 32 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 @@ -107,7 +109,8 @@ process {

withName: "^.*:CRAM_PREPARE_SAMTOOLS_BEDTOOLS:FILTER_BEDS\$" {
ext.prefix = { "${meta.id}.filter"}
ext.args = "-d 150"
ext.args = "-vE \"NO_COVERAGE${params.keep_alt_contigs ? "" : "|alt|random|decoy|Un"}\""
ext.args2 = "-d 150"
publishDir = [
overwrite: true,
enabled: true,
Expand Down Expand Up @@ -251,7 +254,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 @@ -265,12 +268,12 @@ process {
if(params.filter){
withName: "^.*:CRAM_CALL_GENOTYPE_GATK4:VCF_FILTER_BCFTOOLS:FILTER_1\$" {
ext.prefix = { "${meta.id}_filtered_snps" }
ext.args = {'--output-type z --soft-filter \'GATKCutoffSNP\' -e \'TYPE="snp" && (MQRankSum < -12.5 || ReadPosRankSum < -8.0 || QD < 2.0 || FS > 60.0 || (QD < 10.0 && AD[0:1] / (AD[0:1] + AD[0:0]) < 0.25 && ReadPosRankSum < 0.0) || MQ < 30.0)\' -m \'+\''}
ext.args = {"--output-type z --soft-filter 'GATKCutoffSNP' -e 'TYPE=\"snp\" && (MQRankSum < -12.5 || ReadPosRankSum < -8.0 || QD < 2.0 || FS > 60.0 || MQ < 30.0)' -m '+'"}
}

withName: "^.*:CRAM_CALL_GENOTYPE_GATK4:VCF_FILTER_BCFTOOLS:FILTER_2\$" {
ext.prefix = {"${meta.id}.${getGenotypedCaller(meta.caller)}"}
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 \'+\''}
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 )\' -m \'+\''}
publishDir = [
enabled: enableOutput("filter"),
overwrite: true,
Expand Down Expand Up @@ -310,23 +313,30 @@ process {

withName: "^.*:CRAM_CALL_VARDICTJAVA:VCF_CONCAT_BCFTOOLS:BCFTOOLS_CONCAT\$" {
ext.args = '--allow-overlaps --output-type z'
ext.prefix = { "${meta.id}.${meta.caller}" }
publishDir = [
overwrite: true,
enabled: enableOutput("original"),
mode: params.publish_dir_mode,
path: final_output,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
] // SAVE
}

withName: "^.*:CRAM_CALL_VARDICTJAVA:BCFTOOLS_REHEADER\$" {
withName: "^.*:CRAM_CALL_VARDICTJAVA:TABIX_VCFANNO\$" {
ext.prefix = { "${meta.id}.${meta.caller}" }
publishDir = [
overwrite: true,
enabled: enableOutput("original"),
mode: params.publish_dir_mode,
path: final_output,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
] // SAVE
ext.prefix = { "${meta.id}.${meta.caller}" }
ext.args2 = '--output-type z'
}

if(params.filter) {
withName: "^.*:CRAM_CALL_VARDICTJAVA:VCF_FILTER_BCFTOOLS:FILTER_1\$" {
ext.args = '-i \'QUAL >= 0\' --output-type z'
ext.args = "-i 'QUAL >= 0${params.only_pass ? " && FILTER=\"PASS\"" : ""}' --output-type z"
}

withName: "^.*:CRAM_CALL_VARDICTJAVA:VCF_FILTER_BCFTOOLS:FILTER_2\$" {
Expand Down Expand Up @@ -370,7 +380,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 +390,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 +405,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 +426,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 @@ -458,6 +468,7 @@ process {
(params.vep_spliceregion) ? '--plugin SpliceRegion' : '',
(params.vep_mastermind) ? "--plugin Mastermind,${params.mastermind.split('/')[-1]}" : '',
(params.vep_maxentscan) ? "--plugin MaxEntScan" : '',
(params.vep_alphamissense) ? "--plugin AlphaMissense,file=${params.alphamissense.split('/')[-1]}" : '',
(params.vep_eog) ? "--custom ${params.eog.split('/')[-1]},EOG,vcf,overlap,0,AF" : '',
(params.vep_merged) ? '--merged' : '',
].join(' ').trim()}
Expand All @@ -476,7 +487,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 +499,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 +547,9 @@ process {
*/

if(params.gemini){
withName: VCF2DB{
ext.prefix = { "${meta.sample ?: meta.id}.${getGenotypedCaller(meta.caller)}" }
withName: "^.*:VCF2DB\$" {
ext.args = "--a-ok gnomAD_AC --a-ok gnomAD_Hom"
ext.prefix = final_prefix
publishDir = [
overwrite: true,
path: final_output,
Expand All @@ -547,13 +559,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 +580,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"

}
Binary file modified docs/images/nf-cmgg-germline_metro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 5 additions & 10 deletions docs/images/nf-cmgg-germline_metro.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e43f55d

Please sign in to comment.