task mergeJI {
	Array[File] JI_summary
	File inputJIpiarsFile
	String docker
	String cluster_config
	String disk_size
	
	command <<<
		touch number
		for i in ${sep=" " JI_summary}
		do
			cat $i | sed -n '4,4p' | sed 's/\s\+/\t/g'| cut -f4-6 >> number
		done
		paste ${inputJIpiarsFile} number > result.txt
	>>>

	runtime {
		docker:docker
		cluster: cluster_config
		systemDisk: "cloud_ssd 40"
		dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
	}
	output {
		File JI_all = "result.txt"
	}
}