task mergeSentieon {
	Array[File] aln_metrics_header
	Array[File] aln_metrics_data

	Array[File] dedup_metrics_header
	Array[File] dedup_metrics_data

	Array[File] is_metrics_header
	Array[File] is_metrics_data

	Array[File] deduped_coverage_header
	Array[File] deduped_coverage_data

	String docker
	String cluster_config
	String disk_size

	command <<<
		set -o pipefail
		set -e
		cat ${sep=" " aln_metrics_header} | sed -n '1,1p' | cat - ${sep=" " aln_metrics_data} > aln_metrics.txt
		cat ${sep=" " dedup_metrics_header} | sed -n '1,1p' | cat - ${sep=" " dedup_metrics_data} > dedup_metrics.txt
		cat ${sep=" " is_metrics_header} | sed -n '1,1p' | cat - ${sep=" " is_metrics_data} > is_metrics.txt
		cat ${sep=" " deduped_coverage_header} | sed -n '1,1p' | cat - ${sep=" " deduped_coverage_data} > deduped_coverage.txt
	>>>

	runtime {
		docker:docker
		cluster:cluster_config
		systemDisk:"cloud_ssd 40"
		dataDisk:"cloud_ssd " + disk_size + " /cromwell_root/"
	}

	output {
		File aln_metrics_merge = "aln_metrics.txt"
		File dedup_metrics_merge = "dedup_metrics.txt"
		File is_metrics_merge = "is_metrics.txt"
		File deduped_coverage_merge = "deduped_coverage.txt"
	}
}