#!/bin/bash -Ceuo pipefail
if [ -n "chr5" ]; then
tabix -h positive_somatic_control_2.snv_indel.merged.vcf.gz chr5 > input_filtered.vcf
bgzip input_filtered.vcf
input_vcf="input_filtered.vcf.gz"
else
input_vcf="positive_somatic_control_2.snv_indel.merged.vcf.gz"
fi
whatshap \
phase \
\
--reference Homo_sapiens_assembly38.fasta \
-o positive_somatic_control_2.snv_indel.whatshap.chr5.phased.vcf.gz \
$input_vcf \
Sig_18_tissue.recalibrated.bam
cat <<-END_VERSIONS > versions.yml
"DAQ:CONTROL_VARIANT_CALLING:CONTROL_SOMATIC_VC:VCF_SOMATIC_SNV_INDEL:WHATSHAP":
whatshap: $(whatshap --version)
END_VERSIONS