Skip to content

Commit efbc080

Browse files
committed
Adding clairS-TO somatic variant caller
1 parent 8e79479 commit efbc080

File tree

4 files changed

+68
-1
lines changed

4 files changed

+68
-1
lines changed

config/cluster/slurm.json

+5
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,11 @@
290290
"time" : "1-00:00:00",
291291
"threads": "24"
292292
},
293+
"clairs_tumor_only": {
294+
"mem": "64G",
295+
"time" : "1-00:00:00",
296+
"threads": "24"
297+
},
293298
"somatic_purple_maf": {
294299
"threads": "4",
295300
"mem": "32G",

config/cluster/uge.json

+5
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@
281281
"partition": "",
282282
"threads": "8"
283283
},
284+
"clairs_tumor_only": {
285+
"mem": "4G",
286+
"partition": "",
287+
"threads": "8"
288+
},
284289
"inbreeding": {
285290
"mem": "4G",
286291
"partition": "",

config/containers.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010
"base": "docker://skchronicles/ccbr_wes_base:v0.1.0",
1111
"deepvariant_gpu": "docker://google/deepvariant:1.5.0-gpu",
1212
"deepvariant": "docker://google/deepvariant:1.5.0",
13+
"clairs-to": "docker://hkubal/clairs-to:v0.2.0",
1314
"glnexus": "docker://ghcr.io/dnanexus-rnd/glnexus:v1.4.1",
1415
"open_cravat": "docker://skchronicles/ncbr_opencravat:v0.1.0",
1516
"octopus": "docker://skchronicles/ncbr_octopus:v0.2.0",
1617
"sigprofiler": "docker://skchronicles/ncbr_sigprofiler:v0.1.0",
1718
"sequenza": "docker://sequenza/sequenza:3.0.0",
1819
"vcf2maf": "docker://skchronicles/ncbr_vcf2maf:v0.1.0"
1920
}
20-
}
21+
}

workflow/rules/somatic.smk

+56
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,62 @@ rule hmftools_sage:
690690
"""
691691

692692

693+
rule clairs_tumor_only:
694+
"""Data-processing step to call somatic variants in tumor-only samples using
695+
ClairS. ClairS is a deep-learning based variant caller that uses an ensembl
696+
of two neural networks to call somatic variants. ClairS-TO is unique in that
697+
it can call somatic variants without a matched normal. More information about
698+
ClairS-TO can be found here: https://github.com/HKU-BAL/ClairS-TO
699+
@Input:
700+
Realigned, recalibrated BAM file (scatter-per-tumor-sample)
701+
@Output:
702+
Per sample somatic variants in VCF format
703+
"""
704+
input:
705+
tumor = join(workpath, "BAM", "{name}.recal.bam"),
706+
output:
707+
snps = join(workpath, "clairs", "somatic", "{name}", "snv.vcf.gz"),
708+
indels = join(workpath, "clairs", "somatic", "{name}", "indel.vcf.gz"),
709+
tmp = join(workpath, "clairs", "somatic", "{name}", "clairs_snps_indels.vcf"),
710+
vcf = join(workpath, "clairs", "somatic", "{name}.clairs.vcf"),
711+
params:
712+
rname = 'clairs_to',
713+
tumor = '{name}',
714+
genome = config['references']['GENOME'],
715+
outdir = join(workpath, "clairs", "somatic", "{name}"),
716+
threads:
717+
int(allocated("threads", "clairs_tumor_only", cluster)),
718+
container: config['images']['clairs-to']
719+
envmodules: config['tools']['rlang']
720+
shell: """
721+
# Call somatic variants with ClairS-TO,
722+
# run in isolated sample directory to
723+
# collisions in file names
724+
/opt/bin/run_clairs_to \\
725+
--tumor_bam_fn {input.tumor} \\
726+
--ref_fn {params.genome} \\
727+
--threads {threads} \\
728+
--platform ilmn \\
729+
--output_dir {params.outdir} \\
730+
--conda_prefix /opt/micromamba/envs/clairs-to
731+
732+
# Concatenate SNPs and Indels
733+
bcftools concat \\
734+
-a \\
735+
-O v \\
736+
-o {output.tmp} \\
737+
{output.snps} \\
738+
{output.indels}
739+
740+
# Filter for PASS variants
741+
bcftools view \\
742+
-f 'PASS' \\
743+
-O v \\
744+
-o {output.vcf} \\
745+
{output.tmp}
746+
"""
747+
748+
693749
rule muse:
694750
"""Data-processing step to call somatic mutations with MuSE. This tool is
695751
unique in accounting for tumor heterogeneity using a sample-specific error

0 commit comments

Comments
 (0)