Skip to content

Commit ebca284

Browse files
committedNov 13, 2024·
Adding clairS-to regions option
1 parent 1be576d commit ebca284

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed
 

‎workflow/rules/somatic.smk

+14-6
Original file line numberDiff line numberDiff line change
@@ -624,11 +624,15 @@ rule gatk_filter_mutect2:
624624

625625

626626
rule hmftools_sage:
627-
"""Data-processing step to call somatic variants in TO and TN
628-
samples using hmftools sage. HMF Tools is a suite of tools the
629-
Hartwig Medical Foundation developed to analyze genomic data. Amber
630-
and cobalt must be run prior to running purple. For more information
631-
about hmftools visit: https://github.com/hartwigmedical/hmftools
627+
"""Data-processing step to call somatic variants in TO and TN samples
628+
using hmftools sage. HMF Tools is a suite of tools the Hartwig Medical
629+
Foundation developed to analyze genomic data. Sage can be run with WES
630+
data using the same set of options for WGS. At the current moment, sage
631+
does not have an option to restrict variant calling to specific regions.
632+
It does have an -high_depth_mode option; however, the authors state it
633+
should only be used for small targeted panels. For more information
634+
about hmftools visit github:
635+
https://github.com/hartwigmedical/hmftools
632636
@Input:
633637
Sorted BAM file (scatter-per-tumor-sample)
634638
@Output:
@@ -699,6 +703,7 @@ rule clairs_tumor_only:
699703
"""
700704
input:
701705
tumor = join(workpath, "BAM", "{name}.recal.bam"),
706+
bed = provided(join(workpath, "references", "wes_regions_50bp_padded.bed"), run_wes),
702707
output:
703708
snps = join(workpath, "clairs", "somatic", "{name}", "snv.vcf.gz"),
704709
indels = join(workpath, "clairs", "somatic", "{name}", "indel.vcf.gz"),
@@ -709,6 +714,9 @@ rule clairs_tumor_only:
709714
tumor = '{name}',
710715
genome = config['references']['GENOME'],
711716
outdir = join(workpath, "clairs", "somatic", "{name}"),
717+
wes_region_option = lambda _: "--bed_fn {0}".format(
718+
join(workpath, "references", "wes_regions_50bp_padded.bed"),
719+
) if run_wes else '',
712720
threads:
713721
# ClairS-TO over utilizes threads,
714722
# testing has shown it over utilizes
@@ -724,7 +732,7 @@ rule clairs_tumor_only:
724732
--tumor_bam_fn {input.tumor} \\
725733
--ref_fn {params.genome} \\
726734
--threads {threads} \\
727-
--platform ilmn \\
735+
--platform ilmn {params.wes_region_option} \\
728736
--output_dir {params.outdir} \\
729737
--conda_prefix /opt/micromamba/envs/clairs-to
730738

0 commit comments

Comments
 (0)
Please sign in to comment.