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.

38 lines
1.0KB

  1. task mapping {
  2. File ref_dir
  3. String fasta
  4. File fastq_1
  5. File fastq_2
  6. String SENTIEON_INSTALL_DIR
  7. String SENTIEON_LICENSE
  8. String group
  9. String sample
  10. String project
  11. String pl
  12. String user_define_name = sub(basename(fastq_1, "_R1.fastq.gz"), "_R1.fq.gz$", "")
  13. String docker
  14. String cluster_config
  15. String disk_size
  16. command <<<
  17. set -o pipefail
  18. set -e
  19. export SENTIEON_LICENSE=${SENTIEON_LICENSE}
  20. nt=$(nproc)
  21. ${SENTIEON_INSTALL_DIR}/bin/bwa mem -M -R "@RG\tID:${group}\tSM:${sample}\tPL:${pl}" -t $nt -K 10000000 ${ref_dir}/${fasta} ${fastq_1} ${fastq_2} | ${SENTIEON_INSTALL_DIR}/bin/sentieon util sort -o ${user_define_name}_${project}_${sample}.sorted.bam -t $nt --sam2bam -i -
  22. >>>
  23. runtime {
  24. docker:docker
  25. cluster: cluster_config
  26. systemDisk: "cloud_ssd 40"
  27. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  28. }
  29. output {
  30. File sorted_bam = "${user_define_name}_${project}_${sample}.sorted.bam"
  31. File sorted_bam_index = "${user_define_name}_${project}_${sample}.sorted.bam.bai"
  32. }
  33. }