Skip to content

Commit

Permalink
Adding clairS-to regions option
Browse files Browse the repository at this point in the history
  • Loading branch information
skchronicles committed Nov 13, 2024
1 parent 1be576d commit ebca284
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions workflow/rules/somatic.smk
Original file line number Diff line number Diff line change
Expand Up @@ -624,11 +624,15 @@ rule gatk_filter_mutect2:


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

0 comments on commit ebca284

Please sign in to comment.