Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

58 lines
2.3KB

  1. task benchmark {
  2. File vcf
  3. File benchmarking_dir
  4. File ref_dir
  5. String sample = basename(vcf,".vcf")
  6. String fasta
  7. String docker
  8. String cluster_config
  9. String disk_size
  10. command <<<
  11. set -o pipefail
  12. set -e
  13. nt=$(nproc)
  14. mkdir -p /cromwell_root/tmp
  15. cp -r ${ref_dir} /cromwell_root/tmp/
  16. export HGREF=/cromwell_root/tmp/reference_data/GRCh38.d1.vd1.fa
  17. /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg bgzip ${vcf} -c > ${sample}.rtg.vcf.gz
  18. /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg index -f vcf ${sample}.rtg.vcf.gz
  19. if [[ ${sample} =~ "LCL5" ]];then
  20. /opt/hap.py/bin/hap.py ${benchmarking_dir}/LCL5.voted.mendelian.vcf.gz ${sample}.rtg.vcf.gz -f ${benchmarking_dir}/LCL5.highconfidence.bed --threads $nt -o ${sample} -r ${ref_dir}/${fasta}
  21. elif [[ ${sample} =~ "LCL6" ]]; then
  22. /opt/hap.py/bin/hap.py ${benchmarking_dir}/LCL6.voted.mendelian.vcf.gz ${sample}.rtg.vcf.gz -f ${benchmarking_dir}/LCL6.highconfidence.bed --threads $nt -o ${sample} -r ${ref_dir}/${fasta}
  23. elif [[ ${sample} =~ "LCL7" ]]; then
  24. /opt/hap.py/bin/hap.py ${benchmarking_dir}/LCL7.voted.mendelian.vcf.gz ${sample}.rtg.vcf.gz -f ${benchmarking_dir}/LCL7.highconfidence.bed --threads $nt -o ${sample} -r ${ref_dir}/${fasta}
  25. elif [[ ${sample} =~ "LCL8" ]]; then
  26. /opt/hap.py/bin/hap.py ${benchmarking_dir}/LCL8.voted.mendelian.vcf.gz ${sample}.rtg.vcf.gz -f ${benchmarking_dir}/LCL8.highconfidence.bed --threads $nt -o ${sample} -r ${ref_dir}/${fasta}
  27. else
  28. echo "only for quartet samples"
  29. fi
  30. >>>
  31. runtime {
  32. docker:docker
  33. cluster:cluster_config
  34. systemDisk:"cloud_ssd 40"
  35. dataDisk:"cloud_ssd " + disk_size + " /cromwell_root/"
  36. }
  37. output {
  38. File rtg_vcf = "${sample}.rtg.vcf.gz"
  39. File rtg_vcf_index = "${sample}.rtg.vcf.gz.tbi"
  40. File gzip_vcf = "${sample}.vcf.gz"
  41. File gzip_vcf_index = "${sample}.vcf.gz.tbi"
  42. File roc_all_csv = "${sample}.roc.all.csv.gz"
  43. File roc_indel = "${sample}.roc.Locations.INDEL.csv.gz"
  44. File roc_indel_pass = "${sample}.roc.Locations.INDEL.PASS.csv.gz"
  45. File roc_snp = "${sample}.roc.Locations.SNP.csv.gz"
  46. File roc_snp_pass = "${sample}.roc.Locations.SNP.PASS.csv.gz"
  47. File summary = "${sample}.summary.csv"
  48. File extended = "${sample}.extended.csv"
  49. File metrics = "${sample}.metrics.json.gz"
  50. }
  51. }