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.

353 lines
9.1KB

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