Automated integrated analysis software for genomics data of the cancer patients.
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.

349 lines
9.0KB

  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/BQSR.wdl" as BQSR
  6. import "./tasks/Haplotyper.wdl" as Haplotyper
  7. import "./tasks/TNseq.wdl" as TNseq
  8. import "./tasks/bcftools.wdl" as bcftools
  9. import "./tasks/ANNOVAR.wdl" as ANNOVAR
  10. import "./tasks/Manta.wdl" as Manta
  11. import "./tasks/AnnotSV.wdl" as AnnotSV
  12. import "./tasks/CNVkit.wdl" as CNVkit
  13. import "./tasks/MSIsensor.wdl" as MSIsensor
  14. import "./tasks/HRD.wdl" as HRD
  15. import "./tasks/TMB.wdl" as TMB
  16. workflow {{ project_name }} {
  17. String sample_id
  18. File? tumor_fastq_1
  19. File? tumor_fastq_2
  20. File? normal_fastq_1
  21. File? normal_fastq_2
  22. String? duplex_umi
  23. String? read_structure
  24. String SENTIEON_LICENSE
  25. String sentieon_docker
  26. String annovar_docker
  27. String manta_docker
  28. String annotsv_docker
  29. String cnvkit_docker
  30. String sequenza_docker
  31. String msisensor_docker
  32. String tmb_docker
  33. String platform
  34. File ref_dir
  35. String fasta
  36. File dbmills_dir
  37. String db_mills
  38. File dbsnp_dir
  39. String dbsnp
  40. File germline_resource
  41. File germline_resource_tbi
  42. File annovar_database
  43. File annotsv_database
  44. File? regions
  45. Int? interval_padding
  46. String disk_size
  47. String cluster_config
  48. if (tumor_fastq_1!= "") {
  49. call mapping.mapping as tumor_mapping {
  50. input:
  51. group=sample_id + '.T',
  52. sample=sample_id + '.T',
  53. fastq_1=tumor_fastq_1,
  54. fastq_2=tumor_fastq_2,
  55. SENTIEON_LICENSE=SENTIEON_LICENSE,
  56. duplex_umi=duplex_umi,
  57. read_structure=read_structure,
  58. platform=platform,
  59. fasta=fasta,
  60. ref_dir=ref_dir,
  61. docker=sentieon_docker,
  62. disk_size=disk_size,
  63. cluster_config=cluster_config
  64. }
  65. call Metrics.Metrics as tumor_Metrics {
  66. input:
  67. SENTIEON_LICENSE=SENTIEON_LICENSE,
  68. fasta=fasta,
  69. ref_dir=ref_dir,
  70. sorted_bam=tumor_mapping.sorted_bam,
  71. sorted_bam_index=tumor_mapping.sorted_bam_index,
  72. sample=sample_id + '.T',
  73. docker=sentieon_docker,
  74. disk_size=disk_size,
  75. cluster_config=cluster_config
  76. }
  77. call Dedup.Dedup as tumor_Dedup {
  78. input:
  79. SENTIEON_LICENSE=SENTIEON_LICENSE,
  80. sorted_bam=tumor_mapping.sorted_bam,
  81. sorted_bam_index=tumor_mapping.sorted_bam_index,
  82. sample=sample_id + '.T',
  83. docker=sentieon_docker,
  84. disk_size=disk_size,
  85. cluster_config=cluster_config
  86. }
  87. call deduped_Metrics.deduped_Metrics as tumor_deduped_Metrics {
  88. input:
  89. SENTIEON_LICENSE=SENTIEON_LICENSE,
  90. fasta=fasta,
  91. ref_dir=ref_dir,
  92. deduped_bam=tumor_Dedup.deduped_bam,
  93. deduped_bam_index=tumor_Dedup.deduped_bam_index,
  94. sample=sample_id + '.T',
  95. docker=sentieon_docker,
  96. disk_size=disk_size,
  97. cluster_config=cluster_config
  98. }
  99. call BQSR.BQSR as tumor_BQSR {
  100. input:
  101. SENTIEON_LICENSE=SENTIEON_LICENSE,
  102. fasta=fasta,
  103. ref_dir=ref_dir,
  104. deduped_bam=tumor_Dedup.deduped_bam,
  105. deduped_bam_index=tumor_Dedup.deduped_bam_index,
  106. db_mills=db_mills,
  107. dbmills_dir=dbmills_dir,
  108. dbsnp=dbsnp,
  109. dbsnp_dir=dbsnp_dir,
  110. sample=sample_id + '.T',
  111. docker=sentieon_docker,
  112. disk_size=disk_size,
  113. cluster_config=cluster_config
  114. }
  115. }
  116. if (normal_fastq_1!= "") {
  117. call mapping.mapping as normal_mapping {
  118. input:
  119. group=sample_id + '.N',
  120. sample=sample_id + '.N',
  121. fastq_1=normal_fastq_1,
  122. fastq_2=normal_fastq_2,
  123. SENTIEON_LICENSE=SENTIEON_LICENSE,
  124. duplex_umi=duplex_umi,
  125. read_structure=read_structure,
  126. platform=platform,
  127. fasta=fasta,
  128. ref_dir=ref_dir,
  129. docker=sentieon_docker,
  130. disk_size=disk_size,
  131. cluster_config=cluster_config
  132. }
  133. call Metrics.Metrics as normal_Metrics {
  134. input:
  135. SENTIEON_LICENSE=SENTIEON_LICENSE,
  136. fasta=fasta,
  137. ref_dir=ref_dir,
  138. sorted_bam=normal_mapping.sorted_bam,
  139. sorted_bam_index=normal_mapping.sorted_bam_index,
  140. sample=sample_id + '.N',
  141. regions=regions,
  142. docker=sentieon_docker,
  143. disk_size=disk_size,
  144. cluster_config=cluster_config
  145. }
  146. call Dedup.Dedup as normal_Dedup {
  147. input:
  148. SENTIEON_LICENSE=SENTIEON_LICENSE,
  149. sorted_bam=normal_mapping.sorted_bam,
  150. sorted_bam_index=normal_mapping.sorted_bam_index,
  151. sample=sample_id + '.N',
  152. docker=sentieon_docker,
  153. disk_size=disk_size,
  154. cluster_config=cluster_config
  155. }
  156. call deduped_Metrics.deduped_Metrics as normal_deduped_Metrics {
  157. input:
  158. SENTIEON_LICENSE=SENTIEON_LICENSE,
  159. fasta=fasta,
  160. ref_dir=ref_dir,
  161. deduped_bam=normal_Dedup.deduped_bam,
  162. deduped_bam_index=normal_Dedup.deduped_bam_index,
  163. sample=sample_id + '.N',
  164. regions=regions,
  165. docker=sentieon_docker,
  166. disk_size=disk_size,
  167. cluster_config=cluster_config
  168. }
  169. call BQSR.BQSR as normal_BQSR {
  170. input:
  171. SENTIEON_LICENSE=SENTIEON_LICENSE,
  172. fasta=fasta,
  173. ref_dir=ref_dir,
  174. deduped_bam=normal_Dedup.deduped_bam,
  175. deduped_bam_index=normal_Dedup.deduped_bam_index,
  176. db_mills=db_mills,
  177. dbmills_dir=dbmills_dir,
  178. dbsnp=dbsnp,
  179. dbsnp_dir=dbsnp_dir,
  180. sample=sample_id + '.N',
  181. docker=sentieon_docker,
  182. disk_size=disk_size,
  183. cluster_config=cluster_config
  184. }
  185. call Haplotyper.Haplotyper as Haplotyper {
  186. input:
  187. SENTIEON_LICENSE=SENTIEON_LICENSE,
  188. sample=sample_id + '.N',
  189. fasta=fasta,
  190. ref_dir=ref_dir,
  191. recaled_bam=normal_BQSR.recaled_bam,
  192. recaled_bam_index=normal_BQSR.recaled_bam_index,
  193. dbsnp=dbsnp,
  194. dbsnp_dir=dbsnp_dir,
  195. regions=regions,
  196. docker=sentieon_docker,
  197. disk_size=disk_size,
  198. cluster_config=cluster_config
  199. }
  200. call bcftools.bcftools as Haplotyper_bcftools {
  201. input:
  202. vcf=Haplotyper.vcf,
  203. fasta=fasta,
  204. ref_dir=ref_dir,
  205. docker=bcftools_docker,
  206. cluster_config=cluster_config,
  207. disk_size=disk_size
  208. }
  209. }
  210. call Manta.Manta as Manta {
  211. input:
  212. sample=sample_id,
  213. fasta=fasta,
  214. ref_dir=ref_dir,
  215. regions=regions,
  216. normal_bam=normal_BQSR.recaled_bam,
  217. normal_bam_index=normal_BQSR.recaled_bam_index,
  218. tumor_bam=tumor_BQSR.recaled_bam,
  219. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  220. docker=manta_docker,
  221. cluster_config=cluster_config,
  222. disk_size=disk_size
  223. }
  224. call AnnotSV.AnnotSV as Manta_AnnotSV {
  225. input:
  226. sample=sample_id,
  227. somatic_vcf=Manta.somatic_vcf,
  228. germline_vcf=Manta.germline_vcf,
  229. annotsv_database=annotsv_database,
  230. docker=annotsv_docker,
  231. cluster_config=cluster_config,
  232. disk_size=disk_size
  233. }
  234. call TNseq.TNseq as TNseq {
  235. input:
  236. SENTIEON_LICENSE=SENTIEON_LICENSE,
  237. sample=sample_id,
  238. normal_bam=normal_BQSR.recaled_bam,
  239. normal_bam_index=normal_BQSR.recaled_bam_index,
  240. tumor_bam=tumor_BQSR.recaled_bam,
  241. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  242. normal_name=sample_id + ".N",
  243. tumor_name=sample_id + ".T",
  244. fasta=fasta,
  245. ref_dir=ref_dir,
  246. regions=regions,
  247. interval_padding=interval_padding,
  248. germline_resource=germline_resource,
  249. germline_resource_tbi=germline_resource_tbi,
  250. docker=sentieon_docker,
  251. cluster_config=cluster_config,
  252. disk_size=disk_size
  253. }
  254. call bcftools.bcftools as TNseq_bcftools {
  255. input:
  256. vcf=TNseq.vcf,
  257. fasta=fasta,
  258. ref_dir=ref_dir,
  259. docker=bcftools_docker,
  260. cluster_config=cluster_config,
  261. disk_size=disk_size
  262. }
  263. call ANNOVAR.ANNOVAR as TNseq_ANNOVAR {
  264. input:
  265. vcf=TNseq_bcftools.norm_vcf,
  266. annovar_database=annovar_database,
  267. docker=annovar_docker,
  268. cluster_config=cluster_config,
  269. disk_size=disk_size
  270. }
  271. call CNVkit.CNVkit as CNVkit {
  272. input:
  273. sample=sample_id,
  274. fasta=fasta,
  275. ref_dir=ref_dir,
  276. regions=regions,
  277. ref_flat=ref_flat,
  278. normal_bam=normal_BQSR.recaled_bam,
  279. normal_bam_index=normal_BQSR.recaled_bam_index,
  280. tumor_bam=tumor_BQSR.recaled_bam,
  281. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  282. docker=cnvkit_docker,
  283. cluster_config=cluster_config,
  284. disk_size=disk_size
  285. }
  286. call MSIsensor.MSIsensor as MSIsensor {
  287. input:
  288. fasta=fasta,
  289. ref_dir=ref_dir,
  290. normal_bam=normal_BQSR.recaled_bam,
  291. normal_bam_index=normal_BQSR.recaled_bam_index,
  292. tumor_bam=tumor_BQSR.recaled_bam,
  293. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  294. baseline=baseline,
  295. docker=msisensor_docker,
  296. cluster_config=cluster_config,
  297. disk_size=disk_size
  298. }
  299. call HRD.HRD as HRD {
  300. input:
  301. sample=sample_id,
  302. fasta=fasta,
  303. ref_dir=ref_dir,
  304. gc=gc,
  305. normal_bam=normal_BQSR.recaled_bam,
  306. normal_bam_index=normal_BQSR.recaled_bam_index,
  307. tumor_bam=tumor_BQSR.recaled_bam,
  308. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  309. docker=sequenza_docker,
  310. cluster_config=cluster_config,
  311. disk_size=disk_size
  312. }
  313. call TMB.TMB as TMB {
  314. input:
  315. sample=sample_id,
  316. regions=regions,
  317. snpindel_txt=TNseq_ANNOVAR.multianno_txt,
  318. docker=tmb_docker,
  319. cluster_config=cluster_config,
  320. disk_size=disk_size
  321. }
  322. }