Skip to content

Commit 2ad4506

Browse files
authored
Change hrd facultative for cancer report (#17)
* change hrd file facultatif * fix arg position and assign default value * fix version (#18) * Bump gpgr version to 2.2.0
1 parent 92d12af commit 2ad4506

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

bolt/workflows/other/cancer_report.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
@click.option('--purple_dir', required=True, type=click.Path(exists=True))
3030
@click.option('--virusbreakend_dir', required=True, type=click.Path(exists=True))
3131

32-
@click.option('--dragen_hrd_fp', required=True, type=click.Path(exists=True))
32+
@click.option('--dragen_hrd_fp', required=False, type=click.Path(exists=True))
3333

3434
@click.option('--cancer_genes_fp', required=True, type=click.Path(exists=True))
3535
@click.option('--oncokb_genes_fp', required=True, type=click.Path(exists=True))
@@ -62,6 +62,11 @@ def entry(ctx, **kwargs):
6262
batch_name = f'{kwargs["subject_name"]}_{kwargs["tumor_name"]}'
6363
output_table_dir = output_dir / 'cancer_report_tables'
6464

65+
# Optional dragen hrd argument
66+
dragen_hrd_arg = ''
67+
if kwargs['dragen_hrd_fp']:
68+
dragen_hrd_arg = f"--dragen_hrd {kwargs['dragen_hrd_fp']}"
69+
6570
# Run gpgr canrep
6671
command = fr'''
6772
gpgr.R canrep \
@@ -88,15 +93,15 @@ def entry(ctx, **kwargs):
8893
--virusbreakend_tsv {kwargs['virusbreakend_dir']}/{kwargs['tumor_name']}.virusbreakend.vcf.summary.tsv \
8994
--virusbreakend_vcf {kwargs['virusbreakend_dir']}/{kwargs['tumor_name']}.virusbreakend.vcf \
9095
\
91-
--dragen_hrd {kwargs['dragen_hrd_fp']} \
96+
{dragen_hrd_arg} \
9297
--bcftools_stats {kwargs['smlv_somatic_bcftools_stats_fp']} \
9398
\
9499
--key_genes {kwargs['cancer_genes_fp']} \
95100
--oncokb_genes {kwargs['oncokb_genes_fp']} \
96101
\
97102
--img_dir {output_image_dir}/ \
98103
--result_outdir {output_table_dir}/ \
99-
--out_file {output_dir}/{kwargs["tumor_name"]}.cancer_report.html
104+
--out_file {output_dir}/{kwargs['tumor_name']}.cancer_report.html
100105
'''
101106
util.execute_command(command)
102107

0 commit comments

Comments
 (0)