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.

284 line
6.8KB

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