Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

benchmark.wdl 4.0KB

4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. task benchmark {
  2. File vcf
  3. File benchmarking_dir
  4. File sdf
  5. String sample = basename(vcf,".raw.vcf.gz")
  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 ${benchmarking_dir} /cromwell_root/tmp/
  16. ls /cromwell_root/tmp/reference_datasets_v202103/ > files.txt
  17. gunzip ${vcf} -c > unzip.vcf
  18. /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg bgzip unzip.vcf -c > ${sample}.rtg.vcf.gz
  19. /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg index -f vcf ${sample}.rtg.vcf.gz
  20. /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg vcffilter -i ${sample}.rtg.vcf.gz -o ${sample}.rtg.SNV.vcf.gz --snps-only
  21. /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg vcffilter -i ${sample}.rtg.vcf.gz -o ${sample}.rtg.INDEL.vcf.gz --non-snps-only
  22. if [[ ${sample} =~ "LCL5" ]];then
  23. /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg vcfeval -b /cromwell_root/tmp/reference_datasets_v202103/LCL5.high.confidence.calls.SNV.vcf.gz -c ${sample}.rtg.SNV.vcf.gz -o ${sample}_SNV -t ${sdf} --bed-regions=/cromwell_root/tmp/reference_datasets_v202103/Quartet.high.confidence.region.v202103.bed
  24. /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg vcfeval -b /cromwell_root/tmp/reference_datasets_v202103/LCL5.high.confidence.calls.INDEL.vcf.gz -c ${sample}.rtg.SNV.vcf.gz -o ${sample}_INDEL -t ${sdf} --bed-regions=/cromwell_root/tmp/reference_datasets_v202103/Quartet.high.confidence.region.v202103.bed
  25. elif [[ ${sample} =~ "LCL6" ]]; then
  26. /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg vcfeval -b /cromwell_root/tmp/reference_datasets_v202103/LCL6.high.confidence.calls.SNV.vcf.gz -c ${sample}.rtg.SNV.vcf.gz -o ${sample}_SNV -t ${sdf} --bed-regions=/cromwell_root/tmp/reference_datasets_v202103/Quartet.high.confidence.region.v202103.bed
  27. /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg vcfeval -b /cromwell_root/tmp/reference_datasets_v202103/LCL6.high.confidence.calls.INDEL.vcf.gz -c ${sample}.rtg.SNV.vcf.gz -o ${sample}_INDEL -t ${sdf} --bed-regions=/cromwell_root/tmp/reference_datasets_v202103/Quartet.high.confidence.region.v202103.bed
  28. elif [[ ${sample} =~ "LCL7" ]]; then
  29. /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg vcfeval -b /cromwell_root/tmp/reference_datasets_v202103/LCL7.high.confidence.calls.SNV.vcf.gz -c ${sample}.rtg.SNV.vcf.gz -o ${sample}_SNV -t ${sdf} --bed-regions=/cromwell_root/tmp/reference_datasets_v202103/Quartet.high.confidence.region.v202103.bed
  30. /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg vcfeval -b /cromwell_root/tmp/reference_datasets_v202103/LCL7.high.confidence.calls.INDEL.vcf.gz -c ${sample}.rtg.SNV.vcf.gz -o ${sample}_INDEL -t ${sdf} --bed-regions=/cromwell_root/tmp/reference_datasets_v202103/Quartet.high.confidence.region.v202103.bed
  31. elif [[ ${sample} =~ "LCL8" ]]; then
  32. /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg vcfeval -b /cromwell_root/tmp/reference_datasets_v202103/LCL8.high.confidence.calls.SNV.vcf.gz -c ${sample}.rtg.SNV.vcf.gz -o ${sample}_SNV -t ${sdf} --bed-regions=/cromwell_root/tmp/reference_datasets_v202103/Quartet.high.confidence.region.v202103.bed
  33. /opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg vcfeval -b /cromwell_root/tmp/reference_datasets_v202103/LCL8.high.confidence.calls.INDEL.vcf.gz -c ${sample}.rtg.SNV.vcf.gz -o ${sample}_INDEL -t ${sdf} --bed-regions=/cromwell_root/tmp/reference_datasets_v202103/Quartet.high.confidence.region.v202103.bed
  34. else
  35. echo "only for quartet samples"
  36. fi
  37. cat ${sample}_SNV/summary.txt ${sample}_SNV_precision_recall.txt
  38. cat ${sample}_INDEL/summary.txt ${sample}_INDEL_precision_recall.txt
  39. >>>
  40. runtime {
  41. docker:docker
  42. cluster:cluster_config
  43. systemDisk:"cloud_ssd 40"
  44. dataDisk:"cloud_ssd " + disk_size + " /cromwell_root/"
  45. }
  46. output {
  47. File rtg_vcf = "${sample}.rtg.vcf.gz"
  48. File rtg_vcf_index = "${sample}.rtg.vcf.gz.tbi"
  49. File SNV_result = "${sample}_SNV_precision_recall.txt"
  50. File Indel_result = "${sample}_INDEL_precision_recall.txt"
  51. File file_list = "files.txt"
  52. }
  53. }