From 2bb4586481b10378be60801094edeee12727cdb2 Mon Sep 17 00:00:00 2001
From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com>
Date: Tue, 24 Sep 2024 10:52:31 +0200
Subject: [PATCH 1/5] include filter
---
conf/modules/generate_clinical_set.config | 8 +++++++-
subworkflows/local/generate_clinical_set.nf | 15 ++++++++++++---
workflows/raredisease.nf | 9 ++++++---
3 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/conf/modules/generate_clinical_set.config b/conf/modules/generate_clinical_set.config
index de4d1b27..cb183ad1 100644
--- a/conf/modules/generate_clinical_set.config
+++ b/conf/modules/generate_clinical_set.config
@@ -50,10 +50,16 @@ process {
process {
withName: '.*:GENERATE_CLINICAL_SET_MT:ENSEMBLVEP_FILTERVEP' {
ext.when = !params.skip_vep_filter
- ext.prefix = { "${meta.id}_mt_${meta.set}" }
+ ext.prefix = { "${meta.id}_mt_filtervep_${meta.set}" }
ext.args = { "--filter \"HGNC_ID in ${feature_file}\"" }
}
+ withName: '.*:GENERATE_CLINICAL_SET_MT:BCFTOOLS_FILTER' {
+ ext.when = !params.skip_vep_filter
+ ext.prefix = { "${meta.id}_mt_${meta.set}" }
+ ext.args = { "-Oz -i 'AF>0.05'" }
+ }
+
withName: '.*:GENERATE_CLINICAL_SET_MT:TABIX_BGZIP' {
ext.when = !params.skip_vep_filter
ext.prefix = { "${meta.id}_mt_${meta.set}" }
diff --git a/subworkflows/local/generate_clinical_set.nf b/subworkflows/local/generate_clinical_set.nf
index 3e71e6b0..e4b94d8c 100644
--- a/subworkflows/local/generate_clinical_set.nf
+++ b/subworkflows/local/generate_clinical_set.nf
@@ -5,11 +5,13 @@
include { ENSEMBLVEP_FILTERVEP } from '../../modules/nf-core/ensemblvep/filtervep'
include { TABIX_BGZIP } from '../../modules/nf-core/tabix/bgzip'
include { TABIX_TABIX } from '../../modules/nf-core/tabix/tabix'
+include { BCFTOOLS_FILTER } from '../../modules/nf-core/bcftools/filter'
workflow GENERATE_CLINICAL_SET {
take:
ch_vcf // channel: [mandatory] [ val(meta), path(vcf) ]
ch_hgnc_ids // channel: [mandatory] [ val(hgnc_ids) ]
+ val_ismt // value: if mitochondria, set to true
main:
ch_versions = Channel.empty()
@@ -28,16 +30,23 @@ workflow GENERATE_CLINICAL_SET {
.output
.set { ch_filtervep_out }
- TABIX_BGZIP( ch_filtervep_out )
+ if (val_ismt) {
+ BCFTOOLS_FILTER (ch_filtervep_out)
+ ch_clinical = BCFTOOLS_FILTER.out.vcf
+ ch_versions = ch_versions.mix( BCFTOOLS_FILTER.out.versions )
+ } else {
+ TABIX_BGZIP( ch_filtervep_out )
+ ch_clinical = TABIX_BGZIP.out.output
+ ch_versions = ch_versions.mix( TABIX_BGZIP.out.versions )
+ }
ch_clin_research_vcf.research
- .mix( TABIX_BGZIP.out.output )
+ .mix( ch_clinical )
.set { ch_clin_research_split }
TABIX_TABIX( ch_clin_research_split )
ch_versions = ch_versions.mix( ENSEMBLVEP_FILTERVEP.out.versions )
- ch_versions = ch_versions.mix( TABIX_BGZIP.out.versions )
ch_versions = ch_versions.mix( TABIX_TABIX.out.versions )
emit:
diff --git a/workflows/raredisease.nf b/workflows/raredisease.nf
index c4fda9d1..309f87d2 100644
--- a/workflows/raredisease.nf
+++ b/workflows/raredisease.nf
@@ -550,7 +550,8 @@ workflow RAREDISEASE {
GENERATE_CLINICAL_SET_SNV(
ch_snv_annotate.vcf_ann,
- ch_hgnc_ids
+ ch_hgnc_ids,
+ false
)
ch_versions = ch_versions.mix(GENERATE_CLINICAL_SET_SNV.out.versions)
@@ -602,7 +603,8 @@ workflow RAREDISEASE {
GENERATE_CLINICAL_SET_MT(
ch_mt_annotate.vcf_ann,
- ch_hgnc_ids
+ ch_hgnc_ids,
+ true
)
ch_versions = ch_versions.mix(GENERATE_CLINICAL_SET_MT.out.versions)
@@ -677,7 +679,8 @@ workflow RAREDISEASE {
GENERATE_CLINICAL_SET_SV(
ch_sv_annotate.vcf_ann,
- ch_hgnc_ids
+ ch_hgnc_ids,
+ false
)
ch_versions = ch_versions.mix(GENERATE_CLINICAL_SET_SV.out.versions)
From c1ddf4c3e203a55bfb1b87d4d0239d70f77709c4 Mon Sep 17 00:00:00 2001
From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com>
Date: Tue, 24 Sep 2024 15:23:02 +0200
Subject: [PATCH 2/5] changelog
---
CHANGELOG.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b9fb7e17..b87230e4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### `Changed`
+- Report only variants above 5% heteroplasmy in the clinical vcf file for mitochondria [#616](https://github.com/nf-core/raredisease/pull/616)
+
### `Fixed`
### Parameters
From 7d5e14e536c6412069cf790fe280cb7a4ee44fb5 Mon Sep 17 00:00:00 2001
From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com>
Date: Tue, 24 Sep 2024 15:28:41 +0200
Subject: [PATCH 3/5] fix declaration error
---
workflows/raredisease.nf | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/workflows/raredisease.nf b/workflows/raredisease.nf
index 309f87d2..88b75a3a 100644
--- a/workflows/raredisease.nf
+++ b/workflows/raredisease.nf
@@ -741,7 +741,8 @@ workflow RAREDISEASE {
GENERATE_CLINICAL_SET_ME(
ANNOTATE_MOBILE_ELEMENTS.out.vcf,
- ch_hgnc_ids
+ ch_hgnc_ids,
+ false
)
ch_versions = ch_versions.mix( GENERATE_CLINICAL_SET_ME.out.versions )
From 69eb6a1ea50da6cb8555116f7307dab9f642aa67 Mon Sep 17 00:00:00 2001
From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com>
Date: Tue, 24 Sep 2024 17:54:17 +0200
Subject: [PATCH 4/5] update docs
---
docs/output.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/output.md b/docs/output.md
index 1be5e4d5..1abe46b3 100644
--- a/docs/output.md
+++ b/docs/output.md
@@ -68,7 +68,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d
- [Hmtnote](#hmtnote)
- [VEP](#vep-2)
- [Filtering and ranking](#filtering-and-ranking)
- - [Filter_vep](#filter_vep)
+ - [Filter\_vep](#filter_vep)
- [GENMOD](#genmod)
- [Mobile element analysis](#mobile-element-analysis)
- [Calling mobile elements](#calling-mobile-elements)
@@ -529,7 +529,7 @@ We recommend using vcfanno to annotate SNVs with precomputed CADD scores (files
Output files
- `rank_and_filter/`
- - `_mt_ranked_clinical.vcf.gz`: file containing clinically relevant mitochondrial SNVs.
+ - `_mt_ranked_clinical.vcf.gz`: file containing clinically relevant mitochondrial SNVs, and only contains variants less than 5%VAF by default.
- `_mt_ranked_clinical.vcf.gz.tbi`: index of the file containing clinically relevant mitochondrial SNVs.
- `_mt_ranked_research.vcf.gz`: file containing mitochondrial SNV annotations with their rank scores.
- `_mt_ranked_research.vcf.gz.tbi`: index of the file containing mitochondrial SNV annotations with their rank scores.
From 931fc00ebe09db0961358467907784518a491393 Mon Sep 17 00:00:00 2001
From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com>
Date: Tue, 24 Sep 2024 18:28:07 +0200
Subject: [PATCH 5/5] lint
---
docs/output.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/output.md b/docs/output.md
index 1abe46b3..c96f5700 100644
--- a/docs/output.md
+++ b/docs/output.md
@@ -68,7 +68,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d
- [Hmtnote](#hmtnote)
- [VEP](#vep-2)
- [Filtering and ranking](#filtering-and-ranking)
- - [Filter\_vep](#filter_vep)
+ - [Filter_vep](#filter_vep)
- [GENMOD](#genmod)
- [Mobile element analysis](#mobile-element-analysis)
- [Calling mobile elements](#calling-mobile-elements)