Skip to content

Commit

Permalink
Finish hooking up the pipeline and fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeltrame committed Oct 29, 2024
1 parent 25b55df commit fc426df
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
27 changes: 27 additions & 0 deletions subworkflows/local/bam_variant_calling_somatic_all/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ include { BAM_VARIANT_CALLING_SOMATIC_MUTECT2 } from '../bam_variant_c
include { BAM_VARIANT_CALLING_SOMATIC_STRELKA } from '../bam_variant_calling_somatic_strelka/main'
include { BAM_VARIANT_CALLING_SOMATIC_TIDDIT } from '../bam_variant_calling_somatic_tiddit/main'
include { MSISENSORPRO_MSISOMATIC } from '../../../modules/nf-core/msisensorpro/msisomatic/main'
include { PURECN_INTERVALFILE } from '../../../modules/nf-core/purecn/intervalfile/main'
include { PURECN_INTERVALFILE } from '../../../../nf-core-modules/modules/nf-core/purecn/intervalfile/main.nf'
include { BAM_VARIANT_CALLING_SOMATIC_PURECN } from '../bam_variant_calling_somatic_purecn/main.nf'

workflow BAM_VARIANT_CALLING_SOMATIC_ALL {
take:
Expand Down Expand Up @@ -42,6 +45,8 @@ workflow BAM_VARIANT_CALLING_SOMATIC_ALL {
rt_file // channel: [optional] ascat rt file
joint_mutect2 // boolean: [mandatory] [default: false] run mutect2 in joint mode
wes // boolean: [mandatory] [default: false] whether targeted data is processed
purecn_gatk_pon // channel: [optional] PoN made from GATK4 for PureCN
purecn_normaldb // channel: [optional] NormalDB generated by PureCN

main:
versions = Channel.empty()
Expand Down Expand Up @@ -223,6 +228,28 @@ workflow BAM_VARIANT_CALLING_SOMATIC_ALL {
versions = versions.mix(BAM_VARIANT_CALLING_SOMATIC_TIDDIT.out.versions)
}

//PURECN
if (tools.split(',').contains('purecn')) {
ch_bed = [["id": "intervals_bed"], intervals]
ch_fasta = [["id": "fasta"], fasta]
PURECN_INTERVALFILE(ch_bed, ch_fasta)
versions = versions.mix(PURECN_INTERVALFILE.out.versions)

BAM_VARIANT_CALLING_SOMATIC_PURECN(cram.map{
// Remap channel to match module/subworkflow
meta, normal_cram, normal_crai, tumor_cram, tumor_crai -> [meta, tumor_cram, tumor_crai]},
fasta,
fasta_fai,
dict,
file(purecn_normaldb),
file(purecn_gatk_pon),
PURECN_INTERVALFILE.out.txt,
PURECN_INTERVALFILE.out.bed
)
versions = versions.mix(BAM_VARIANT_CALLING_SOMATIC_PURECN.out.versions)
}


vcf_all = Channel.empty().mix(
vcf_freebayes,
vcf_manta,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ workflow BAM_VARIANT_CALLING_SOMATIC_PURECN {
meta, denoised -> [meta, denoised, intervals_purecn]
}

//FIXME: PURECN_RUN upstream should require a VCF file here
PURECN_RUN(ch_purecn_in, normaldb)
ch_versions = ch_versions.mix(PURECN_RUN.out.versions)

Expand Down

0 comments on commit fc426df

Please sign in to comment.