task JI {
	File vcf_a
	File vcf_b
	File dir_name
	File sdf
	String name_a = basename(vcf_a,".vcf")
	String name_b = basename(vcf_b,".vcf")
	String docker
	String cluster_config
	String disk_size
	
	command <<<
		set -o pipefail
		set -e

		/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg bgzip ${vcf_a} -c > ${name_a}.rtg.vcf.gz
		/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg index -f vcf ${name_a}.rtg.vcf.gz
		/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg bgzip ${vcf_a} -c > ${name_b}.rtg.vcf.gz
		/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg index -f vcf ${name_b}.rtg.vcf.gz		
		/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg vcfeval -b ${name_a}.rtg.vcf.gz -c ${name_b}.rtg.vcf.gz -o ${dir_name} -t ${sdf}

	>>>

	runtime {
		docker:docker
		cluster: cluster_config
		systemDisk: "cloud_ssd 40"
		dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
	}
	output {
		File JI_summary = "${dir_name}/summary.txt"
	}
}