Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
85823ae
fix sigrap.R path
qclayssen Jul 2, 2025
7577061
fix chord output and version script call
qclayssen Jul 2, 2025
76e12a1
change to a sigrap subworkflow
qclayssen Jul 2, 2025
43a9ee0
fix hrdetect output file
qclayssen Jul 2, 2025
8f0ee76
smlv somatic subworkflow
qclayssen Jul 2, 2025
8ded6ae
add chord container
qclayssen Jul 2, 2025
5da0555
add back missing channel
qclayssen Jul 3, 2025
6293cd4
add back sigrap process
qclayssen Jul 3, 2025
a3f4b4e
fix channels names
qclayssen Jul 3, 2025
8340e60
fix channel
qclayssen Jul 3, 2025
4335ad0
test fix sigrap process
qclayssen Jul 4, 2025
edecc03
remove subworkflow
qclayssen Jul 4, 2025
f288d1f
update input workflow to include chord prediction from OA
qclayssen Jul 7, 2025
c6a9a76
refactor: restore publishDir for SIGRAP processes and update chord fi…
qclayssen Jul 7, 2025
d4eba39
fix and test chord
qclayssen Jul 7, 2025
31b917d
test fix channel
qclayssen Jul 7, 2025
0ee6ed0
remove debug commands
qclayssen Jul 7, 2025
08b5205
fix output MUTPAT
qclayssen Jul 17, 2025
3d8da0f
Chord result from OA
qclayssen Jul 21, 2025
958988e
fix chord output and version script call
qclayssen Jul 2, 2025
b1ad52a
change to a sigrap subworkflow
qclayssen Jul 2, 2025
618545f
smlv somatic subworkflow
qclayssen Jul 2, 2025
b792933
add chord container
qclayssen Jul 2, 2025
811473f
add back missing channel
qclayssen Jul 3, 2025
d289a07
add back sigrap process
qclayssen Jul 3, 2025
c606a81
fix channels names
qclayssen Jul 3, 2025
3b281af
fix channel
qclayssen Jul 3, 2025
215a9f4
test fix sigrap process
qclayssen Jul 4, 2025
709c935
remove subworkflow
qclayssen Jul 4, 2025
d55d120
update input workflow to include chord prediction from OA
qclayssen Jul 7, 2025
29dce69
refactor: restore publishDir for SIGRAP processes and update chord fi…
qclayssen Jul 7, 2025
1468de1
fix and test chord
qclayssen Jul 7, 2025
fdbfe00
test fix channel
qclayssen Jul 7, 2025
60c4233
remove debug commands
qclayssen Jul 7, 2025
1d82571
fix output MUTPAT
qclayssen Jul 17, 2025
c233595
Chord result from OA
qclayssen Jul 21, 2025
433756c
add mutpat option rainfall and strand-bia plots
qclayssen Aug 20, 2025
896097c
change sigrap meta and config match standar
qclayssen Aug 25, 2025
94e54ea
linting
qclayssen Aug 25, 2025
22ba7c6
linting
qclayssen Aug 25, 2025
e14d068
remove subworkflow
qclayssen Aug 26, 2025
aab3f51
remove deprecated output dir from stub
qclayssen Aug 27, 2025
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
26 changes: 25 additions & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,31 @@ process {
publishDir = [
path: { "${params.outdir}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : "${meta.key}/${filename}" },
saveAs: { filename -> filename.equals('versions.yml') ? null : "${meta.key}/${filename}" }
]
}


withName: 'SIGRAP_HRDETECT' {
publishDir = [
path: { "${params.outdir}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : "${meta.key}/sigrap/hrdetect/${filename}" }
]
}

withName: 'SIGRAP_MUTPAT' {
publishDir = [
path: { "${params.outdir}" },
mode: params.publish_dir_mode,
saveAs: { filename ->
if (filename.equals('versions.yml')) {
return null
} else {
println "SIGRAP_MUTPAT - meta.key: '${meta.key}', filename: '${filename}'"
return "${meta.key}/sigrap/${filename}"
}
}
]
}

Expand Down
6 changes: 5 additions & 1 deletion modules/local/bolt/other/cancer_report/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process BOLT_OTHER_CANCER_REPORT {
container 'ghcr.io/umccr/bolt:0.2.14-gpgr'

input:
tuple val(meta), path(smlv_somatic_vcf), path(smlv_somatic_bcftools_stats), path(smlv_somatic_counts_process), path(sv_somatic_tsv), path(sv_somatic_vcf), path(cnv_somatic_tsv), path(af_global), path(af_keygenes), path(purple_baf_plot), path(purple_dir), path(virusbreakend_dir), path(dragen_hrd)
tuple val(meta), path(smlv_somatic_vcf), path(smlv_somatic_bcftools_stats), path(smlv_somatic_counts_process), path(sv_somatic_tsv), path(sv_somatic_vcf), path(cnv_somatic_tsv), path(af_global), path(af_keygenes), path(purple_baf_plot), path(purple_dir), path(virusbreakend_dir), path(dragen_hrd), path(smlv_somatic_mutpat), path(smlv_somatic_hrdetect), path(smlv_somatic_chord)
path somatic_driver_panel
path oncokb_genes

Expand Down Expand Up @@ -33,6 +33,10 @@ process BOLT_OTHER_CANCER_REPORT {
--smlv_somatic_bcftools_stats_fp \$(pwd)/${smlv_somatic_bcftools_stats} \\
--smlv_somatic_counts_process_fp \$(pwd)/${smlv_somatic_counts_process} \\
\\
--mutpat_dir \$(pwd)/${smlv_somatic_mutpat} \\
--hrdetect_file \$(pwd)/${smlv_somatic_hrdetect} \\
--chord_file \$(pwd)/${smlv_somatic_chord} \\
\\
--sv_somatic_tsv_fp \$(pwd)/${sv_somatic_tsv} \\
--sv_somatic_vcf_fp \$(pwd)/${sv_somatic_vcf} \\
--cnv_somatic_tsv_fp \$(pwd)/${cnv_somatic_tsv} \\
Expand Down
37 changes: 37 additions & 0 deletions modules/local/sigrap/chord/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
process SIGRAP_CHORD {
tag "${meta.id}"
label 'process_low'

container 'ghcr.io/umccr/sigrap:0.2.0'

input:
tuple val(meta), path(chord_prediction_tsv)

output:
tuple val(meta), path('chord.json.gz') , emit: chord_json
path 'versions.yml' , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''

"""
sigrap.R chord \\
--sample ${meta.subject_id} \\
--chord ${chord_prediction_tsv} \\
--out chord.json.gz

cat <<-END_VERSIONS > versions.yml
"${task.process}":
sigrap: \$(sigrap.R --version | sed 's/^.*version //')
END_VERSIONS
"""

stub:
"""
touch chord.json.gz
echo -e '${task.process}:\\n stub: noversions\\n' > versions.yml
"""
}
39 changes: 39 additions & 0 deletions modules/local/sigrap/hrdetect/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
process SIGRAP_HRDETECT {
tag "${meta.id}"
label 'process_low'

container 'ghcr.io/umccr/sigrap:0.2.0'

input:
tuple val(meta), path(smlv_somatic_vcf), path(sv_somatic_vcf), path(cnv_somatic_tsv)

output:
tuple val(meta), path('hrdetect.json.gz') , emit: hrdetect_json
path 'versions.yml' , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''

"""
sigrap.R hrdetect \\
--sample ${meta.subject_id} \\
--snv ${smlv_somatic_vcf} \\
--sv ${sv_somatic_vcf} \\
--cnv ${cnv_somatic_tsv} \\
--out hrdetect.json.gz

cat <<-END_VERSIONS > versions.yml
"${task.process}":
sigrap: \$(sigrap.R --version | sed 's/^.*version //')
END_VERSIONS
"""

stub:
"""
touch hrdetect.json.gz
echo -e '${task.process}:\\n stub: noversions\\n' > versions.yml
"""
}
40 changes: 40 additions & 0 deletions modules/local/sigrap/mutpat/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
process SIGRAP_MUTPAT {
tag "${meta.id}"
label 'process_low'

container 'ghcr.io/umccr/sigrap:0.2.0'

input:
tuple val(meta), path(smlv_somatic_vcf)

output:
tuple val(meta), path('mutpat/') , emit: mutpat_output
path 'versions.yml' , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''

"""
sigrap.R mutpat \\
--sample ${meta.subject_id} \\
--snv ${smlv_somatic_vcf} \\
--rainfall \\
--strand-bias \\
--out mutpat/

cat <<-END_VERSIONS > versions.yml
"${task.process}":
sigrap: \$(sigrap.R --version | sed 's/^.*version //')
END_VERSIONS
"""

stub:
"""
mkdir -p sigrap/mutpat/
touch sigrap/mutpat/stub_output
echo -e '${task.process}:\\n stub: noversions\\n' > versions.yml
"""
}
8 changes: 8 additions & 0 deletions subworkflows/local/prepare_input.nf
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ workflow PREPARE_INPUT {
return [meta, "${base}/virusbreakend/"]
}

// CHORD: homologous recombination deficiency prediction
// channel: [ meta, chord_prediction_tsv ]
ch_chord = ch_metas.map { meta ->
def base = file(meta.oncoanalyser_dir).toUriString()
return [meta, "${base}/chord/${meta.tumor_id}.chord.prediction.tsv"]
}

// HRD: homologous recombination deficiency scores
// channel: [ meta, hrdscore_csv ]
ch_input_hrd = ch_metas.map { meta ->
Expand Down Expand Up @@ -120,6 +127,7 @@ workflow PREPARE_INPUT {
cobalt = ch_cobalt // channel: [ meta, cobalt_dir ]
sage_somatic = ch_sage_somatic // channel: [ meta, sage_somatic_vcf, sage_somatic_tbi ]
virusbreakend = ch_virusbreakend // channel: [ meta, virusbreakend_dir ]
chord = ch_chord // channel: [ meta, chord_prediction_tsv ]
call_inputs = ch_call_inputs // channel: [ meta_esvee, esvee_ref_depth_vcf, esvee_prep_dir ]

// DRAGEN channels
Expand Down
69 changes: 63 additions & 6 deletions workflows/sash.nf
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ include { BOLT_SMLV_GERMLINE_PREPARE } from '../modules/local/bolt/smlv_germline
include { BOLT_SMLV_GERMLINE_REPORT } from '../modules/local/bolt/smlv_germline/report/main'
include { BOLT_SMLV_SOMATIC_ANNOTATE } from '../modules/local/bolt/smlv_somatic/annotate/main'
include { BOLT_SMLV_SOMATIC_FILTER } from '../modules/local/bolt/smlv_somatic/filter/main'
include { BOLT_SMLV_SOMATIC_REPORT } from '../modules/local/bolt/smlv_somatic/report/main'
include { BOLT_SMLV_SOMATIC_RESCUE } from '../modules/local/bolt/smlv_somatic/rescue/main'
include { BOLT_SMLV_SOMATIC_REPORT } from '../modules/local/bolt/smlv_somatic/report/main'
include { BOLT_SV_SOMATIC_ANNOTATE } from '../modules/local/bolt/sv_somatic/annotate/main'
include { BOLT_SV_SOMATIC_PRIORITISE } from '../modules/local/bolt/sv_somatic/prioritise/main'
include { ESVEE_CALL } from '../modules/local/esvee/call/main'
include { PAVE_SOMATIC } from '../modules/local/pave/somatic/main'
include { SIGRAP_HRDETECT } from '../modules/local/sigrap/hrdetect/main'
include { SIGRAP_MUTPAT } from '../modules/local/sigrap/mutpat/main'

include { ESVEE_CALL } from '../modules/local/esvee/call/main'
include { LINX_ANNOTATION } from '../subworkflows/local/linx_annotation'
include { LINX_PLOTTING } from '../subworkflows/local/linx_plotting'
include { PREPARE_INPUT } from '../subworkflows/local/prepare_input'
Expand Down Expand Up @@ -93,6 +95,7 @@ workflow SASH {
ch_sage_somatic = PREPARE_INPUT.out.sage_somatic // channel: [ meta, sage_somatic_vcf, sage_somatic_tbi ]
ch_virusbreakend = PREPARE_INPUT.out.virusbreakend // channel: [ meta, virusbreakend_dir ]
ch_call_inputs = PREPARE_INPUT.out.call_inputs // channel: [ meta_esvee, esvee_ref_depth_vcf, esvee_prep_dir ]
ch_chord = PREPARE_INPUT.out.chord // channel: [ meta, chord_prediction_tsv ]

// DRAGEN inputs
ch_input_hrd = PREPARE_INPUT.out.hrd // channel: [ meta, hrdscore_csv ]
Expand Down Expand Up @@ -120,8 +123,7 @@ workflow SASH {
// Somatic small variants
//



// Prepare rescue inputs with meta transformation
// channel: [ meta_bolt, dragen_somatic_vcf, dragen_somatic_tbi, sage_somatic_vcf, sage_somatic_tbi ]
ch_smlv_somatic_rescue_inputs = WorkflowSash.groupByMeta(
ch_input_vcf_somatic,
Expand Down Expand Up @@ -152,6 +154,7 @@ workflow SASH {
umccr_data.annotations_dir,
misc_data.pon_dir,
misc_data.pcgr_dir,
misc_data.vep_dir
)

ch_versions = ch_versions.mix(BOLT_SMLV_SOMATIC_ANNOTATE.out.versions)
Expand All @@ -162,6 +165,7 @@ workflow SASH {

ch_versions = ch_versions.mix(BOLT_SMLV_SOMATIC_FILTER.out.versions)

// Restore meta and create clean outputs
// channel: [ meta, smlv_somatic_vcf ]
ch_smlv_somatic_out = WorkflowSash.restoreMeta(BOLT_SMLV_SOMATIC_FILTER.out.vcf, ch_inputs)
.map { meta, vcf, tbi -> [meta, vcf] }
Expand All @@ -180,6 +184,8 @@ workflow SASH {
umccr_data.ensembl_data_resources,
)

ch_versions = ch_versions.mix(PAVE_SOMATIC.out.versions)

// channel: [ meta, pave_somatic_vcf ]
ch_pave_somatic_out = WorkflowSash.restoreMeta(PAVE_SOMATIC.out.vcf, ch_inputs)

Expand Down Expand Up @@ -218,7 +224,6 @@ workflow SASH {

//
// Somatic structural variants

//

ESVEE_CALL(
Expand Down Expand Up @@ -429,11 +434,60 @@ workflow SASH {



//
// Sigrap
//

// channel: [ meta_sigrap, smlv_somatic_vcf, sv_somatic_vcf, cnv_somatic_tsv ]
ch_sigrap_hrdetect_inputs = WorkflowSash.groupByMeta(
ch_smlv_somatic_out,
ch_sv_somatic_sv_vcf_out,
ch_sv_somatic_cnv_tsv_out,
)
.map { meta, smlv_vcf, sv_vcf, cnv_tsv ->
def meta_sigrap = [
key: meta.id,
id: meta.id,
tumor_id: meta.tumor_id,
]
return [meta_sigrap, smlv_vcf, sv_vcf, cnv_tsv]
}

SIGRAP_HRDETECT(
ch_sigrap_hrdetect_inputs
)

// channel: [ meta, hrdetect_json ]
ch_sigrap_hrdetect = SIGRAP_HRDETECT.out.hrdetect_json
ch_versions = ch_versions.mix(SIGRAP_HRDETECT.out.versions)

// channel: [ meta_sigrap, smlv_somatic_vcf ]
ch_sigrap_mutpat_inputs = ch_smlv_somatic_out.map { meta, vcf ->
def meta_sigrap = [
key: meta.id,
id: meta.id,
tumor_id: meta.tumor_id,
]
return [meta_sigrap, vcf]
}

SIGRAP_MUTPAT(
ch_sigrap_mutpat_inputs
)

// channel: [ meta, mutpat_output ]
ch_sigrap_mutpat = SIGRAP_MUTPAT.out.mutpat_output
ch_versions = ch_versions.mix(SIGRAP_MUTPAT.out.versions)





//
// Generate the cancer report
//

// channel: [ meta_bolt, smlv_somatic_vcf, smlv_somatic_bcftools_stats, smlv_somatic_counts_process, sv_tsv, sv_vcf, cnv_tsv, af_global, af_keygenes, purple_baf_circos_plot, purple_dir, virusbreakend_dir, dragen_hrd ]
// channel: [ meta_bolt, smlv_somatic_vcf, smlv_somatic_bcftools_stats, smlv_somatic_counts_process, sv_tsv, sv_vcf, cnv_tsv, af_global, af_keygenes, purple_baf_circos_plot, purple_dir, virusbreakend_dir, dragen_hrd, mutpat, hrdetect, chord ]
ch_cancer_report_inputs = WorkflowSash.groupByMeta(
ch_smlv_somatic_out,
ch_smlv_somatic_report_stats_out,
Expand All @@ -447,6 +501,9 @@ workflow SASH {
PURPLE_CALLING.out.purple_dir,
ch_virusbreakend,
ch_input_hrd,
ch_sigrap_mutpat,
ch_sigrap_hrdetect,
ch_chord
)
.map {
def meta = it[0]
Expand Down