|
- task bed_annotation {
- File merged_vcf
- File merged_vcf_idx
- File repeat_bed
- String sample
- String docker
- String cluster_config
- String disk_size
-
- command <<<
-
- rtg vcfannotate --bed-info=${repeat_bed} -i ${merged_vcf} -o ${sample}.normed.repeatAnno.vcf.gz
-
- ## DP
- zcat ${sample}.normed.repeatAnno.vcf.gz | grep -v '##' | awk '
- BEGIN { OFS = "\t" }
- NF > 2 && FNR > 1 {
- for ( i=9; i<=NF; i++ ) {
- split($i,a,":") ;$i = a[3];
- }
- }
- { print }
- ' > ${sample}.depth.txt
-
- ## GQ
- zcat ${sample}.normed.repeatAnno.vcf.gz | grep -v '##' | awk '
- BEGIN { OFS = "\t" }
- NF > 2 && FNR > 1 {
- for ( i=9; i<=NF; i++ ) {
- split($i,a,":") ;$i = a[4];
- }
- }
- { print }
- ' > ${sample}.genotypeQuality.txt
-
- ## MQ
- zcat ${sample}.normed.repeatAnno.vcf.gz | grep -v '##' | awk '
- BEGIN { OFS = "\t" }
- NF > 2 && FNR > 1 {
- for ( i=9; i<=NF; i++ ) {
- split($i,a,":") ;$i = a[6];
- }
- }
- { print }
- ' > ${sample}.mappinyQuality.txt
-
- ## Allele frequency
-
-
- >>>
-
- runtime {
- docker:docker
- cluster: cluster_config
- systemDisk: "cloud_ssd 40"
- dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
- }
- output {
- File repeat_annotated_vcf = "${sample}.normed.repeatAnno.vcf.gz"
- File repeat_annotated_vcf_idx = "${sample}.normed.repeatAnno.vcf.gz.tbi"
- }
- }
|