task DownSample { String sample_id File fastq Float? p Int? n String docker String cluster_config String disk_size command <<< set -o pipefail set -e nt=$(nproc) if [ ${p} ]; then seqkit sample --two-pass --threads $nt -s 100 -p ${p} ${fastq} -o ${sample_id}.fastq.gz else seqkit sample --two-pass --threads $nt -s 100 -n ${n} ${fastq} -o ${sample_id}.fastq.gz fi >>> runtime { docker: docker cluster: cluster_config systemDisk: "cloud_ssd 40" dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" } output { File out_fastq = "${sample_id}.fastq.gz" } }