{ | |||||
"{{ project_name }}.satellite": "oss://pgx-result/renluyao/manuscript_v3.0/difficult_region/Satellite.3.bed", | |||||
"{{ project_name }}.mhc": "oss://pgx-result/renluyao/manuscript_v3.0/difficult_region/mhc.hg38.bed", | |||||
"{{ project_name }}.disk_size": "100", | |||||
"{{ project_name }}.vcf_idx": "{{ vcf_idx }}", | |||||
"{{ project_name }}.SINE": "oss://pgx-result/renluyao/manuscript_v3.0/difficult_region/SINE.3.bed", | |||||
"{{ project_name }}.docker": "registry-vpc.cn-shanghai.aliyuncs.com/pgx-docker-registry/rtg-tools:latest", | |||||
"{{ project_name }}.sample_name": "{{ sample_name }}", | |||||
"{{ project_name }}.del_breakpoint": "oss://pgx-result/renluyao/manuscript_v3.0/difficult_region/Tier1.del.breakpoint", | |||||
"{{ project_name }}.ins_breakpoint": "oss://pgx-result/renluyao/manuscript_v3.0/difficult_region/Tier1.ins.breakpoint", | |||||
"{{ project_name }}.LINE": "oss://pgx-result/renluyao/manuscript_v3.0/difficult_region/LINE.3.bed", | |||||
"{{ project_name }}.cluster_config": "OnDemand bcs.a2.large img-ubuntu-vpc", | |||||
"{{ project_name }}.LTR": "oss://pgx-result/renluyao/manuscript_v3.0/difficult_region/LTR.3.bed", | |||||
"{{ project_name }}.simple_repeat": "oss://pgx-result/renluyao/manuscript_v3.0/difficult_region/simple_repeat.3.bed", | |||||
"{{ project_name }}.vcf": "{{ vcf }}", | |||||
"{{ project_name }}.confidence_bed": "oss://pgx-result/renluyao/manuscript_v3.0/reference_dataset_v202011/Quartet.callable.voted.collapse.bed", | |||||
"{{ project_name }}.low_complexity": "oss://pgx-result/renluyao/manuscript_v3.0/difficult_region/Low_complexity.3.bed", | |||||
"{{ project_name }}.SD": "oss://pgx-result/renluyao/manuscript_v3.0/difficult_region/hg38_SD_merge.chr1-22X.bed" | |||||
} |
task in_out { | |||||
File vcf | |||||
File vcf_idx | |||||
File confidence_bed | |||||
String sample_name | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
rtg vcffilter -i ${vcf} -o ${sample_name}.insideBed.vcf.gz --include-bed=${confidence_bed} | |||||
rtg vcffilter -i ${vcf} -o ${sample_name}.outsideBed.vcf.gz --exclude-bed=${confidence_bed} | |||||
>>> | |||||
runtime { | |||||
docker:docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File in_vcf = "${sample_name}.insideBed.vcf.gz" | |||||
File in_vcf_idx = "${sample_name}.insideBed.vcf.gz.tbi" | |||||
File out_vcf = "${sample_name}.outsideBed.vcf.gz" | |||||
File out_vcf_idx = "${sample_name}.outsideBed.vcf.gz.tbi" | |||||
} | |||||
} |
task region { | |||||
File sub_vcf | |||||
File sub_vcf_idx | |||||
File satellite | |||||
File simple_repeat | |||||
File SINE | |||||
File LINE | |||||
File LTR | |||||
File low_complexity | |||||
File SD | |||||
File ins_breakpoint | |||||
File del_breakpoint | |||||
File mhc | |||||
String sample_name | |||||
String tag | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
rtg vcffilter -i ${sub_vcf} -o ${sample_name}.${tag}.satellite.vcf.gz --include-bed=${satellite} | |||||
rtg vcffilter -i ${sub_vcf} -o ${sample_name}.${tag}.simple_repeat.vcf.gz --include-bed=${simple_repeat} | |||||
rtg vcffilter -i ${sub_vcf} -o ${sample_name}.${tag}.SINE.vcf.gz --include-bed=${SINE} | |||||
rtg vcffilter -i ${sub_vcf} -o ${sample_name}.${tag}.LINE.vcf.gz --include-bed=${LINE} | |||||
rtg vcffilter -i ${sub_vcf} -o ${sample_name}.${tag}.LTR.vcf.gz --include-bed=${LTR} | |||||
rtg vcffilter -i ${sub_vcf} -o ${sample_name}.${tag}.low_complexity.vcf.gz --include-bed=${low_complexity} | |||||
rtg vcffilter -i ${sub_vcf} -o ${sample_name}.${tag}.SD.vcf.gz --include-bed=${SD} | |||||
rtg vcffilter -i ${sub_vcf} -o ${sample_name}.${tag}.ins_breakpoint.vcf.gz --include-bed=${ins_breakpoint} | |||||
rtg vcffilter -i ${sub_vcf} -o ${sample_name}.${tag}.del_breakpoint.vcf.gz --include-bed=${del_breakpoint} | |||||
rtg vcffilter -i ${sub_vcf} -o ${sample_name}.${tag}.mhc.vcf.gz --include-bed=${mhc} | |||||
rtg vcfstat ${sample_name}.${tag}.satellite.vcf.gz > ${sample_name}.${tag}.satellite.vcfstat.txt | |||||
rtg vcfstat ${sample_name}.${tag}.simple_repeat.vcf.gz > ${sample_name}.${tag}.simple_repeat.vcfstat.txt | |||||
rtg vcfstat ${sample_name}.${tag}.SINE.vcf.gz > ${sample_name}.${tag}.SINE.vcfstat.txt | |||||
rtg vcfstat ${sample_name}.${tag}.LINE.vcf.gz > ${sample_name}.${tag}.LINE.vcfstat.txt | |||||
rtg vcfstat ${sample_name}.${tag}.LTR.vcf.gz > ${sample_name}.${tag}.LTR.vcfstat.txt | |||||
rtg vcfstat ${sample_name}.${tag}.low_complexity.vcf.gz > ${sample_name}.${tag}.low_complexity.vcfstat.txt | |||||
rtg vcfstat ${sample_name}.${tag}.SD.vcf.gz > ${sample_name}.${tag}.SD.vcfstat.txt | |||||
rtg vcfstat ${sample_name}.${tag}.ins_breakpoint.vcf.gz > ${sample_name}.${tag}.ins_breakpoint.vcfstat.txt | |||||
rtg vcfstat ${sample_name}.${tag}.del_breakpoint.vcf.gz > ${sample_name}.${tag}.del_breakpoint.vcfstat.txt | |||||
rtg vcfstat ${sample_name}.${tag}.mhc.vcf.gz > ${sample_name}.${tag}.mhc.vcfstat.txt | |||||
>>> | |||||
runtime { | |||||
docker:docker | |||||
cluster: cluster_config | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File satellite_vcf = "${sample_name}.${tag}.satellite.vcf.gz" | |||||
File simple_repeat_vcf = "${sample_name}.${tag}.simple_repeat.vcf.gz" | |||||
File SINE_vcf = "${sample_name}.${tag}.SINE.vcf.gz" | |||||
File LINE_vcf = "${sample_name}.${tag}.LINE.vcf.gz" | |||||
File LTR_vcf = "${sample_name}.${tag}.LTR.vcf.gz" | |||||
File low_complexity_vcf = "${sample_name}.${tag}.low_complexity.vcf.gz" | |||||
File SD_vcf = "${sample_name}.${tag}.SD.vcf.gz" | |||||
File ins_breakpoint_vcf = "${sample_name}.${tag}.ins_breakpoint.vcf.gz" | |||||
File del_breakpoint_vcf = "${sample_name}.${tag}.del_breakpoint.vcf.gz" | |||||
File mhc_vcf = "${sample_name}.${tag}.mhc.vcf.gz" | |||||
File satellite_stat = "${sample_name}.${tag}.satellite.vcfstat.txt" | |||||
File simple_repeat_stat = "${sample_name}.${tag}.simple_repeat.vcfstat.txt" | |||||
File SINE_stat = "${sample_name}.${tag}.SINE.vcfstat.txt" | |||||
File LINE_stat = "${sample_name}.${tag}.LINE.vcfstat.txt" | |||||
File LTR_stat = "${sample_name}.${tag}.LTR.vcfstat.txt" | |||||
File low_complexity_stat = "${sample_name}.${tag}.low_complexity.vcfstat.txt" | |||||
File SD_stat = "${sample_name}.${tag}.SD.vcfstat.txt" | |||||
File ins_breakpoint_stat = "${sample_name}.${tag}.ins_breakpoint.vcfstat.txt" | |||||
File del_breakpoint_stat = "${sample_name}.${tag}.del_breakpoint.vcfstat.txt" | |||||
File mhc_stat = "${sample_name}.${tag}.mhc.vcfstat.txt" | |||||
} | |||||
} |
import "./tasks/in_out.wdl" as in_out | |||||
import "./tasks/region.wdl" as region | |||||
workflow {{ project_name }} { | |||||
File vcf | |||||
File vcf_idx | |||||
File confidence_bed | |||||
File satellite | |||||
File simple_repeat | |||||
File SINE | |||||
File LINE | |||||
File LTR | |||||
File low_complexity | |||||
File SD | |||||
File ins_breakpoint | |||||
File del_breakpoint | |||||
File mhc | |||||
String sample_name | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
call in_out.in_out as in_out { | |||||
input: | |||||
vcf=vcf, | |||||
vcf_idx=vcf_idx, | |||||
confidence_bed=confidence_bed, | |||||
sample_name=sample_name, | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call region.region as region { | |||||
input: | |||||
sub_vcf=in_out.in_vcf, | |||||
sub_vcf_idx=in_out.in_vcf_idx, | |||||
satellite=satellite, | |||||
simple_repeat=simple_repeat, | |||||
SINE=SINE, | |||||
LINE=LINE, | |||||
LTR=LTR, | |||||
low_complexity=low_complexity, | |||||
SD=SD, | |||||
ins_breakpoint=ins_breakpoint, | |||||
del_breakpoint=del_breakpoint, | |||||
mhc=mhc, | |||||
sample_name=sample_name, | |||||
tag="inside", | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
call region.region as region { | |||||
input: | |||||
sub_vcf=in_out.out_vcf, | |||||
sub_vcf_idx=in_out.out_vcf_idx, | |||||
satellite=satellite, | |||||
simple_repeat=simple_repeat, | |||||
SINE=SINE, | |||||
LINE=LINE, | |||||
LTR=LTR, | |||||
low_complexity=low_complexity, | |||||
SD=SD, | |||||
ins_breakpoint=ins_breakpoint, | |||||
del_breakpoint=del_breakpoint, | |||||
mhc=mhc, | |||||
sample_name=sample_name, | |||||
tag="outside", | |||||
docker=docker, | |||||
cluster_config=cluster_config, | |||||
disk_size=disk_size | |||||
} | |||||
} | |||||