diff --git a/CHANGELOG.md b/CHANGELOG.md
index dddb1aa8..b87230e4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,22 @@
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).
+## 2.3.0dev - Getafix [xxxx-xx-xx]
+
+### `Added`
+
+- A new analysis option `mito` to call and annotate only mitochondrial variants [#608](https://github.com/nf-core/raredisease/pull/608)
+
+### `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
+
+### Tool updates
+
## 2.2.0 - Dogmatix [2024-09-13]
### `Added`
diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml
index 964d29bf..b8bb11a1 100644
--- a/assets/multiqc_config.yml
+++ b/assets/multiqc_config.yml
@@ -3,9 +3,9 @@ custom_logo_url: https://github.com/nf-core/raredisease/
custom_logo_title: "nf-core/raredisease"
report_comment: >
- This report has been generated by the nf-core/raredisease
+ This report has been generated by the nf-core/raredisease
analysis pipeline. For information about how to interpret these results, please see the
- documentation.
+ documentation.
report_section_order:
"nf-core-raredisease-methods-description":
order: -1000
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/conf/modules/prepare_references.config b/conf/modules/prepare_references.config
index 025172fe..89a2a1eb 100644
--- a/conf/modules/prepare_references.config
+++ b/conf/modules/prepare_references.config
@@ -42,16 +42,16 @@ process {
ext.when = {!params.bwa && (params.aligner == "sentieon" || params.mt_aligner == "sentieon")}
}
- withName: '.*PREPARE_REFERENCES:BWAMEM2_INDEX_MT_SHIFT' {
- ext.when = { (params.analysis_type.equals("wgs") || params.run_mt_for_wes) && params.mt_aligner == "bwamem2"}
+ withName: '.*PREPARE_REFERENCES:BWAMEM2_INDEX_MT.*' {
+ ext.when = { (params.analysis_type.matches("wgs|mito") || params.run_mt_for_wes) && params.mt_aligner == "bwamem2"}
}
- withName: '.*PREPARE_REFERENCES:SENTIEON_BWAINDEX_MT_SHIFT' {
- ext.when = { (params.analysis_type.equals("wgs") || params.run_mt_for_wes) && params.mt_aligner == "sentieon"}
+ withName: '.*PREPARE_REFERENCES:SENTIEON_BWAINDEX_MT.*' {
+ ext.when = { (params.analysis_type.matches("wgs|mito") || params.run_mt_for_wes) && params.mt_aligner == "sentieon"}
}
- withName: '.*PREPARE_REFERENCES:BWA_INDEX_MT_SHIFT' {
- ext.when = { (params.analysis_type.equals("wgs") || params.run_mt_for_wes) && params.mt_aligner == "bwa"}
+ withName: '.*PREPARE_REFERENCES:BWA_INDEX_MT.*' {
+ ext.when = { (params.analysis_type.matches("wgs|mito") || params.run_mt_for_wes) && params.mt_aligner == "bwa"}
}
withName: '.*PREPARE_REFERENCES:SAMTOOLS_FAIDX_GENOME' {
@@ -67,8 +67,8 @@ process {
ext.when = {!params.mt_fasta}
}
- withName: '.*PREPARE_REFERENCES:SAMTOOLS_FAIDX_MT_SHIFT' {
- ext.when = { (params.analysis_type.equals("wgs") || params.run_mt_for_wes) }
+ withName: '.*PREPARE_REFERENCES:SAMTOOLS_FAIDX_MT' {
+ ext.when = { (params.analysis_type.matches("wgs|mito") || params.run_mt_for_wes) }
}
withName: '.*PREPARE_REFERENCES:GATK_SD' {
@@ -79,8 +79,8 @@ process {
ext.args = { "--interval-file-name ${meta.id}_mt" }
}
- withName: '.*PREPARE_REFERENCES:GATK_SD_MT_SHIFT' {
- ext.when = { (params.analysis_type.equals("wgs") || params.run_mt_for_wes)}
+ withName: '.*PREPARE_REFERENCES:GATK_SD_MT' {
+ ext.when = { (params.analysis_type.matches("wgs|mito") || params.run_mt_for_wes)}
}
withName: '.*PREPARE_REFERENCES:TABIX_DBSNP' {
diff --git a/docs/output.md b/docs/output.md
index d7f608b7..c96f5700 100644
--- a/docs/output.md
+++ b/docs/output.md
@@ -316,7 +316,7 @@ The pipeline performs variant calling using [Sentieon DNAscope](https://support.
Output files
- `call_sv/genome`
- - `_sv_merge.vcf.gz`: file containing the merged variant calls.
+ - `_sv_merge.vcf.gz`: file containing the merged variant calls. As of version 2.3.0, this file also contains mitochondrial structural variants.
- `_sv_merge.vcf.gz.tbi`: index of the file containing the merged variant calls.
@@ -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.
diff --git a/docs/usage.md b/docs/usage.md
index 0304c46a..c67e488b 100644
--- a/docs/usage.md
+++ b/docs/usage.md
@@ -205,7 +205,7 @@ The mandatory and optional parameters for each category are tabulated below.
1Default variant caller is DeepVariant, but you have the option to use Sentieon as well.
2These parameters are only used by Sentieon.
-3Default is WGS, but you have the option to choose WES as well.
+3Default is `WGS`, but you have the option to choose `WES` and `mito` as well.
4This parameter is only used by Deepvariant.
##### 5. Variant calling - Structural variants
diff --git a/nextflow.config b/nextflow.config
index b6a62bee..33e4c551 100644
--- a/nextflow.config
+++ b/nextflow.config
@@ -307,7 +307,7 @@ manifest {
description = """call and score variants from WGS/WES of rare disease patients"""
mainScript = 'main.nf'
nextflowVersion = '!>=23.04.0'
- version = '2.2.0'
+ version = '2.3.0dev'
doi = ''
}
diff --git a/nextflow_schema.json b/nextflow_schema.json
index 3ccdc1f6..4c4a1acf 100644
--- a/nextflow_schema.json
+++ b/nextflow_schema.json
@@ -485,9 +485,9 @@
"analysis_type": {
"type": "string",
"default": "wgs",
- "description": "Specifies which analysis type for the pipeline- either 'wgs' or 'wes'. This changes resources consumed and tools used.",
+ "description": "Specifies which analysis type for the pipeline- either 'wgs', 'wes' or 'mito'. This changes resources consumed and tools used.",
"fa_icon": "fas fa-align-center",
- "enum": ["wgs", "wes"]
+ "enum": ["wgs", "wes", "mito"]
},
"bwa_as_fallback": {
"type": "boolean",
diff --git a/subworkflows/local/align.nf b/subworkflows/local/align.nf
index b332c84c..5eeb6862 100644
--- a/subworkflows/local/align.nf
+++ b/subworkflows/local/align.nf
@@ -19,11 +19,16 @@ workflow ALIGN {
ch_genome_bwamem2index // channel: [mandatory] [ val(meta), path(index) ]
ch_genome_bwamemeindex // channel: [mandatory] [ val(meta), path(index) ]
ch_genome_dictionary // channel: [mandatory] [ val(meta), path(dict) ]
+ ch_mt_bwaindex // channel: [mandatory] [ val(meta), path(index) ]
+ ch_mt_bwamem2index // channel: [mandatory] [ val(meta), path(index) ]
+ ch_mt_dictionary // channel: [mandatory] [ val(meta), path(dict) ]
+ ch_mt_fai // channel: [mandatory] [ val(meta), path(fai) ]
+ ch_mt_fasta // channel: [mandatory] [ val(meta), path(fasta) ]
ch_mtshift_bwaindex // channel: [mandatory] [ val(meta), path(index) ]
ch_mtshift_bwamem2index // channel: [mandatory] [ val(meta), path(index) ]
- ch_mtshift_fasta // channel: [mandatory] [ val(meta), path(fasta) ]
ch_mtshift_dictionary // channel: [mandatory] [ val(meta), path(dict) ]
ch_mtshift_fai // channel: [mandatory] [ val(meta), path(fai) ]
+ ch_mtshift_fasta // channel: [mandatory] [ val(meta), path(fasta) ]
val_mbuffer_mem // integer: [mandatory] memory in megabytes
val_platform // string: [mandatory] illumina or a different technology
val_sort_threads // integer: [mandatory] number of sorting threads
@@ -83,7 +88,7 @@ workflow ALIGN {
// PREPARING READS FOR MT ALIGNMENT
- if (params.analysis_type.equals("wgs") || params.run_mt_for_wes) {
+ if (params.analysis_type.matches("wgs|mito") || params.run_mt_for_wes) {
CONVERT_MT_BAM_TO_FASTQ (
ch_genome_bam_bai,
ch_genome_fasta,
@@ -94,11 +99,11 @@ workflow ALIGN {
ALIGN_MT (
CONVERT_MT_BAM_TO_FASTQ.out.fastq,
CONVERT_MT_BAM_TO_FASTQ.out.bam,
- ch_genome_bwaindex,
- ch_genome_bwamem2index,
- ch_genome_fasta,
- ch_genome_dictionary,
- ch_genome_fai
+ ch_mt_bwaindex,
+ ch_mt_bwamem2index,
+ ch_mt_fasta,
+ ch_mt_dictionary,
+ ch_mt_fai
)
ALIGN_MT_SHIFT (
diff --git a/subworkflows/local/call_snv.nf b/subworkflows/local/call_snv.nf
index 5d0b2ce9..8060e0cc 100644
--- a/subworkflows/local/call_snv.nf
+++ b/subworkflows/local/call_snv.nf
@@ -19,9 +19,12 @@ workflow CALL_SNV {
ch_genome_fai // channel: [mandatory] [ val(meta), path(fai) ]
ch_genome_dictionary // channel: [mandatory] [ val(meta), path(dict) ]
ch_mt_intervals // channel: [optional] [ path(interval_list) ]
- ch_mtshift_fasta // channel: [optional] [ val(meta), path(fasta) ]
- ch_mtshift_fai // channel: [optional] [ val(meta), path(fai) ]
+ ch_mt_dictionary // channel: [optional] [ val(meta), path(dict) ]
+ ch_mt_fai // channel: [optional] [ val(meta), path(fai) ]
+ ch_mt_fasta // channel: [optional] [ val(meta), path(fasta) ]
ch_mtshift_dictionary // channel: [optional] [ val(meta), path(dict) ]
+ ch_mtshift_fai // channel: [optional] [ val(meta), path(fai) ]
+ ch_mtshift_fasta // channel: [optional] [ val(meta), path(fasta) ]
ch_mtshift_intervals // channel: [optional] [ path(interval_list) ]
ch_mtshift_backchain // channel: [mandatory] [ val(meta), path(back_chain) ]
ch_dbsnp // channel: [optional] [ val(meta), path(vcf) ]
@@ -46,7 +49,7 @@ workflow CALL_SNV {
ch_sentieon_gvcf = Channel.empty()
ch_sentieon_gtbi = Channel.empty()
- if (params.variant_caller.equals("deepvariant")) {
+ if (params.variant_caller.equals("deepvariant") && !params.analysis_type.equals("mito")) {
CALL_SNV_DEEPVARIANT ( // triggered only when params.variant_caller is set as deepvariant
ch_genome_bam_bai,
ch_genome_fasta,
@@ -97,12 +100,12 @@ workflow CALL_SNV {
ch_genome_tabix = GATK4_SELECTVARIANTS.out.tbi
ch_genome_vcf_tabix = ch_genome_vcf.join(ch_genome_tabix, failOnMismatch:true, failOnDuplicate:true)
- if (params.analysis_type.equals("wgs") || params.run_mt_for_wes) {
+ if (params.analysis_type.matches("wgs|mito") || params.run_mt_for_wes) {
CALL_SNV_MT(
ch_mt_bam_bai,
- ch_genome_fasta,
- ch_genome_fai,
- ch_genome_dictionary,
+ ch_mt_fasta,
+ ch_mt_fai,
+ ch_mt_dictionary,
ch_mt_intervals
)
@@ -117,9 +120,9 @@ workflow CALL_SNV {
POSTPROCESS_MT_CALLS(
CALL_SNV_MT.out.vcf,
CALL_SNV_MT_SHIFT.out.vcf,
- ch_genome_fasta,
- ch_genome_dictionary,
- ch_genome_fai,
+ ch_mt_fasta,
+ ch_mt_dictionary,
+ ch_mt_fai,
ch_mtshift_backchain,
ch_case_info,
ch_foundin_header,
diff --git a/subworkflows/local/call_structural_variants.nf b/subworkflows/local/call_structural_variants.nf
index 65f2f9ff..c7d251b9 100644
--- a/subworkflows/local/call_structural_variants.nf
+++ b/subworkflows/local/call_structural_variants.nf
@@ -32,11 +32,16 @@ workflow CALL_STRUCTURAL_VARIANTS {
main:
ch_versions = Channel.empty()
+ ch_merged_svs = Channel.empty()
+ ch_merged_tbi = Channel.empty()
- CALL_SV_MANTA (ch_genome_bam, ch_genome_bai, ch_genome_fasta, ch_genome_fai, ch_case_info, ch_target_bed)
- .diploid_sv_vcf
- .collect{it[1]}
- .set{ manta_vcf }
+ if (!params.analysis_type.equals("mito")) {
+ CALL_SV_MANTA (ch_genome_bam, ch_genome_bai, ch_genome_fasta, ch_genome_fai, ch_case_info, ch_target_bed)
+ .diploid_sv_vcf
+ .collect{it[1]}
+ .set{ manta_vcf }
+ ch_versions = ch_versions.mix(CALL_SV_MANTA.out.versions)
+ }
if (params.analysis_type.equals("wgs")) {
CALL_SV_TIDDIT (ch_genome_bam_bai, ch_genome_fasta, ch_bwa_index, ch_case_info)
@@ -61,7 +66,7 @@ workflow CALL_STRUCTURAL_VARIANTS {
ch_versions = ch_versions.mix(CALL_SV_GERMLINECNVCALLER.out.versions)
}
- if (params.analysis_type.equals("wgs") || params.run_mt_for_wes) {
+ if (params.analysis_type.matches("wgs|mito") || params.run_mt_for_wes) {
CALL_SV_MT (ch_mt_bam_bai, ch_genome_fasta)
ch_versions = ch_versions.mix(CALL_SV_MT.out.versions)
}
@@ -74,39 +79,41 @@ workflow CALL_STRUCTURAL_VARIANTS {
.combine(cnvnator_vcf)
.toList()
.set { vcf_list }
- } else {
+ } else if (!params.analysis_type.equals("mito")) {
manta_vcf
.toList()
.set { vcf_list }
}
- } else if (params.analysis_type.equals("wgs")){
+ } else if (params.analysis_type.equals("wgs")) {
tiddit_vcf
.combine(manta_vcf)
.combine(gcnvcaller_vcf)
.combine(cnvnator_vcf)
.toList()
.set { vcf_list }
- } else {
+ } else if (!params.analysis_type.equals("mito")) {
manta_vcf
.combine(gcnvcaller_vcf)
.toList()
.set { vcf_list }
}
- ch_case_info
- .combine(vcf_list)
- .set { merge_input_vcfs }
+ if (!params.analysis_type.equals("mito")) {
+ ch_case_info
+ .combine(vcf_list)
+ .set { merge_input_vcfs }
- SVDB_MERGE (merge_input_vcfs, ch_svcaller_priority)
+ SVDB_MERGE (merge_input_vcfs, ch_svcaller_priority)
- TABIX_TABIX (SVDB_MERGE.out.vcf)
-
- ch_versions = ch_versions.mix(CALL_SV_MANTA.out.versions)
- ch_versions = ch_versions.mix(TABIX_TABIX.out.versions)
- ch_versions = ch_versions.mix(SVDB_MERGE.out.versions)
+ TABIX_TABIX (SVDB_MERGE.out.vcf)
+ ch_merged_svs = SVDB_MERGE.out.vcf
+ ch_merged_tbi = TABIX_TABIX.out.tbi
+ ch_versions = ch_versions.mix(TABIX_TABIX.out.versions)
+ ch_versions = ch_versions.mix(SVDB_MERGE.out.versions)
+ }
emit:
- vcf = SVDB_MERGE.out.vcf // channel: [ val(meta), path(vcf)]
- tbi = TABIX_TABIX.out.tbi // channel: [ val(meta), path(tbi)]
- versions = ch_versions // channel: [ path(versions.yml) ]
+ vcf = ch_merged_svs // channel: [ val(meta), path(vcf)]
+ tbi = ch_merged_tbi // channel: [ val(meta), path(tbi)]
+ versions = ch_versions // channel: [ path(versions.yml) ]
}
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/subworkflows/local/prepare_references.nf b/subworkflows/local/prepare_references.nf
index 8c39c614..4af09860 100644
--- a/subworkflows/local/prepare_references.nf
+++ b/subworkflows/local/prepare_references.nf
@@ -3,22 +3,25 @@
//
include { BWA_INDEX as BWA_INDEX_GENOME } from '../../modules/nf-core/bwa/index/main'
+include { BWA_INDEX as BWA_INDEX_MT } from '../../modules/nf-core/bwa/index/main'
include { BWA_INDEX as BWA_INDEX_MT_SHIFT } from '../../modules/nf-core/bwa/index/main'
include { BWAMEM2_INDEX as BWAMEM2_INDEX_GENOME } from '../../modules/nf-core/bwamem2/index/main'
+include { BWAMEM2_INDEX as BWAMEM2_INDEX_MT } from '../../modules/nf-core/bwamem2/index/main'
include { BWAMEM2_INDEX as BWAMEM2_INDEX_MT_SHIFT } from '../../modules/nf-core/bwamem2/index/main'
include { BWAMEME_INDEX as BWAMEME_INDEX_GENOME } from '../../modules/nf-core/bwameme/index/main'
include { CAT_CAT as CAT_CAT_BAIT } from '../../modules/nf-core/cat/cat/main'
include { GATK4_BEDTOINTERVALLIST as GATK_BILT } from '../../modules/nf-core/gatk4/bedtointervallist/main'
include { GATK4_CREATESEQUENCEDICTIONARY as GATK_SD } from '../../modules/nf-core/gatk4/createsequencedictionary/main'
-include { GATK4_CREATESEQUENCEDICTIONARY as GATK_SD_MT_SHIFT } from '../../modules/nf-core/gatk4/createsequencedictionary/main'
+include { GATK4_CREATESEQUENCEDICTIONARY as GATK_SD_MT } from '../../modules/nf-core/gatk4/createsequencedictionary/main'
include { GATK4_INTERVALLISTTOOLS as GATK_ILT } from '../../modules/nf-core/gatk4/intervallisttools/main'
include { GATK4_SHIFTFASTA as GATK_SHIFTFASTA } from '../../modules/nf-core/gatk4/shiftfasta/main'
include { GET_CHROM_SIZES } from '../../modules/local/get_chrom_sizes'
include { RTGTOOLS_FORMAT } from '../../modules/nf-core/rtgtools/format/main'
include { SAMTOOLS_FAIDX as SAMTOOLS_EXTRACT_MT } from '../../modules/nf-core/samtools/faidx/main'
include { SAMTOOLS_FAIDX as SAMTOOLS_FAIDX_GENOME } from '../../modules/nf-core/samtools/faidx/main'
-include { SAMTOOLS_FAIDX as SAMTOOLS_FAIDX_MT_SHIFT } from '../../modules/nf-core/samtools/faidx/main'
+include { SAMTOOLS_FAIDX as SAMTOOLS_FAIDX_MT } from '../../modules/nf-core/samtools/faidx/main'
include { SENTIEON_BWAINDEX as SENTIEON_BWAINDEX_GENOME } from '../../modules/nf-core/sentieon/bwaindex/main'
+include { SENTIEON_BWAINDEX as SENTIEON_BWAINDEX_MT } from '../../modules/nf-core/sentieon/bwaindex/main'
include { SENTIEON_BWAINDEX as SENTIEON_BWAINDEX_MT_SHIFT } from '../../modules/nf-core/sentieon/bwaindex/main'
include { TABIX_BGZIPTABIX as TABIX_PBT } from '../../modules/nf-core/tabix/bgziptabix/main'
include { TABIX_BGZIPTABIX as TABIX_BGZIPINDEX_VCFANNOEXTRA } from '../../modules/nf-core/tabix/bgziptabix/main'
@@ -66,11 +69,16 @@ workflow PREPARE_REFERENCES {
// MT genome indices
SAMTOOLS_EXTRACT_MT(ch_genome_fasta, ch_fai)
ch_mt_fasta_in = Channel.empty().mix(ch_mt_fasta, SAMTOOLS_EXTRACT_MT.out.fa).collect()
- SAMTOOLS_FAIDX_MT_SHIFT(ch_mt_fasta_in, [[],[]])
- GATK_SD_MT_SHIFT(ch_mt_fasta_in)
- GATK_SHIFTFASTA(ch_mt_fasta_in, SAMTOOLS_FAIDX_MT_SHIFT.out.fai, GATK_SD_MT_SHIFT.out.dict)
+ SAMTOOLS_FAIDX_MT(ch_mt_fasta_in, [[],[]])
+ GATK_SD_MT(ch_mt_fasta_in)
+ GATK_SHIFTFASTA(ch_mt_fasta_in, SAMTOOLS_FAIDX_MT.out.fai, GATK_SD_MT.out.dict)
// MT alignment indices
+ BWAMEM2_INDEX_MT(ch_mt_fasta_in)
+ BWA_INDEX_MT(ch_mt_fasta_in)
+ SENTIEON_BWAINDEX_MT(ch_mt_fasta_in)
+ ch_bwa_mt = Channel.empty().mix(SENTIEON_BWAINDEX_MT.out.index, BWA_INDEX_MT.out.index).collect()
+
BWAMEM2_INDEX_MT_SHIFT(GATK_SHIFTFASTA.out.shift_fa)
BWA_INDEX_MT_SHIFT(GATK_SHIFTFASTA.out.shift_fa)
SENTIEON_BWAINDEX_MT_SHIFT(GATK_SHIFTFASTA.out.shift_fa)
@@ -140,9 +148,12 @@ workflow PREPARE_REFERENCES {
ch_versions = ch_versions.mix(GATK_SD.out.versions)
ch_versions = ch_versions.mix(GET_CHROM_SIZES.out.versions)
ch_versions = ch_versions.mix(SAMTOOLS_EXTRACT_MT.out.versions)
- ch_versions = ch_versions.mix(SAMTOOLS_FAIDX_MT_SHIFT.out.versions)
- ch_versions = ch_versions.mix(GATK_SD_MT_SHIFT.out.versions)
+ ch_versions = ch_versions.mix(SAMTOOLS_FAIDX_MT.out.versions)
+ ch_versions = ch_versions.mix(GATK_SD_MT.out.versions)
ch_versions = ch_versions.mix(GATK_SHIFTFASTA.out.versions)
+ ch_versions = ch_versions.mix(BWAMEM2_INDEX_MT.out.versions)
+ ch_versions = ch_versions.mix(BWA_INDEX_MT.out.versions)
+ ch_versions = ch_versions.mix(SENTIEON_BWAINDEX_MT.out.versions)
ch_versions = ch_versions.mix(BWAMEM2_INDEX_MT_SHIFT.out.versions)
ch_versions = ch_versions.mix(BWA_INDEX_MT_SHIFT.out.versions)
ch_versions = ch_versions.mix(SENTIEON_BWAINDEX_MT_SHIFT.out.versions)
@@ -167,11 +178,16 @@ workflow PREPARE_REFERENCES {
genome_dict = ch_dict // channel: [ val(meta), path(dict) ]
sdf = RTGTOOLS_FORMAT.out.sdf // channel: [ val (meta), path(intervals) ]
mt_intervals = ch_shiftfasta_mtintervals.intervals.collect() // channel: [ path(intervals) ]
+ mt_bwa_index = ch_bwa_mt // channel: [ val(meta), path(index) ]
+ mt_bwamem2_index = BWAMEM2_INDEX_MT.out.index.collect() // channel: [ val(meta), path(index) ]
+ mt_dict = GATK_SD_MT.out.dict.collect() // channel: [ val(meta), path(dict) ]
+ mt_fasta = ch_mt_fasta_in.collect() // channel: [ val(meta), path(fasta) ]
+ mt_fai = SAMTOOLS_FAIDX_MT.out.fai.collect() // channel: [ val(meta), path(fai) ]
mtshift_intervals = ch_shiftfasta_mtintervals.shift_intervals.collect() // channel: [ path(intervals) ]
mtshift_backchain = GATK_SHIFTFASTA.out.shift_back_chain.collect() // channel: [ val(meta), path(backchain) ]
+ mtshift_dict = GATK_SHIFTFASTA.out.dict // channel: [ val(meta), path(dict) ]
mtshift_fai = GATK_SHIFTFASTA.out.shift_fai.collect() // channel: [ val(meta), path(fai) ]
- mtshift_fasta = GATK_SHIFTFASTA.out.shift_fa.collect() // channel: [ val(meta), path(fai) ]
- mtshift_dict = GATK_SHIFTFASTA.out.dict.collect() // channel: [ path(dict) ]
+ mtshift_fasta = GATK_SHIFTFASTA.out.shift_fa.collect() // channel: [ val(meta), path(fasta) ]
mtshift_bwa_index = ch_bwa_mtshift // channel: [ val(meta), path(index) ]
mtshift_bwamem2_index = BWAMEM2_INDEX_MT_SHIFT.out.index.collect() // channel: [ val(meta), path(index) ]
diff --git a/workflows/raredisease.nf b/workflows/raredisease.nf
index 80e51572..88b75a3a 100644
--- a/workflows/raredisease.nf
+++ b/workflows/raredisease.nf
@@ -271,6 +271,11 @@ workflow RAREDISEASE {
ch_ml_model = params.variant_caller.equals("sentieon") ? Channel.fromPath(params.ml_model).map {it -> [[id:it[0].simpleName], it]}.collect()
: Channel.value([[:],[]])
ch_mt_intervals = ch_references.mt_intervals
+ ch_mt_bwaindex = ch_references.mt_bwa_index
+ ch_mt_bwamem2index = ch_references.mt_bwamem2_index
+ ch_mt_dictionary = ch_references.mt_dict
+ ch_mt_fai = ch_references.mt_fai
+ ch_mt_fasta = ch_references.mt_fasta
ch_mtshift_backchain = ch_references.mtshift_backchain
ch_mtshift_bwaindex = ch_references.mtshift_bwa_index
ch_mtshift_bwamem2index = ch_references.mtshift_bwamem2_index
@@ -412,11 +417,16 @@ workflow RAREDISEASE {
ch_genome_bwamem2index,
ch_genome_bwamemeindex,
ch_genome_dictionary,
+ ch_mt_bwaindex,
+ ch_mt_bwamem2index,
+ ch_mt_dictionary,
+ ch_mt_fai,
+ ch_mt_fasta,
ch_mtshift_bwaindex,
ch_mtshift_bwamem2index,
- ch_mtshift_fasta,
ch_mtshift_dictionary,
ch_mtshift_fai,
+ ch_mtshift_fasta,
params.mbuffer_mem,
params.platform,
params.samtools_sort_threads
@@ -493,9 +503,12 @@ workflow RAREDISEASE {
ch_genome_fai,
ch_genome_dictionary,
ch_mt_intervals,
- ch_mtshift_fasta,
- ch_mtshift_fai,
+ ch_mt_dictionary,
+ ch_mt_fai,
+ ch_mt_fasta,
ch_mtshift_dictionary,
+ ch_mtshift_fai,
+ ch_mtshift_fasta,
ch_mtshift_intervals,
ch_mtshift_backchain,
ch_dbsnp,
@@ -537,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)
@@ -568,7 +582,7 @@ workflow RAREDISEASE {
//
// ANNOTATE MT SNVs
//
- if (!params.skip_mt_annotation && (params.run_mt_for_wes || params.analysis_type.equals("wgs"))) {
+ if (!params.skip_mt_annotation && (params.run_mt_for_wes || params.analysis_type.matches("wgs|mito"))) {
ANNOTATE_MT_SNVS (
CALL_SNV.out.mt_vcf,
@@ -589,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)
@@ -664,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)
@@ -725,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 )