Skip to content
Draft
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Update saltshaker modules to version 1.1.1 so they can run on empty mitosalt output [#856](https://github.com/nf-core/raredisease/pull/856)
- Update metromap to reflect the addition of mitosalt + saltshaker and removal of eklipse [#892](https://github.com/nf-core/raredisease/pull/892)
- Changed default glnexus config from `DeepVariant_unfiltered` to a custom config in `assets/` due to unfixed [bug](https://github.com/dnanexus-rnd/GLnexus/issues/286) [issue #960](https://github.com/nf-core/raredisease/issues/960) [PR #961](https://github.com/nf-core/raredisease/pull/961)
- Change input file for mitosalt from genome-wide fastq to mitochondrial fastq [PR #967](https://github.com/nf-core/raredisease/pull/967)

### `Fixed`

Expand Down
4 changes: 4 additions & 0 deletions conf/modules/call_sv_MT.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ process {
ext.prefix = { "${meta.id}_mitochondria_deletions" }
}

withName: '.*CALL_SV_MT:SEQTK_SAMPLE' {
ext.prefix = { "${meta.id}.sampled" }
}

withName: '.*CALL_SV_MT:SALTSHAKER_CALL' {
ext.args = '--blacklist'
}
Expand Down
6 changes: 3 additions & 3 deletions modules/local/prep_mitosalt/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ process PREP_MITOSALT {
echo "flank = ${flank}" >> mitosalt_config.txt
echo "split_distance_threshold = ${split_distance_threshold}" >> mitosalt_config.txt
echo "dna = yes" >> mitosalt_config.txt
echo "enriched = no" >> mitosalt_config.txt
echo "nu_mt = yes" >> mitosalt_config.txt
echo "enriched = yes" >> mitosalt_config.txt
echo "nu_mt = no" >> mitosalt_config.txt
echo "rmtmp = no" >> mitosalt_config.txt
echo "o_mt = yes" >> mitosalt_config.txt
echo "i_del = yes" >> mitosalt_config.txt
echo "cn_mt = yes" >> mitosalt_config.txt
echo "cn_mt = no" >> mitosalt_config.txt
"""

stub:
Expand Down
6 changes: 4 additions & 2 deletions subworkflows/local/align_mitochondria/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ workflow ALIGN_MITOCHONDRIA {
ch_genome_fai,
ch_genome_fasta
)
ch_mt_fastq = CONVERT_MT_BAM_TO_FASTQ.out.fastq

ALIGN_MT (
ch_mt_bwaindex,
ch_mt_bwamem2index,
ch_mt_dictionary,
ch_mt_fai,
ch_mt_fasta,
CONVERT_MT_BAM_TO_FASTQ.out.fastq,
ch_mt_fastq,
CONVERT_MT_BAM_TO_FASTQ.out.ubam,
val_mt_aligner
)
Expand All @@ -49,7 +50,7 @@ workflow ALIGN_MITOCHONDRIA {
ch_mtshift_dictionary,
ch_mtshift_fai,
ch_mtshift_fasta,
CONVERT_MT_BAM_TO_FASTQ.out.fastq,
ch_mt_fastq,
CONVERT_MT_BAM_TO_FASTQ.out.ubam,
val_mt_aligner
)
Expand All @@ -61,6 +62,7 @@ workflow ALIGN_MITOCHONDRIA {
.join(ALIGN_MT_SHIFT.out.marked_bai, failOnMismatch:true, failOnDuplicate:true) // Only for SNV calling

emit:
mt_fastq = ch_mt_fastq // channel: [ val(meta), [ path(fastq) ] ]
mt_bam_bai = ch_mt_bam_bai // channel: [ val(meta), path(bam), path(bai) ]
mt_bam_bai_gatksubwf = ch_mt_bam_bai_gatksubwf // channel: [ val(meta), path(bam), path(bai) ]
mtshift_bam_bai_gatksubwf = ch_mtshift_bam_bai_gatksubwf // channel: [ val(meta), path(bam), path(bai) ]
Expand Down
23 changes: 2 additions & 21 deletions subworkflows/local/call_sv_MT/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ workflow CALL_SV_MT {
ch_mt_fai // channel: [mandatory] [ val(meta), path(mtfai) ]
ch_mt_fasta // channel: [mandatory] [ val(meta), path(mtfasta) ]
ch_mt_lastdb // channel: [mandatory] [ val(meta), path(lastindex) ]
ch_reads // channel: [mandatory] [ val(meta), [path(reads)] ]
ch_mt_fastq // channel: [mandatory] [ val(meta), [path(fastq)] ]
ch_subdepth // channel: [mandatory] [ val(mitosalt_depth) ]
ch_svcaller_priority // channel: [mandatory] [ val(["var caller tag 1", ...]) ]
ch_mitosalt_config // channel: [mandatory] [val(mitosalt_breakspan),val(mitosalt_breakthreshold),...,val(mitosalt_split_length)]
Expand All @@ -45,27 +45,8 @@ workflow CALL_SV_MT {
ch_saltshaker_plot = channel.empty()

if (!skip_mitosalt) {
ch_cat_fastq = ch_reads
.map { meta, reads ->
def sample_group_key = meta.sample
return [sample_group_key, meta, reads]
}
.groupTuple()
.map { sample_id, meta_list, reads_list ->
def combined_meta = meta_list[0].clone()
combined_meta.id = sample_id
combined_meta.remove('lane')
combined_meta.remove('read_group')

def all_reads = reads_list.flatten()

[combined_meta, all_reads]
}

CAT_FASTQ(ch_cat_fastq)

ch_reads_subdepth = CAT_FASTQ.out.reads.combine(ch_subdepth)

ch_reads_subdepth = ch_mt_fastq.combine(ch_subdepth)
SEQTK_SAMPLE(ch_reads_subdepth)

PREP_MITOSALT(
Expand Down
Loading
Loading