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.

34 lines
874B

  1. task Freebayes {
  2. File ref_dir
  3. File ref_fa_fai
  4. File fasta
  5. File Dedup_bam
  6. File Dedup_bam_index
  7. String half_read_length
  8. String sample
  9. String FBdocker
  10. String cluster_config
  11. String disk_size
  12. command <<<
  13. set -o pipefail
  14. set -e
  15. nt=$(nproc)
  16. /opt/freebayes/scripts/freebayes-parallel <(/opt/freebayes/scripts/fasta_generate_regions.py ${ref_dir}/${ref_fa_fai} 100000) $nt -f ${ref_dir}/${fasta} --genotype-qualities -F 0.05 --max-complex-gap ${half_read_length} ${Dedup_bam} > ${sample}_fb.vcf
  17. cat ${sample}_fb.vcf | grep '#' > header
  18. cat ${sample}_fb.vcf | grep -v '#' | grep -v '0/0' | cat header - > ${sample}_fb.filtered.vcf
  19. >>>
  20. runtime {
  21. docker:FBdocker
  22. cluster: cluster_config
  23. systemDisk: "cloud_ssd 40"
  24. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  25. }
  26. output {
  27. File filtered = "${sample}_fb.filtered.vcf"
  28. }
  29. }