task sentieon {
	File aln_metrics
	File dedup_metrics
	File is_metrics
	File deduped_coverage
	String sample_name
	String docker
	String cluster_config
	String disk_size

	command <<<
		set -o pipefail
		set -e
		cat ${aln_metrics} | sed -n '2,2p'  > aln_metrics.header
		cat ${aln_metrics} | sed -n '5,5p'  > ${sample_name}.aln_metrics
		cat ${dedup_metrics} | sed -n '2,2p' > dedup_metrics.header
		cat ${dedup_metrics} | sed -n '3,3p' > ${sample_name}.dedup_metrics
		cat ${is_metrics} | sed -n '2,2p' > is_metrics.header
		cat ${is_metrics} | sed -n '3,3p' > ${sample_name}.is_metrics
		cat ${deduped_coverage} | sed -n '1,1p' > deduped_coverage.header
		cat ${deduped_coverage} | sed -n '2,2p' > ${sample_name}.deduped_coverage
	>>>

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

	output {
		File aln_metrics_header = "aln_metrics.header"
		File aln_metrics_data = "${sample_name}.aln_metrics"
		File dedup_metrics_header = "dedup_metrics.header"
		File dedup_metrics_data = "${sample_name}.dedup_metrics"
		File is_metrics_header = "is_metrics.header"
		File is_metrics_data = "${sample_name}.is_metrics"
		File deduped_coverage_header = "deduped_coverage.header"
		File deduped_coverage_data = "${sample_name}.deduped_coverage"
	}
}