{ | |||||
"{{project_name }}.bam_idx": "{{ bam_idx }}", | |||||
"{{project_name }}.region": "{{ region }}", | |||||
"{{project_name }}.disk_size": "100", | |||||
"{{project_name }}.docker": "registry-vpc.cn-shanghai.aliyuncs.com/pgx-docker-registry/samtools:v1.3.1", | |||||
"{{project_name }}.cluster_config": "OnDemand bcs.a2.large img-ubuntu-vpc", | |||||
"{{project_name }}.bam": "{{ bam }}", | |||||
"{{project_name }}.sample": "{{ sample }}" | |||||
} |
task getBam { | |||||
File bam | |||||
File bam_idx | |||||
String sample | |||||
String region | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
/opt/conda/bin/samtools view -b ${bam} "${region}" > ${region}.${sample}.bam | |||||
/opt/conda/bin/samtools index ${region}.${sample}.bam | |||||
>>> | |||||
runtime { | |||||
docker:docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File region_bam = "${region}.${sample}.bam" | |||||
File region_bai = "${region}.${sample}.bam.bai" | |||||
} | |||||
} |
import "./tasks/getBam.wdl" as getBam | |||||
workflow {{ project_name }} { | |||||
File bam | |||||
File bam_idx | |||||
String sample | |||||
String region | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
call getBam.getBam as getBam { | |||||
input: | |||||
bam=bam, | |||||
bam_idx=bam_idx, | |||||
sample=sample, | |||||
region=region, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
} |