|
- task mendelian {
- File mother_vcf_gz
- File father_vcf_gz
- File child_vcf_gz
- File mother_vcf_idx
- File father_vcf_idx
- File child_vcf_idx
- String mother_name
- String father_name
- String child_name
- String family_name
- File sdf
- String docker
- String cluster_config
- String disk_size
-
- command <<<
- rtg vcfmerge -o family.vcf.gz ${mother_vcf_gz} ${father_vcf_gz} ${child_vcf_gz}
-
- rtg vcfannotate -i family.vcf.gz -o family.anno.vcf.gz \
- --add-header "##SAMPLE=<ID=${mother_name},Sex=FEMALE>" \
- --add-header "##SAMPLE=<ID=${father_name},Sex=MALE>" \
- --add-header "##SAMPLE=<ID=${child_name},Sex=FEMALE>" \
- --add-header "##PEDIGREE=<Child=${child_name},Mother=${mother_name},Father=${father_name}>"
-
- rtg mendelian -i family.anno.vcf.gz -t ${sdf} -o ${family_name}.family.anno.mendelian.vcf.gz --lenient
-
- zcat ${family_name}.family.anno.mendelian.vcf.gz | grep '#' > header
- zcat ${family_name}.family.anno.mendelian.vcf.gz | grep -v '#'| grep 'MCU\|MCV' | cat header - > ${family_name}.violation.vcf
- zcat ${family_name}.family.anno.mendelian.vcf.gz | grep -v '#'| grep -v 'MCV' | grep -v 'MCU' | cat header - > ${family_name}.consistent.vcf
-
- rtg bgzip ${family_name}.violation.vcf
- rtg index -f vcf ${family_name}.violation.vcf.gz
-
- rtg bgzip ${family_name}.consistent.vcf
- rtg index -f vcf ${family_name}.consistent.vcf.gz
-
- rtg vcffilter -i ${child_vcf_gz} -o ${child_name}.violation.vcf.gz --include-vcf=${family_name}.violation.vcf.gz
-
- rtg vcffilter -i ${child_vcf_gz} -o ${child_name}.consistent.vcf.gz --include-vcf=${family_name}.consistent.vcf.gz
-
- >>>
-
- runtime {
- docker:docker
- cluster: cluster_config
- systemDisk: "cloud_ssd 40"
- dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
- }
- output {
- File family_vcf_gz = "${family_name}.family.anno.mendelian.vcf.gz"
- File family_vcf_index = "${family_name}.family.anno.mendelian.vcf.gz.tbi"
- File violation_vcf_gz = "${child_name}.violation.vcf.gz"
- File violation_vcf_idx = "${child_name}.violation.vcf.gz.tbi"
- File consistent_vcf_gz = "${child_name}.consistent.vcf.gz"
- File consistent_vcf_idx = "${child_name}.consistent.vcf.gz.tbi"
- }
- }
|