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.

521 lines
13KB

  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. import "./tasks/fastqc.wdl" as fastqc
  17. import "./tasks/fastqscreen.wdl" as fastqscreen
  18. import "./tasks/qualimap.wdl" as qualimap
  19. import "./tasks/TNscope.wdl" as TNscope
  20. import "./tasks/VarScan.wdl" as VarScan
  21. workflow {{ project_name }} {
  22. String sample_id
  23. File? tumor_fastq_1
  24. File? tumor_fastq_2
  25. File? normal_fastq_1
  26. File? normal_fastq_2
  27. String? duplex_umi
  28. String? read_structure
  29. String SENTIEON_LICENSE
  30. String sentieon_docker
  31. String manta_docker
  32. String bcftools_docker
  33. String annovar_docker
  34. String annotsv_docker
  35. String cnvkit_docker
  36. String sequenza_docker
  37. String msisensor_docker
  38. String tmb_docker
  39. String platform
  40. File ref_dir
  41. String fasta
  42. File dbmills_dir
  43. String db_mills
  44. File dbsnp_dir
  45. String dbsnp
  46. File germline_resource
  47. File germline_resource_tbi
  48. File annovar_database
  49. File annotsv_database
  50. File gc
  51. File baseline
  52. File ref_flat
  53. File? regions
  54. Int? interval_padding
  55. String disk_size
  56. String cluster_2cpu_4gb
  57. String cluster_16cpu_32gb
  58. Boolean qc
  59. String fastqc_docker
  60. String fastqscreen_docker
  61. String qualimap_docker
  62. File screen_ref_dir
  63. File fastq_screen_conf
  64. Boolean multi_caller
  65. String varscan_docker
  66. if (tumor_fastq_1!= "") {
  67. call mapping.mapping as tumor_mapping {
  68. input:
  69. group=sample_id + '.T',
  70. sample=sample_id + '.T',
  71. fastq_1=tumor_fastq_1,
  72. fastq_2=tumor_fastq_2,
  73. SENTIEON_LICENSE=SENTIEON_LICENSE,
  74. duplex_umi=duplex_umi,
  75. read_structure=read_structure,
  76. platform=platform,
  77. fasta=fasta,
  78. ref_dir=ref_dir,
  79. docker=sentieon_docker,
  80. disk_size=disk_size,
  81. cluster_config=cluster_16cpu_32gb
  82. }
  83. call Metrics.Metrics as tumor_Metrics {
  84. input:
  85. SENTIEON_LICENSE=SENTIEON_LICENSE,
  86. sample=sample_id + '.T',
  87. fasta=fasta,
  88. ref_dir=ref_dir,
  89. sorted_bam=tumor_mapping.sorted_bam,
  90. sorted_bam_index=tumor_mapping.sorted_bam_index,
  91. docker=sentieon_docker,
  92. disk_size=disk_size,
  93. cluster_config=cluster_16cpu_32gb
  94. }
  95. call Dedup.Dedup as tumor_Dedup {
  96. input:
  97. SENTIEON_LICENSE=SENTIEON_LICENSE,
  98. sample=sample_id + '.T',
  99. sorted_bam=tumor_mapping.sorted_bam,
  100. sorted_bam_index=tumor_mapping.sorted_bam_index,
  101. docker=sentieon_docker,
  102. disk_size=disk_size,
  103. cluster_config=cluster_16cpu_32gb
  104. }
  105. call deduped_Metrics.deduped_Metrics as tumor_deduped_Metrics {
  106. input:
  107. SENTIEON_LICENSE=SENTIEON_LICENSE,
  108. sample=sample_id + '.T',
  109. fasta=fasta,
  110. ref_dir=ref_dir,
  111. deduped_bam=tumor_Dedup.deduped_bam,
  112. deduped_bam_index=tumor_Dedup.deduped_bam_index,
  113. docker=sentieon_docker,
  114. disk_size=disk_size,
  115. cluster_config=cluster_16cpu_32gb
  116. }
  117. call BQSR.BQSR as tumor_BQSR {
  118. input:
  119. SENTIEON_LICENSE=SENTIEON_LICENSE,
  120. sample=sample_id + '.T',
  121. fasta=fasta,
  122. ref_dir=ref_dir,
  123. deduped_bam=tumor_Dedup.deduped_bam,
  124. deduped_bam_index=tumor_Dedup.deduped_bam_index,
  125. db_mills=db_mills,
  126. dbmills_dir=dbmills_dir,
  127. dbsnp=dbsnp,
  128. dbsnp_dir=dbsnp_dir,
  129. regions=regions,
  130. interval_padding=interval_padding,
  131. docker=sentieon_docker,
  132. disk_size=disk_size,
  133. cluster_config=cluster_16cpu_32gb
  134. }
  135. if (qc){
  136. call fastqc.fastqc as tumor_fastqc {
  137. input:
  138. sample=sample_id + '.T',
  139. read1=tumor_fastq_1,
  140. read2=tumor_fastq_2,
  141. docker=fastqc_docker,
  142. disk_size=disk_size,
  143. cluster_config=cluster_2cpu_4gb
  144. }
  145. call fastqscreen.fastq_screen as tumor_fastqscreen {
  146. input:
  147. sample=sample_id + '.T',
  148. read1=tumor_fastq_1,
  149. read2=tumor_fastq_2,
  150. screen_ref_dir=screen_ref_dir,
  151. fastq_screen_conf=fastq_screen_conf,
  152. docker=fastqscreen_docker,
  153. disk_size=disk_size,
  154. cluster_config=cluster_2cpu_4gb
  155. }
  156. call qualimap.qualimap as tumor_qualimap {
  157. input:
  158. sample=sample_id + '.T',
  159. bam=tumor_Dedup.deduped_bam,
  160. bai=tumor_Dedup.deduped_bam_index,
  161. covered_bed=regions,
  162. docker=qualimap_docker,
  163. disk_size=disk_size,
  164. cluster_config=cluster_16cpu_32gb
  165. }
  166. }
  167. }
  168. if (normal_fastq_1!= "") {
  169. call mapping.mapping as normal_mapping {
  170. input:
  171. group=sample_id + '.N',
  172. sample=sample_id + '.N',
  173. fastq_1=normal_fastq_1,
  174. fastq_2=normal_fastq_2,
  175. SENTIEON_LICENSE=SENTIEON_LICENSE,
  176. duplex_umi=duplex_umi,
  177. read_structure=read_structure,
  178. platform=platform,
  179. fasta=fasta,
  180. ref_dir=ref_dir,
  181. docker=sentieon_docker,
  182. disk_size=disk_size,
  183. cluster_config=cluster_16cpu_32gb
  184. }
  185. call Metrics.Metrics as normal_Metrics {
  186. input:
  187. SENTIEON_LICENSE=SENTIEON_LICENSE,
  188. sample=sample_id + '.N',
  189. fasta=fasta,
  190. ref_dir=ref_dir,
  191. sorted_bam=normal_mapping.sorted_bam,
  192. sorted_bam_index=normal_mapping.sorted_bam_index,
  193. regions=regions,
  194. docker=sentieon_docker,
  195. disk_size=disk_size,
  196. cluster_config=cluster_16cpu_32gb
  197. }
  198. call Dedup.Dedup as normal_Dedup {
  199. input:
  200. SENTIEON_LICENSE=SENTIEON_LICENSE,
  201. sample=sample_id + '.N',
  202. sorted_bam=normal_mapping.sorted_bam,
  203. sorted_bam_index=normal_mapping.sorted_bam_index,
  204. docker=sentieon_docker,
  205. disk_size=disk_size,
  206. cluster_config=cluster_16cpu_32gb
  207. }
  208. call deduped_Metrics.deduped_Metrics as normal_deduped_Metrics {
  209. input:
  210. SENTIEON_LICENSE=SENTIEON_LICENSE,
  211. sample=sample_id + '.N',
  212. fasta=fasta,
  213. ref_dir=ref_dir,
  214. deduped_bam=normal_Dedup.deduped_bam,
  215. deduped_bam_index=normal_Dedup.deduped_bam_index,
  216. regions=regions,
  217. docker=sentieon_docker,
  218. disk_size=disk_size,
  219. cluster_config=cluster_16cpu_32gb
  220. }
  221. call BQSR.BQSR as normal_BQSR {
  222. input:
  223. SENTIEON_LICENSE=SENTIEON_LICENSE,
  224. sample=sample_id + '.N',
  225. fasta=fasta,
  226. ref_dir=ref_dir,
  227. deduped_bam=normal_Dedup.deduped_bam,
  228. deduped_bam_index=normal_Dedup.deduped_bam_index,
  229. db_mills=db_mills,
  230. dbmills_dir=dbmills_dir,
  231. dbsnp=dbsnp,
  232. dbsnp_dir=dbsnp_dir,
  233. regions=regions,
  234. interval_padding=interval_padding,
  235. docker=sentieon_docker,
  236. disk_size=disk_size,
  237. cluster_config=cluster_16cpu_32gb
  238. }
  239. call Haplotyper.Haplotyper as Haplotyper {
  240. input:
  241. SENTIEON_LICENSE=SENTIEON_LICENSE,
  242. sample=sample_id + '.N',
  243. fasta=fasta,
  244. ref_dir=ref_dir,
  245. recaled_bam=normal_BQSR.recaled_bam,
  246. recaled_bam_index=normal_BQSR.recaled_bam_index,
  247. dbsnp=dbsnp,
  248. dbsnp_dir=dbsnp_dir,
  249. regions=regions,
  250. docker=sentieon_docker,
  251. disk_size=disk_size,
  252. cluster_config=cluster_16cpu_32gb
  253. }
  254. call bcftools.bcftools as Haplotyper_bcftools {
  255. input:
  256. vcf=Haplotyper.vcf,
  257. fasta=fasta,
  258. ref_dir=ref_dir,
  259. docker=bcftools_docker,
  260. cluster_config=cluster_2cpu_4gb,
  261. disk_size=disk_size
  262. }
  263. if (qc){
  264. call fastqc.fastqc as normal_fastqc {
  265. input:
  266. sample=sample_id + '.N',
  267. read1=normal_fastq_1,
  268. read2=normal_fastq_2,
  269. docker=fastqc_docker,
  270. disk_size=disk_size,
  271. cluster_config=cluster_2cpu_4gb
  272. }
  273. call fastqscreen.fastq_screen as normal_fastqscreen {
  274. input:
  275. sample=sample_id + '.N',
  276. read1=normal_fastq_1,
  277. read2=normal_fastq_2,
  278. screen_ref_dir=screen_ref_dir,
  279. fastq_screen_conf=fastq_screen_conf,
  280. docker=fastqscreen_docker,
  281. disk_size=disk_size,
  282. cluster_config=cluster_2cpu_4gb
  283. }
  284. call qualimap.qualimap as normal_qualimap {
  285. input:
  286. sample=sample_id + '.N',
  287. bam=normal_Dedup.deduped_bam,
  288. bai=normal_Dedup.deduped_bam_index,
  289. covered_bed=regions,
  290. docker=qualimap_docker,
  291. disk_size=disk_size,
  292. cluster_config=cluster_16cpu_32gb
  293. }
  294. }
  295. }
  296. call Manta.Manta as Manta {
  297. input:
  298. sample=sample_id,
  299. fasta=fasta,
  300. ref_dir=ref_dir,
  301. regions=regions,
  302. normal_bam=normal_BQSR.recaled_bam,
  303. normal_bam_index=normal_BQSR.recaled_bam_index,
  304. tumor_bam=tumor_BQSR.recaled_bam,
  305. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  306. docker=manta_docker,
  307. cluster_config=cluster_16cpu_32gb,
  308. disk_size=disk_size
  309. }
  310. call AnnotSV.AnnotSV as Manta_AnnotSV {
  311. input:
  312. sample=sample_id,
  313. somatic_vcf=Manta.somatic_vcf,
  314. germline_vcf=Manta.germline_vcf,
  315. annotsv_database=annotsv_database,
  316. docker=annotsv_docker,
  317. cluster_config=cluster_2cpu_4gb,
  318. disk_size=disk_size
  319. }
  320. call TNseq.TNseq as TNseq {
  321. input:
  322. SENTIEON_LICENSE=SENTIEON_LICENSE,
  323. sample=sample_id,
  324. normal_bam=normal_BQSR.recaled_bam,
  325. normal_bam_index=normal_BQSR.recaled_bam_index,
  326. tumor_bam=tumor_BQSR.recaled_bam,
  327. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  328. normal_name=sample_id + ".N",
  329. tumor_name=sample_id + ".T",
  330. fasta=fasta,
  331. ref_dir=ref_dir,
  332. regions=regions,
  333. interval_padding=interval_padding,
  334. germline_resource=germline_resource,
  335. germline_resource_tbi=germline_resource_tbi,
  336. docker=sentieon_docker,
  337. cluster_config=cluster_16cpu_32gb,
  338. disk_size=disk_size
  339. }
  340. call bcftools.bcftools as TNseq_bcftools {
  341. input:
  342. vcf=TNseq.vcf,
  343. fasta=fasta,
  344. ref_dir=ref_dir,
  345. docker=bcftools_docker,
  346. cluster_config=cluster_2cpu_4gb,
  347. disk_size=disk_size
  348. }
  349. call ANNOVAR.ANNOVAR as TNseq_ANNOVAR {
  350. input:
  351. vcf=TNseq_bcftools.norm_vcf,
  352. annovar_database=annovar_database,
  353. docker=annovar_docker,
  354. cluster_config=cluster_16cpu_32gb,
  355. disk_size=disk_size
  356. }
  357. call MSIsensor.MSIsensor as MSIsensor {
  358. input:
  359. sample=sample_id,
  360. fasta=fasta,
  361. ref_dir=ref_dir,
  362. normal_bam=normal_BQSR.recaled_bam,
  363. normal_bam_index=normal_BQSR.recaled_bam_index,
  364. tumor_bam=tumor_BQSR.recaled_bam,
  365. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  366. baseline=baseline,
  367. docker=msisensor_docker,
  368. cluster_config=cluster_2cpu_4gb,
  369. disk_size=disk_size
  370. }
  371. call HRD.HRD as HRD {
  372. input:
  373. sample=sample_id,
  374. fasta=fasta,
  375. ref_dir=ref_dir,
  376. gc=gc,
  377. normal_bam=normal_BQSR.recaled_bam,
  378. normal_bam_index=normal_BQSR.recaled_bam_index,
  379. tumor_bam=tumor_BQSR.recaled_bam,
  380. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  381. docker=sequenza_docker,
  382. cluster_config=cluster_16cpu_32gb,
  383. disk_size=disk_size
  384. }
  385. call TMB.TMB as TMB {
  386. input:
  387. sample=sample_id,
  388. regions=regions,
  389. snpindel_txt=TNseq_ANNOVAR.multianno_txt,
  390. docker=tmb_docker,
  391. cluster_config=cluster_2cpu_4gb,
  392. disk_size=disk_size
  393. }
  394. call CNVkit.CNVkit as CNVkit {
  395. input:
  396. sample=sample_id,
  397. fasta=fasta,
  398. ref_dir=ref_dir,
  399. regions=regions,
  400. ref_flat=ref_flat,
  401. normal_bam=normal_BQSR.recaled_bam,
  402. normal_bam_index=normal_BQSR.recaled_bam_index,
  403. tumor_bam=tumor_BQSR.recaled_bam,
  404. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  405. hrd=HRD.hrd,
  406. docker=cnvkit_docker,
  407. cluster_config=cluster_2cpu_4gb,
  408. disk_size=disk_size
  409. }
  410. call VarScan.VarScan as VarScan {
  411. input:
  412. sample=sample_id,
  413. normal_bam=normal_BQSR.recaled_bam,
  414. normal_bam_index=normal_BQSR.recaled_bam_index,
  415. tumor_bam=tumor_BQSR.recaled_bam,
  416. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  417. ref_dir=ref_dir,
  418. fasta=fasta,
  419. docker=varscan_docker,
  420. disk_size=disk_size,
  421. cluster_config=cluster_16cpu_32gb
  422. }
  423. call bcftools.bcftools as VarScan_bcftools {
  424. input:
  425. vcf=VarScan.varscan_somatic,
  426. fasta=fasta,
  427. ref_dir=ref_dir,
  428. docker=bcftools_docker,
  429. cluster_config=cluster_2cpu_4gb,
  430. disk_size=disk_size
  431. }
  432. call ANNOVAR.ANNOVAR as VarScan_ANNOVAR {
  433. input:
  434. vcf=VarScan_bcftools.norm_vcf,
  435. annovar_database=annovar_database,
  436. docker=annovar_docker,
  437. cluster_config=cluster_16cpu_32gb,
  438. disk_size=disk_size
  439. }
  440. call TNscope.TNscope as TNscope {
  441. input:
  442. SENTIEON_LICENSE=SENTIEON_LICENSE,
  443. sample=sample_id,
  444. normal_recaled_bam=normal_BQSR.recaled_bam,
  445. normal_recaled_bam_index=normal_BQSR.recaled_bam_index,
  446. tumor_recaled_bam=tumor_BQSR.recaled_bam,
  447. tumor_recaled_bam_index=tumor_BQSR.recaled_bam_index,
  448. normal_name=sample_id + ".N",
  449. tumor_name=sample_id + ".T",
  450. fasta=fasta,
  451. ref_dir=ref_dir,
  452. regions=regions,
  453. interval_padding=interval_padding,
  454. dbsnp=dbsnp,
  455. dbsnp_dir=dbsnp_dir,
  456. docker=sentieon_docker,
  457. cluster_config=cluster_16cpu_32gb,
  458. disk_size=disk_size
  459. }
  460. call bcftools.bcftools as TNscope_bcftools {
  461. input:
  462. vcf=TNscope.TNscope_vcf,
  463. fasta=fasta,
  464. ref_dir=ref_dir,
  465. docker=bcftools_docker,
  466. cluster_config=cluster_2cpu_4gb,
  467. disk_size=disk_size
  468. }
  469. call ANNOVAR.ANNOVAR as TNscope_ANNOVAR {
  470. input:
  471. vcf=TNscope_bcftools.norm_vcf,
  472. annovar_database=annovar_database,
  473. docker=annovar_docker,
  474. cluster_config=cluster_16cpu_32gb,
  475. disk_size=disk_size
  476. }
  477. }