 task merge_family {
	File LCL5_vcf_gz
	File LCL5_vcf_idx
	File LCL6_vcf_gz
	File LCL6_vcf_idx
	File LCL7_vcf_gz
	File LCL7_vcf_idx
	File LCL8_vcf_gz
	File LCL8_vcf_idx
	String project
	String rep
	String docker
	String cluster_config
	String disk_size
	
	command <<<

		/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg vcfmerge --force-merge-all -o ${project}_${rep}.family.vcf.gz ${LCL5_vcf_gz} ${LCL6_vcf_gz} ${LCL7_vcf_gz} ${LCL8_vcf_gz}

		gunzip ${project}_${rep}.family.vcf.gz

	>>>

	runtime {
		docker:docker
		cluster: cluster_config
		systemDisk: "cloud_ssd 40"
		dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
	}
	output {
		File merged_vcf = "${project}_${rep}.family.vcf"
	}
}


