@@ -690,6 +690,62 @@ rule hmftools_sage:
690
690
"""
691
691
692
692
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
+
693
749
rule muse :
694
750
"""Data-processing step to call somatic mutations with MuSE. This tool is
695
751
unique in accounting for tumor heterogeneity using a sample-specific error
0 commit comments