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.

Dedup.wdl 1.5KB

4 년 전
1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. task Dedup {
  2. String SENTIEON_INSTALL_DIR
  3. String SENTIEON_LICENSE
  4. String sample
  5. File sorted_bam
  6. File sorted_bam_index
  7. String docker
  8. String cluster_config
  9. String disk_size
  10. command <<<
  11. set -o pipefail
  12. set -e
  13. export SENTIEON_LICENSE=${SENTIEON_LICENSE}
  14. nt=$(nproc)
  15. ${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -i ${sorted_bam} --algo LocusCollector --fun score_info ${sample}_score.txt
  16. ${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -i ${sorted_bam} --algo Dedup --rmdup --score_info ${sample}_score.txt --metrics ${sample}_dedup_metrics.txt ${sample}.sorted.deduped.bam
  17. sed -n '3p' ${sample}_dedup_metrics.txt | awk -F'\t' '{print "'"${sample}"'""\t"$9*100}' > ${sample}_picard_duplication.txt
  18. # ${sample}_marked_dup_metrics.txt can be recognized as the picard output
  19. sed '1i\#DuplicationMetrics' ${sample}_dedup_metrics.txt > ${sample}_marked_dup_metrics.txt
  20. >>>
  21. runtime {
  22. docker: docker
  23. cluster: cluster_config
  24. systemDisk: "cloud_ssd 40"
  25. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  26. }
  27. output {
  28. File score = "${sample}_score.txt"
  29. File dedup_metrics = "${sample}_marked_dup_metrics.txt"
  30. File duplication = "${sample}_picard_duplication.txt"
  31. File Dedup_bam = "${sample}.sorted.deduped.bam"
  32. File Dedup_bam_index = "${sample}.sorted.deduped.bam.bai"
  33. }
  34. }