You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.4KB

  1. task bed_annotation {
  2. File merged_vcf
  3. File merged_vcf_idx
  4. File repeat_bed
  5. String sample
  6. String docker
  7. String cluster_config
  8. String disk_size
  9. command <<<
  10. rtg vcfannotate --bed-info=${repeat_bed} -i ${merged_vcf} -o ${sample}.normed.repeatAnno.vcf.gz
  11. ## DP
  12. zcat ${sample}.normed.repeatAnno.vcf.gz | grep -v '##' | awk '
  13. BEGIN { OFS = "\t" }
  14. NF > 2 && FNR > 1 {
  15. for ( i=9; i<=NF; i++ ) {
  16. split($i,a,":") ;$i = a[3];
  17. }
  18. }
  19. { print }
  20. ' > ${sample}.depth.txt
  21. ## GQ
  22. zcat ${sample}.normed.repeatAnno.vcf.gz | grep -v '##' | awk '
  23. BEGIN { OFS = "\t" }
  24. NF > 2 && FNR > 1 {
  25. for ( i=9; i<=NF; i++ ) {
  26. split($i,a,":") ;$i = a[4];
  27. }
  28. }
  29. { print }
  30. ' > ${sample}.genotypeQuality.txt
  31. ## MQ
  32. zcat ${sample}.normed.repeatAnno.vcf.gz | grep -v '##' | awk '
  33. BEGIN { OFS = "\t" }
  34. NF > 2 && FNR > 1 {
  35. for ( i=9; i<=NF; i++ ) {
  36. split($i,a,":") ;$i = a[6];
  37. }
  38. }
  39. { print }
  40. ' > ${sample}.mappinyQuality.txt
  41. ## Allele frequency
  42. >>>
  43. runtime {
  44. docker:docker
  45. cluster: cluster_config
  46. systemDisk: "cloud_ssd 40"
  47. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  48. }
  49. output {
  50. File repeat_annotated_vcf = "${sample}.normed.repeatAnno.vcf.gz"
  51. File repeat_annotated_vcf_idx = "${sample}.normed.repeatAnno.vcf.gz.tbi"
  52. }
  53. }