Skip to content

Commit

Permalink
Adding clairS-TO somatic variant caller
Browse files Browse the repository at this point in the history
  • Loading branch information
skchronicles committed Sep 26, 2024
1 parent 8e79479 commit efbc080
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 1 deletion.
5 changes: 5 additions & 0 deletions config/cluster/slurm.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@
"time" : "1-00:00:00",
"threads": "24"
},
"clairs_tumor_only": {
"mem": "64G",
"time" : "1-00:00:00",
"threads": "24"
},
"somatic_purple_maf": {
"threads": "4",
"mem": "32G",
Expand Down
5 changes: 5 additions & 0 deletions config/cluster/uge.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,11 @@
"partition": "",
"threads": "8"
},
"clairs_tumor_only": {
"mem": "4G",
"partition": "",
"threads": "8"
},
"inbreeding": {
"mem": "4G",
"partition": "",
Expand Down
3 changes: 2 additions & 1 deletion config/containers.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
"base": "docker://skchronicles/ccbr_wes_base:v0.1.0",
"deepvariant_gpu": "docker://google/deepvariant:1.5.0-gpu",
"deepvariant": "docker://google/deepvariant:1.5.0",
"clairs-to": "docker://hkubal/clairs-to:v0.2.0",
"glnexus": "docker://ghcr.io/dnanexus-rnd/glnexus:v1.4.1",
"open_cravat": "docker://skchronicles/ncbr_opencravat:v0.1.0",
"octopus": "docker://skchronicles/ncbr_octopus:v0.2.0",
"sigprofiler": "docker://skchronicles/ncbr_sigprofiler:v0.1.0",
"sequenza": "docker://sequenza/sequenza:3.0.0",
"vcf2maf": "docker://skchronicles/ncbr_vcf2maf:v0.1.0"
}
}
}
56 changes: 56 additions & 0 deletions workflow/rules/somatic.smk
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,62 @@ rule hmftools_sage:
"""


rule clairs_tumor_only:
"""Data-processing step to call somatic variants in tumor-only samples using
ClairS. ClairS is a deep-learning based variant caller that uses an ensembl
of two neural networks to call somatic variants. ClairS-TO is unique in that
it can call somatic variants without a matched normal. More information about
ClairS-TO can be found here: https://github.com/HKU-BAL/ClairS-TO
@Input:
Realigned, recalibrated BAM file (scatter-per-tumor-sample)
@Output:
Per sample somatic variants in VCF format
"""
input:
tumor = join(workpath, "BAM", "{name}.recal.bam"),
output:
snps = join(workpath, "clairs", "somatic", "{name}", "snv.vcf.gz"),
indels = join(workpath, "clairs", "somatic", "{name}", "indel.vcf.gz"),
tmp = join(workpath, "clairs", "somatic", "{name}", "clairs_snps_indels.vcf"),
vcf = join(workpath, "clairs", "somatic", "{name}.clairs.vcf"),
params:
rname = 'clairs_to',
tumor = '{name}',
genome = config['references']['GENOME'],
outdir = join(workpath, "clairs", "somatic", "{name}"),
threads:
int(allocated("threads", "clairs_tumor_only", cluster)),
container: config['images']['clairs-to']
envmodules: config['tools']['rlang']
shell: """
# Call somatic variants with ClairS-TO,
# run in isolated sample directory to
# collisions in file names
/opt/bin/run_clairs_to \\
--tumor_bam_fn {input.tumor} \\
--ref_fn {params.genome} \\
--threads {threads} \\
--platform ilmn \\
--output_dir {params.outdir} \\
--conda_prefix /opt/micromamba/envs/clairs-to
# Concatenate SNPs and Indels
bcftools concat \\
-a \\
-O v \\
-o {output.tmp} \\
{output.snps} \\
{output.indels}
# Filter for PASS variants
bcftools view \\
-f 'PASS' \\
-O v \\
-o {output.vcf} \\
{output.tmp}
"""


rule muse:
"""Data-processing step to call somatic mutations with MuSE. This tool is
unique in accounting for tumor heterogeneity using a sample-specific error
Expand Down

0 comments on commit efbc080

Please sign in to comment.