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