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.

254 line
6.4KB

  1. import "./tasks/mapping.wdl" as mapping
  2. import "./tasks/Metrics.wdl" as Metrics
  3. import "./tasks/Dedup.wdl" as Dedup
  4. import "./tasks/deduped_Metrics.wdl" as deduped_Metrics
  5. import "./tasks/Realigner.wdl" as Realigner
  6. import "./tasks/BQSR.wdl" as BQSR
  7. import "./tasks/corealigner.wdl" as corealigner
  8. import "./tasks/PON.wdl" as PON
  9. import "./tasks/TNseq.wdl" as TNseq
  10. import "./tasks/TNscope.wdl" as TNscope
  11. import "./tasks/annovar.wdl" as annovar
  12. import "./tasks/vcf2maf.wdl" as vcf2maf
  13. workflow {{ project_name }} {
  14. File fastq_1
  15. File fastq_2
  16. File? normal_recaled_bam
  17. File? normal_recaled_bam_index
  18. String type
  19. String SENTIEON_INSTALL_DIR
  20. String SENTIEON_LICENSE
  21. String sentieon_docker
  22. String annovar_docker
  23. String vcf2maf_r_docker
  24. File ref_dir
  25. String fasta
  26. File dbmills_dir
  27. String db_mills
  28. File dbsnp_dir
  29. String dbsnp
  30. File regions
  31. String disk_size
  32. String cluster_config
  33. Boolean set_pon
  34. File? pon_vcf
  35. File? cosmic_dir
  36. String? cosmic_vcf
  37. Boolean set_annovar
  38. File? database
  39. Boolean set_vcf2maf
  40. call mapping.mapping as mapping {
  41. input:
  42. group=sample + '_' + type,
  43. sample=sample + '_' + type,
  44. fastq_1=fastq_1,
  45. fastq_2=fastq_2,
  46. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  47. SENTIEON_LICENSE=SENTIEON_LICENSE,
  48. pl="ILLUMINAL",
  49. fasta=fasta,
  50. ref_dir=ref_dir,
  51. docker=sentieon_docker,
  52. disk_size=disk_size,
  53. cluster_config=cluster_config
  54. }
  55. call Metrics.Metrics as Metrics {
  56. input:
  57. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  58. SENTIEON_LICENSE=SENTIEON_LICENSE,
  59. fasta=fasta,
  60. ref_dir=ref_dir,
  61. sorted_bam=mapping.sorted_bam,
  62. sorted_bam_index=mapping.sorted_bam_index,
  63. sample=sample + '_' + type,
  64. docker=sentieon_docker,
  65. disk_size=disk_size,
  66. cluster_config=cluster_config
  67. }
  68. call Dedup.Dedup as Dedup {
  69. input:
  70. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  71. SENTIEON_LICENSE=SENTIEON_LICENSE,
  72. sorted_bam=mapping.sorted_bam,
  73. sorted_bam_index=mapping.sorted_bam_index,
  74. sample=sample + '_' + type,
  75. docker=sentieon_docker,
  76. disk_size=disk_size,
  77. cluster_config=cluster_config
  78. }
  79. call deduped_Metrics.deduped_Metrics as deduped_Metrics {
  80. input:
  81. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  82. SENTIEON_LICENSE=SENTIEON_LICENSE,
  83. fasta=fasta,
  84. ref_dir=ref_dir,
  85. Dedup_bam=Dedup.Dedup_bam,
  86. Dedup_bam_index=Dedup.Dedup_bam_index,
  87. sample=sample + '_' + type,
  88. docker=sentieon_docker,
  89. disk_size=disk_size,
  90. cluster_config=cluster_config
  91. }
  92. call Realigner.Realigner as Realigner {
  93. input:
  94. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  95. SENTIEON_LICENSE=SENTIEON_LICENSE,
  96. fasta=fasta,
  97. ref_dir=ref_dir,
  98. Dedup_bam=Dedup.Dedup_bam,
  99. Dedup_bam_index=Dedup.Dedup_bam_index,
  100. db_mills=db_mills,
  101. dbmills_dir=dbmills_dir,
  102. sample=sample + '_' + type,
  103. docker=sentieon_docker,
  104. disk_size=disk_size,
  105. regions=regions,
  106. cluster_config=cluster_config
  107. }
  108. call BQSR.BQSR as BQSR {
  109. input:
  110. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  111. SENTIEON_LICENSE=SENTIEON_LICENSE,
  112. fasta=fasta,
  113. ref_dir=ref_dir,
  114. realigned_bam=Realigner.realigner_bam,
  115. realigned_bam_index=Realigner.realigner_bam_index,
  116. db_mills=db_mills,
  117. dbmills_dir=dbmills_dir,
  118. dbsnp=dbsnp,
  119. dbsnp_dir=dbsnp_dir,
  120. sample=sample + '_' + type,
  121. regions=regions,
  122. docker=sentieon_docker,
  123. disk_size=disk_size,
  124. cluster_config=cluster_config
  125. }
  126. if (set_pon && type == "normal") {
  127. call PON.PON as PON {
  128. input:
  129. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  130. SENTIEON_LICENSE=SENTIEON_LICENSE,
  131. sample=sample,
  132. fasta=fasta,
  133. ref_dir=ref_dir,
  134. normal_recaled_bam=BQSR.recaled_bam,
  135. normal_recaled_bam_index=BQSR.recaled_bam_index,
  136. cosmic_vcf=cosmic_vcf,
  137. cosmic_dir=cosmic_dir,
  138. dbsnp=dbsnp,
  139. dbsnp_dir=dbsnp_dir,
  140. docker=sentieon_docker,
  141. disk_size=disk_size,
  142. cluster_config=cluster_config
  143. }
  144. }
  145. if (type == "tumor" && defined(normal_recaled_bam)) {
  146. call corealigner.corealigner as corealigner {
  147. input:
  148. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  149. SENTIEON_LICENSE=SENTIEON_LICENSE,
  150. fasta=fasta,
  151. ref_dir=ref_dir,
  152. sample=sample,
  153. docker=sentieon_docker,
  154. db_mills=db_mills,
  155. dbmills_dir=dbmills_dir,
  156. dbsnp=dbsnp,
  157. dbsnp_dir=dbsnp_dir,
  158. tumor_recaled_bam=BQSR.recaled_bam,
  159. tumor_recaled_bam_index=BQSR.recaled_bam_index,
  160. normal_recaled_bam=normal_recaled_bam,
  161. normal_recaled_bam_index=normal_recaled_bam_index,
  162. disk_size=disk_size,
  163. cluster_config=cluster_config
  164. }
  165. }
  166. call TNseq.TNseq as TNseq {
  167. input:
  168. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  169. SENTIEON_LICENSE=SENTIEON_LICENSE,
  170. fasta=fasta,
  171. ref_dir=ref_dir,
  172. corealigner_bam=corealigner.corealigner_bam,
  173. corealigner_bam_index=corealigner.corealigner_bam_index,
  174. tumor_recaled_bam=BQSR.recaled_bam,
  175. tumor_recaled_bam_index=BQSR.recaled_bam_index,
  176. dbsnp=dbsnp,
  177. dbsnp_dir=dbsnp_dir,
  178. set_pon=set_pon,
  179. pon_vcf=pon_vcf,
  180. cosmic_vcf=cosmic_vcf,
  181. cosmic_dir=cosmic_dir,
  182. tumor_name=sample + "_tumor",
  183. normal_name=sample + "_normal",
  184. docker=sentieon_docker,
  185. sample=sample,
  186. disk_size=disk_size,
  187. cluster_config=cluster_config
  188. }
  189. call TNscope.TNscope as TNscope {
  190. input:
  191. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  192. SENTIEON_LICENSE=SENTIEON_LICENSE,
  193. fasta=fasta,
  194. ref_dir=ref_dir,
  195. corealigner_bam=corealigner.corealigner_bam,
  196. corealigner_bam_index=corealigner.corealigner_bam_index,
  197. tumor_recaled_bam=BQSR.recaled_bam,
  198. tumor_recaled_bam_index=BQSR.recaled_bam_index,
  199. dbsnp=dbsnp,
  200. dbsnp_dir=dbsnp_dir,
  201. set_pon=set_pon,
  202. pon_vcf=pon_vcf,
  203. cosmic_vcf=cosmic_vcf,
  204. cosmic_dir=cosmic_dir,
  205. tumor_name=sample + "_tumor",
  206. normal_name=sample + "_normal",
  207. docker=sentieon_docker,
  208. sample=sample,
  209. disk_size=disk_size,
  210. cluster_config=cluster_config
  211. }
  212. if (set_annovar && defined(TNscope.TNscope_vcf) && defined(TNseq.TNseq_vcf)){
  213. call annovar.annovar as annovar {
  214. input:
  215. docker=annovar_docker,
  216. database=database,
  217. tnscope_vcf_file=TNscope.TNscope_vcf,
  218. tnseq_vcf_file=TNseq.TNseq_vcf,
  219. sample=sample,
  220. cluster_config=cluster_config,
  221. disk_size=disk_size
  222. }
  223. if (set_vcf2maf){
  224. call vcf2maf.vcf2maf as vcf2maf {
  225. input:
  226. docker=vcf2maf_r_docker,
  227. multianno_tnscope_txt=annovar.multianno_tnscope_txt,
  228. multianno_tnseq_txt=annovar.multianno_tnseq_txt,
  229. sample=sample,
  230. cluster_config=cluster_config,
  231. disk_size=disk_size
  232. }
  233. }
  234. }
  235. }