您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

62 行
2.4KB

  1. task benchmark {
  2. File vcf
  3. File benchmarking_dir
  4. File ref_dir
  5. String sample = basename(vcf,".splited.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. cat ${vcf} | grep '#' > header
  18. cat ${vcf} | grep -v '#' | grep -v '0/0' | grep -v '\./\.' > body
  19. cat header body > filtered.vcf
  20. /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg bgzip filtered.vcf -c > ${sample}.rtg.vcf.gz
  21. /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg index -f vcf ${sample}.rtg.vcf.gz
  22. if [[ ${sample} =~ "LCL5" ]];then
  23. /opt/hap.py/bin/hap.py ${benchmarking_dir}/LCL5.afterfilterdiffbed.vcf.gz ${sample}.rtg.vcf.gz -f ${benchmarking_dir}/LCL5.high.confidence.bed --threads $nt -o ${sample} -r ${ref_dir}/${fasta}
  24. elif [[ ${sample} =~ "LCL6" ]]; then
  25. /opt/hap.py/bin/hap.py ${benchmarking_dir}/LCL6.afterfilterdiffbed.vcf.gz ${sample}.rtg.vcf.gz -f ${benchmarking_dir}/LCL6.high.confidence.bed --threads $nt -o ${sample} -r ${ref_dir}/${fasta}
  26. elif [[ ${sample} =~ "LCL7" ]]; then
  27. /opt/hap.py/bin/hap.py ${benchmarking_dir}/LCL7.afterfilterdiffbed.vcf.gz ${sample}.rtg.vcf.gz -f ${benchmarking_dir}/LCL7.high.confidence.bed --threads $nt -o ${sample} -r ${ref_dir}/${fasta}
  28. elif [[ ${sample} =~ "LCL8" ]]; then
  29. /opt/hap.py/bin/hap.py ${benchmarking_dir}/LCL8.afterfilterdiffbed.vcf.gz ${sample}.rtg.vcf.gz -f ${benchmarking_dir}/LCL8.high.confidence.bed --threads $nt -o ${sample} -r ${ref_dir}/${fasta}
  30. else
  31. echo "only for quartet samples"
  32. fi
  33. >>>
  34. runtime {
  35. docker:docker
  36. cluster:cluster_config
  37. systemDisk:"cloud_ssd 40"
  38. dataDisk:"cloud_ssd " + disk_size + " /cromwell_root/"
  39. }
  40. output {
  41. File rtg_vcf = "${sample}.rtg.vcf.gz"
  42. File rtg_vcf_index = "${sample}.rtg.vcf.gz.tbi"
  43. File gzip_vcf = "${sample}.vcf.gz"
  44. File gzip_vcf_index = "${sample}.vcf.gz.tbi"
  45. File roc_all_csv = "${sample}.roc.all.csv.gz"
  46. File roc_indel = "${sample}.roc.Locations.INDEL.csv.gz"
  47. File roc_indel_pass = "${sample}.roc.Locations.INDEL.PASS.csv.gz"
  48. File roc_snp = "${sample}.roc.Locations.SNP.csv.gz"
  49. File roc_snp_pass = "${sample}.roc.Locations.SNP.PASS.csv.gz"
  50. File summary = "${sample}.summary.csv"
  51. File extended = "${sample}.extended.csv"
  52. File metrics = "${sample}.metrics.json.gz"
  53. }
  54. }