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.

951 lines
25KB

  1. import "./tasks/rename_fastq.wdl" as rename_fastq
  2. import "./tasks/rename_vcf.wdl" as rename_vcf
  3. import "./tasks/mapping.wdl" as mapping
  4. import "./tasks/Dedup.wdl" as Dedup
  5. import "./tasks/qualimap.wdl" as qualimap
  6. import "./tasks/deduped_Metrics.wdl" as deduped_Metrics
  7. import "./tasks/sentieon.wdl" as sentieon
  8. import "./tasks/Realigner.wdl" as Realigner
  9. import "./tasks/BQSR.wdl" as BQSR
  10. import "./tasks/Haplotyper.wdl" as Haplotyper
  11. import "./tasks/benchmark.wdl" as benchmark
  12. import "./tasks/multiqc.wdl" as multiqc
  13. import "./tasks/multiqc_hap.wdl" as multiqc_hap
  14. import "./tasks/merge_sentieon_metrics.wdl" as merge_sentieon_metrics
  15. import "./tasks/extract_tables.wdl" as extract_tables
  16. import "./tasks/extract_tables_vcf.wdl" as extract_tables_vcf
  17. import "./tasks/mendelian.wdl" as mendelian
  18. import "./tasks/merge_mendelian.wdl" as merge_mendelian
  19. import "./tasks/quartet_mendelian.wdl" as quartet_mendelian
  20. import "./tasks/fastqc.wdl" as fastqc
  21. import "./tasks/fastqscreen.wdl" as fastqscreen
  22. import "./tasks/merge_family.wdl" as merge_family
  23. import "./tasks/filter_vcf.wdl" as filter_vcf
  24. import "./tasks/bed_to_interval_list.wdl" as bed_to_interval_list
  25. workflow {{ project_name }} {
  26. File? fastq_1_D5
  27. File? fastq_1_D6
  28. File? fastq_1_F7
  29. File? fastq_1_M8
  30. File? fastq_2_D5
  31. File? fastq_2_D6
  32. File? fastq_2_F7
  33. File? fastq_2_M8
  34. File? vcf_D5
  35. File? vcf_D6
  36. File? vcf_F7
  37. File? vcf_M8
  38. File bed
  39. String REPLACE_SENTIEON_DOCKER
  40. String DEEPVARIANT_DOCKER
  41. String FASTQCdocker
  42. String FASTQSCREENdocker
  43. String QUALIMAPdocker
  44. String BENCHMARKdocker
  45. String MENDELIANdocker
  46. String DIYdocker
  47. String MULTIQCdocker
  48. String BEDTOOLSdocker
  49. String PICARDdocker
  50. String fasta
  51. File ref_dir
  52. File dbmills_dir
  53. String db_mills
  54. File dbsnp_dir
  55. String dbsnp
  56. String pl
  57. File reference_bed_dict
  58. File screen_ref_dir
  59. File fastq_screen_conf
  60. File benchmarking_dir
  61. File benchmark_region
  62. String project
  63. String disk_size
  64. String BIGcluster_config
  65. String SMALLcluster_config
  66. if (fastq_1_D5!= "") {
  67. call bed_to_interval_list.bed_to_interval_list as bed_to_interval_list {
  68. input:
  69. bed=bed,
  70. ref_dir=ref_dir,
  71. fasta=fasta,
  72. interval_list_name=project,
  73. reference_bed_dict=reference_bed_dict,
  74. docker=PICARDdocker,
  75. cluster_config=SMALLcluster_config,
  76. disk_size=disk_size
  77. }
  78. call mapping.mapping as mapping_D5 {
  79. input:
  80. pl=pl,
  81. fasta=fasta,
  82. ref_dir=ref_dir,
  83. fastq_1=fastq_1_D5,
  84. fastq_2=fastq_2_D5,
  85. group=project,
  86. sample='LCL5',
  87. project=project,
  88. docker=REPLACE_SENTIEON_DOCKER,
  89. disk_size=disk_size,
  90. cluster_config=BIGcluster_config
  91. }
  92. call fastqc.fastqc as fastqc_D5 {
  93. input:
  94. read1=fastq_1_D5,
  95. read2=fastq_2_D5,
  96. project=project,
  97. sample="LCL5",
  98. docker=FASTQCdocker,
  99. cluster_config=BIGcluster_config,
  100. disk_size=disk_size
  101. }
  102. call fastqscreen.fastq_screen as fastqscreen_D5 {
  103. input:
  104. read1=fastq_1_D5,
  105. read2=fastq_2_D5,
  106. project=project,
  107. sample="LCL5",
  108. screen_ref_dir=screen_ref_dir,
  109. fastq_screen_conf=fastq_screen_conf,
  110. docker=FASTQSCREENdocker,
  111. cluster_config=BIGcluster_config,
  112. disk_size=disk_size
  113. }
  114. call Dedup.Dedup as Dedup_D5 {
  115. input:
  116. sorted_bam=mapping_D5.sorted_bam,
  117. sorted_bam_index=mapping_D5.sorted_bam_index,
  118. docker=REPLACE_SENTIEON_DOCKER,
  119. disk_size=disk_size,
  120. cluster_config=BIGcluster_config
  121. }
  122. call qualimap.qualimap as qualimap_D5 {
  123. input:
  124. bam=Dedup_D5.Dedup_bam,
  125. bai=Dedup_D5.Dedup_bam_index,
  126. bed=bed,
  127. docker=QUALIMAPdocker,
  128. disk_size=disk_size,
  129. cluster_config=BIGcluster_config
  130. }
  131. call deduped_Metrics.deduped_Metrics as deduped_Metrics_D5 {
  132. input:
  133. fasta=fasta,
  134. ref_dir=ref_dir,
  135. bed=bed,
  136. Dedup_bam=Dedup_D5.Dedup_bam,
  137. Dedup_bam_index=Dedup_D5.Dedup_bam_index,
  138. docker=REPLACE_SENTIEON_DOCKER,
  139. interval_list=bed_to_interval_list.interval_list,
  140. disk_size=disk_size,
  141. cluster_config=BIGcluster_config
  142. }
  143. call sentieon.sentieon as sentieon_D5 {
  144. input:
  145. quality_yield=deduped_Metrics_D5.deduped_QualityYield,
  146. wgs_metrics_algo=deduped_Metrics_D5.deduped_wgsmetrics,
  147. aln_metrics=deduped_Metrics_D5.dedeuped_aln_metrics,
  148. is_metrics=deduped_Metrics_D5.deduped_is_metrics,
  149. hs_metrics=deduped_Metrics_D5.deduped_hsmetrics,
  150. docker=SENTIEONdocker,
  151. cluster_config=SMALLcluster_config,
  152. disk_size=disk_size
  153. }
  154. ## Bam realignment doesn't support in GATK 4
  155. call Realigner.Realigner as Realigner_D5 {
  156. input:
  157. fasta=fasta,
  158. ref_dir=ref_dir,
  159. Dedup_bam=Dedup_D5.Dedup_bam,
  160. Dedup_bam_index=Dedup_D5.Dedup_bam_index,
  161. db_mills=db_mills,
  162. dbmills_dir=dbmills_dir,
  163. docker=REPLACE_SENTIEON_DOCKER,
  164. disk_size=disk_size,
  165. cluster_config=BIGcluster_config
  166. }
  167. call BQSR.BQSR as BQSR_D5{
  168. input:
  169. fasta=fasta,
  170. ref_dir=ref_dir,
  171. realigned_bam=Realigner_M8.realigner_bam,
  172. realigned_bam_index=Realigner_M8.realigner_bam_index,
  173. db_mills=db_mills,
  174. dbmills_dir=dbmills_dir,
  175. dbsnp=dbsnp,
  176. dbsnp_dir=dbsnp_dir,
  177. docker=REPLACE_SENTIEON_DOCKER,
  178. disk_size=disk_size,
  179. cluster_config=BIGcluster_config
  180. }
  181. call Haplotyper.Haplotyper as Haplotyper_D5 {
  182. input:
  183. fasta=fasta,
  184. ref_dir=ref_dir,
  185. recaled_bam=BQSR_D5.recaled_bam,
  186. recaled_bam_index=BQSR_D5.recaled_bam_index,
  187. docker=DEEPVARIANT_DOCKER,
  188. disk_size=disk_size,
  189. cluster_config=BIGcluster_config
  190. }
  191. call filter_vcf.filter_vcf as filter_vcf_D5 {
  192. input:
  193. vcf=Haplotyper_D5.vcf,
  194. docker=BEDTOOLSdocker,
  195. bed=bed,
  196. benchmark_region=benchmark_region,
  197. project=project,
  198. cluster_config=SMALLcluster_config,
  199. disk_size=disk_size
  200. }
  201. call benchmark.benchmark as benchmark_D5 {
  202. input:
  203. filtered_vcf=filter_vcf_D5.filtered_vcf,
  204. benchmarking_dir=benchmarking_dir,
  205. ref_dir=ref_dir,
  206. bed=filter_vcf_D5.filtered_bed,
  207. fasta=fasta,
  208. docker=BENCHMARKdocker,
  209. cluster_config=BIGcluster_config,
  210. disk_size=disk_size
  211. }
  212. call mapping.mapping as mapping_D6 {
  213. input:
  214. pl=pl,
  215. fasta=fasta,
  216. ref_dir=ref_dir,
  217. fastq_1=fastq_1_D6,
  218. fastq_2=fastq_2_D6,
  219. group=project,
  220. sample='LCL6',
  221. project=project,
  222. docker=REPLACE_SENTIEON_DOCKER,
  223. disk_size=disk_size,
  224. cluster_config=BIGcluster_config
  225. }
  226. call fastqc.fastqc as fastqc_D6 {
  227. input:
  228. read1=fastq_1_D6,
  229. read2=fastq_2_D6,
  230. project=project,
  231. sample="LCL6",
  232. docker=FASTQCdocker,
  233. cluster_config=BIGcluster_config,
  234. disk_size=disk_size
  235. }
  236. call fastqscreen.fastq_screen as fastqscreen_D6 {
  237. input:
  238. read1=fastq_1_D6,
  239. read2=fastq_2_D6,
  240. project=project,
  241. sample="LCL6",
  242. screen_ref_dir=screen_ref_dir,
  243. fastq_screen_conf=fastq_screen_conf,
  244. docker=FASTQSCREENdocker,
  245. cluster_config=BIGcluster_config,
  246. disk_size=disk_size
  247. }
  248. call Dedup.Dedup as Dedup_D6 {
  249. input:
  250. sorted_bam=mapping_D6.sorted_bam,
  251. sorted_bam_index=mapping_D6.sorted_bam_index,
  252. docker=REPLACE_SENTIEON_DOCKER,
  253. disk_size=disk_size,
  254. cluster_config=BIGcluster_config
  255. }
  256. call qualimap.qualimap as qualimap_D6 {
  257. input:
  258. bam=Dedup_D6.Dedup_bam,
  259. bai=Dedup_D6.Dedup_bam_index,
  260. bed=bed,
  261. docker=QUALIMAPdocker,
  262. disk_size=disk_size,
  263. cluster_config=BIGcluster_config
  264. }
  265. call deduped_Metrics.deduped_Metrics as deduped_Metrics_D6 {
  266. input:
  267. fasta=fasta,
  268. ref_dir=ref_dir,
  269. bed=bed,
  270. Dedup_bam=Dedup_D6.Dedup_bam,
  271. Dedup_bam_index=Dedup_D6.Dedup_bam_index,
  272. interval_list=bed_to_interval_list.interval_list,
  273. docker=REPLACE_SENTIEON_DOCKER,
  274. disk_size=disk_size,
  275. cluster_config=BIGcluster_config
  276. }
  277. call sentieon.sentieon as sentieon_D6 {
  278. input:
  279. quality_yield=deduped_Metrics_D6.deduped_QualityYield,
  280. wgs_metrics_algo=deduped_Metrics_D6.deduped_wgsmetrics,
  281. aln_metrics=deduped_Metrics_D6.dedeuped_aln_metrics,
  282. is_metrics=deduped_Metrics_D6.deduped_is_metrics,
  283. hs_metrics=deduped_Metrics_D6.deduped_hsmetrics,
  284. docker=SENTIEONdocker,
  285. cluster_config=SMALLcluster_config,
  286. disk_size=disk_size
  287. }
  288. call Realigner.Realigner as Realigner_D6 {
  289. input:
  290. fasta=fasta,
  291. ref_dir=ref_dir,
  292. Dedup_bam=Dedup_D6.Dedup_bam,
  293. Dedup_bam_index=Dedup_D6.Dedup_bam_index,
  294. db_mills=db_mills,
  295. dbmills_dir=dbmills_dir,
  296. docker=REPLACE_SENTIEON_DOCKER,
  297. disk_size=disk_size,
  298. cluster_config=BIGcluster_config
  299. }
  300. call BQSR.BQSR as BQSR_D6 {
  301. input:
  302. fasta=fasta,
  303. ref_dir=ref_dir,
  304. realigned_bam=Realigner_D6.realigner_bam,
  305. realigned_bam_index=Realigner_D6.realigner_bam_index,
  306. db_mills=db_mills,
  307. dbmills_dir=dbmills_dir,
  308. dbsnp=dbsnp,
  309. dbsnp_dir=dbsnp_dir,
  310. docker=REPLACE_SENTIEON_DOCKER,
  311. disk_size=disk_size,
  312. cluster_config=BIGcluster_config
  313. }
  314. call Haplotyper.Haplotyper as Haplotyper_D6 {
  315. input:
  316. fasta=fasta,
  317. ref_dir=ref_dir,
  318. recaled_bam=BQSR_D6.recaled_bam,
  319. recaled_bam_index=BQSR_D6.recaled_bam_index,
  320. docker=DEEPVARIANT_DOCKER,
  321. disk_size=disk_size,
  322. cluster_config=BIGcluster_config
  323. }
  324. call filter_vcf.filter_vcf as filter_vcf_D6 {
  325. input:
  326. vcf=Haplotyper_D6.vcf,
  327. docker=BEDTOOLSdocker,
  328. bed=bed,
  329. benchmark_region=benchmark_region,
  330. project=project,
  331. cluster_config=SMALLcluster_config,
  332. disk_size=disk_size
  333. }
  334. call benchmark.benchmark as benchmark_D6 {
  335. input:
  336. filtered_vcf=filter_vcf_D6.filtered_vcf,
  337. benchmarking_dir=benchmarking_dir,
  338. ref_dir=ref_dir,
  339. bed=filter_vcf_D6.filtered_bed,
  340. fasta=fasta,
  341. docker=BENCHMARKdocker,
  342. cluster_config=BIGcluster_config,
  343. disk_size=disk_size
  344. }
  345. call mapping.mapping as mapping_F7 {
  346. input:
  347. pl=pl,
  348. fasta=fasta,
  349. ref_dir=ref_dir,
  350. fastq_1=fastq_1_F7,
  351. fastq_2=fastq_2_F7,
  352. group=project,
  353. sample='LCL7',
  354. project=project,
  355. docker=REPLACE_SENTIEON_DOCKER,
  356. disk_size=disk_size,
  357. cluster_config=BIGcluster_config
  358. }
  359. call fastqc.fastqc as fastqc_F7 {
  360. input:
  361. read1=fastq_1_F7,
  362. read2=fastq_2_F7,
  363. project=project,
  364. sample="LCL7",
  365. docker=FASTQCdocker,
  366. cluster_config=BIGcluster_config,
  367. disk_size=disk_size
  368. }
  369. call fastqscreen.fastq_screen as fastqscreen_F7 {
  370. input:
  371. read1=fastq_1_F7,
  372. read2=fastq_2_F7,
  373. project=project,
  374. sample="LCL7",
  375. screen_ref_dir=screen_ref_dir,
  376. fastq_screen_conf=fastq_screen_conf,
  377. docker=FASTQSCREENdocker,
  378. cluster_config=BIGcluster_config,
  379. disk_size=disk_size
  380. }
  381. call Dedup.Dedup as Dedup_F7 {
  382. input:
  383. sorted_bam=mapping_F7.sorted_bam,
  384. sorted_bam_index=mapping_F7.sorted_bam_index,
  385. docker=REPLACE_SENTIEON_DOCKER,
  386. disk_size=disk_size,
  387. cluster_config=BIGcluster_config
  388. }
  389. call qualimap.qualimap as qualimap_F7 {
  390. input:
  391. bam=Dedup_F7.Dedup_bam,
  392. bai=Dedup_F7.Dedup_bam_index,
  393. bed=bed,
  394. docker=QUALIMAPdocker,
  395. disk_size=disk_size,
  396. cluster_config=BIGcluster_config
  397. }
  398. call deduped_Metrics.deduped_Metrics as deduped_Metrics_F7 {
  399. input:
  400. fasta=fasta,
  401. ref_dir=ref_dir,
  402. bed=bed,
  403. Dedup_bam=Dedup_F7.Dedup_bam,
  404. Dedup_bam_index=Dedup_F7.Dedup_bam_index,
  405. interval_list=bed_to_interval_list.interval_list,
  406. docker=REPLACE_SENTIEON_DOCKER,
  407. disk_size=disk_size,
  408. cluster_config=BIGcluster_config
  409. }
  410. call sentieon.sentieon as sentieon_F7 {
  411. input:
  412. quality_yield=deduped_Metrics_F7.deduped_QualityYield,
  413. wgs_metrics_algo=deduped_Metrics_F7.deduped_wgsmetrics,
  414. aln_metrics=deduped_Metrics_F7.dedeuped_aln_metrics,
  415. is_metrics=deduped_Metrics_F7.deduped_is_metrics,
  416. hs_metrics=deduped_Metrics_F7.deduped_hsmetrics,
  417. docker=SENTIEONdocker,
  418. cluster_config=SMALLcluster_config,
  419. disk_size=disk_size
  420. }
  421. call Realigner.Realigner as Realigner_F7 {
  422. input:
  423. fasta=fasta,
  424. ref_dir=ref_dir,
  425. Dedup_bam=Dedup_F7.Dedup_bam,
  426. Dedup_bam_index=Dedup_F7.Dedup_bam_index,
  427. db_mills=db_mills,
  428. dbmills_dir=dbmills_dir,
  429. docker=REPLACE_SENTIEON_DOCKER,
  430. disk_size=disk_size,
  431. cluster_config=BIGcluster_config
  432. }
  433. call BQSR.BQSR as BQSR_F7 {
  434. input:
  435. fasta=fasta,
  436. ref_dir=ref_dir,
  437. realigned_bam=Realigner_F7.realigner_bam,
  438. realigned_bam_index=Realigner_F7.realigner_bam_index,
  439. db_mills=db_mills,
  440. dbmills_dir=dbmills_dir,
  441. dbsnp=dbsnp,
  442. dbsnp_dir=dbsnp_dir,
  443. docker=REPLACE_SENTIEON_DOCKER,
  444. disk_size=disk_size,
  445. cluster_config=BIGcluster_config
  446. }
  447. call Haplotyper.Haplotyper as Haplotyper_F7 {
  448. input:
  449. fasta=fasta,
  450. ref_dir=ref_dir,
  451. recaled_bam=BQSR_F7.recaled_bam,
  452. recaled_bam_index=BQSR_F7.recaled_bam_index,
  453. docker=DEEPVARIANT_DOCKER,
  454. disk_size=disk_size,
  455. cluster_config=BIGcluster_config
  456. }
  457. call filter_vcf.filter_vcf as filter_vcf_F7 {
  458. input:
  459. vcf=Haplotyper_F7.vcf,
  460. docker=BEDTOOLSdocker,
  461. bed=bed,
  462. project=project,
  463. benchmark_region=benchmark_region,
  464. cluster_config=SMALLcluster_config,
  465. disk_size=disk_size
  466. }
  467. call benchmark.benchmark as benchmark_F7 {
  468. input:
  469. filtered_vcf=filter_vcf_F7.filtered_vcf,
  470. benchmarking_dir=benchmarking_dir,
  471. ref_dir=ref_dir,
  472. bed=filter_vcf_F7.filtered_bed,
  473. fasta=fasta,
  474. docker=BENCHMARKdocker,
  475. cluster_config=BIGcluster_config,
  476. disk_size=disk_size
  477. }
  478. call mapping.mapping as mapping_M8 {
  479. input:
  480. pl=pl,
  481. fasta=fasta,
  482. ref_dir=ref_dir,
  483. fastq_1=fastq_1_M8,
  484. fastq_2=fastq_2_M8,
  485. group=project,
  486. project=project,
  487. sample='LCL8',
  488. docker=REPLACE_SENTIEON_DOCKER,
  489. disk_size=disk_size,
  490. cluster_config=BIGcluster_config
  491. }
  492. call fastqc.fastqc as fastqc_M8 {
  493. input:
  494. read1=fastq_1_M8,
  495. read2=fastq_2_M8,
  496. project=project,
  497. sample="LCL8",
  498. docker=FASTQCdocker,
  499. cluster_config=BIGcluster_config,
  500. disk_size=disk_size
  501. }
  502. call fastqscreen.fastq_screen as fastqscreen_M8 {
  503. input:
  504. read1=fastq_1_M8,
  505. read2=fastq_2_M8,
  506. project=project,
  507. sample="LCL8",
  508. screen_ref_dir=screen_ref_dir,
  509. fastq_screen_conf=fastq_screen_conf,
  510. docker=FASTQSCREENdocker,
  511. cluster_config=BIGcluster_config,
  512. disk_size=disk_size
  513. }
  514. call Dedup.Dedup as Dedup_M8 {
  515. input:
  516. sorted_bam=mapping_M8.sorted_bam,
  517. sorted_bam_index=mapping_M8.sorted_bam_index,
  518. docker=REPLACE_SENTIEON_DOCKER,
  519. disk_size=disk_size,
  520. cluster_config=BIGcluster_config
  521. }
  522. call qualimap.qualimap as qualimap_M8 {
  523. input:
  524. bam=Dedup_M8.Dedup_bam,
  525. bai=Dedup_M8.Dedup_bam_index,
  526. docker=QUALIMAPdocker,
  527. bed=bed,
  528. disk_size=disk_size,
  529. cluster_config=BIGcluster_config
  530. }
  531. call deduped_Metrics.deduped_Metrics as deduped_Metrics_M8 {
  532. input:
  533. fasta=fasta,
  534. ref_dir=ref_dir,
  535. bed=bed,
  536. Dedup_bam=Dedup_M8.Dedup_bam,
  537. Dedup_bam_index=Dedup_M8.Dedup_bam_index,
  538. interval_list=bed_to_interval_list.interval_list,
  539. docker=REPLACE_SENTIEON_DOCKER,
  540. disk_size=disk_size,
  541. cluster_config=BIGcluster_config
  542. }
  543. call sentieon.sentieon as sentieon_M8 {
  544. input:
  545. quality_yield=deduped_Metrics_M8.deduped_QualityYield,
  546. wgs_metrics_algo=deduped_Metrics_M8.deduped_wgsmetrics,
  547. aln_metrics=deduped_Metrics_M8.dedeuped_aln_metrics,
  548. is_metrics=deduped_Metrics_M8.deduped_is_metrics,
  549. hs_metrics=deduped_Metrics_M8.deduped_hsmetrics,
  550. docker=SENTIEONdocker,
  551. cluster_config=SMALLcluster_config,
  552. disk_size=disk_size
  553. }
  554. call Realigner.Realigner as Realigner_M8 {
  555. input:
  556. fasta=fasta,
  557. ref_dir=ref_dir,
  558. Dedup_bam=Dedup_M8.Dedup_bam,
  559. Dedup_bam_index=Dedup_M8.Dedup_bam_index,
  560. db_mills=db_mills,
  561. dbmills_dir=dbmills_dir,
  562. docker=REPLACE_SENTIEON_DOCKER,
  563. disk_size=disk_size,
  564. cluster_config=BIGcluster_config
  565. }
  566. call BQSR.BQSR as BQSR_M8 {
  567. input:
  568. fasta=fasta,
  569. ref_dir=ref_dir,
  570. realigned_bam=Realigner_M8.realigner_bam,
  571. realigned_bam_index=Realigner_M8.realigner_bam_index,
  572. db_mills=db_mills,
  573. dbmills_dir=dbmills_dir,
  574. dbsnp=dbsnp,
  575. dbsnp_dir=dbsnp_dir,
  576. docker=REPLACE_SENTIEON_DOCKER,
  577. disk_size=disk_size,
  578. cluster_config=BIGcluster_config
  579. }
  580. call Haplotyper.Haplotyper as Haplotyper_M8 {
  581. input:
  582. fasta=fasta,
  583. ref_dir=ref_dir,
  584. recaled_bam=BQSR_M8.recaled_bam,
  585. recaled_bam_index=BQSR_M8.recaled_bam_index,
  586. docker=DEEPVARIANT_DOCKER,
  587. disk_size=disk_size,
  588. cluster_config=BIGcluster_config
  589. }
  590. call filter_vcf.filter_vcf as filter_vcf_M8 {
  591. input:
  592. vcf=Haplotyper_M8.vcf,
  593. docker=BEDTOOLSdocker,
  594. bed=bed,
  595. project=project,
  596. benchmark_region=benchmark_region,
  597. cluster_config=SMALLcluster_config,
  598. disk_size=disk_size
  599. }
  600. call benchmark.benchmark as benchmark_M8 {
  601. input:
  602. filtered_vcf=filter_vcf_M8.filtered_vcf,
  603. benchmarking_dir=benchmarking_dir,
  604. ref_dir=ref_dir,
  605. bed=filter_vcf_M8.filtered_bed,
  606. fasta=fasta,
  607. docker=BENCHMARKdocker,
  608. cluster_config=BIGcluster_config,
  609. disk_size=disk_size
  610. }
  611. Array[File] fastqc_read1_zip = [fastqc_D5.read1_zip, fastqc_D6.read1_zip, fastqc_F7.read1_zip, fastqc_M8.read1_zip]
  612. Array[File] fastqc_read2_zip = [fastqc_D5.read2_zip, fastqc_D6.read2_zip, fastqc_F7.read2_zip, fastqc_M8.read2_zip]
  613. Array[File] fastqscreen_txt1 = [fastqscreen_D5.txt1, fastqscreen_D6.txt1, fastqscreen_F7.txt1, fastqscreen_M8.txt1]
  614. Array[File] fastqscreen_txt2 = [fastqscreen_D5.txt2, fastqscreen_D6.txt2, fastqscreen_F7.txt2, fastqscreen_M8.txt2]
  615. Array[File] benchmark_summary = [benchmark_D5.summary, benchmark_D6.summary, benchmark_F7.summary, benchmark_M8.summary]
  616. call multiqc.multiqc as multiqc_big {
  617. input:
  618. read1_zip=fastqc_read1_zip,
  619. read2_zip=fastqc_read2_zip,
  620. txt1=fastqscreen_txt1,
  621. txt2=fastqscreen_txt2,
  622. summary=benchmark_summary,
  623. docker=MULTIQCdocker,
  624. cluster_config=SMALLcluster_config,
  625. disk_size=disk_size
  626. }
  627. Array[File] sentieon_quality_yield_header = [sentieon_D5.quality_yield_header, sentieon_D6.quality_yield_header, sentieon_F7.quality_yield_header, sentieon_M8.quality_yield_header]
  628. Array[File] sentieon_wgs_metrics_algo_header = [sentieon_D5.wgs_metrics_algo_header, sentieon_D6.wgs_metrics_algo_header, sentieon_F7.wgs_metrics_algo_header, sentieon_M8.wgs_metrics_algo_header]
  629. Array[File] sentieon_aln_metrics_header = [sentieon_D5.aln_metrics_header, sentieon_D6.aln_metrics_header, sentieon_F7.aln_metrics_header, sentieon_M8.aln_metrics_header]
  630. Array[File] sentieon_is_metrics_header = [sentieon_D5.is_metrics_header, sentieon_D6.is_metrics_header, sentieon_F7.is_metrics_header, sentieon_M8.is_metrics_header]
  631. Array[File] sentieon_hs_metrics_header = [sentieon_D5.hs_metrics_header, sentieon_D6.hs_metrics_header, sentieon_F7.hs_metrics_header, sentieon_M8.hs_metrics_header]
  632. Array[File] sentieon_quality_yield_data = [sentieon_D5.quality_yield_data, sentieon_D6.quality_yield_data, sentieon_F7.quality_yield_data, sentieon_M8.quality_yield_data]
  633. Array[File] sentieon_wgs_metrics_algo_data = [sentieon_D5.wgs_metrics_algo_data, sentieon_D6.wgs_metrics_algo_data, sentieon_F7.wgs_metrics_algo_data, sentieon_M8.wgs_metrics_algo_data]
  634. Array[File] sentieon_aln_metrics_data = [sentieon_D5.aln_metrics_data, sentieon_D6.aln_metrics_data, sentieon_F7.aln_metrics_data, sentieon_M8.aln_metrics_data]
  635. Array[File] sentieon_is_metrics_data = [sentieon_D5.is_metrics_data, sentieon_D6.is_metrics_data, sentieon_F7.is_metrics_data, sentieon_M8.is_metrics_data]
  636. Array[File] sentieon_hs_metrics_data = [sentieon_D5.hs_metrics_data, sentieon_D6.hs_metrics_data, sentieon_F7.hs_metrics_data, sentieon_M8.hs_metrics_data]
  637. call merge_sentieon_metrics.merge_sentieon_metrics as merge_sentieon_metrics {
  638. input:
  639. quality_yield_header=sentieon_quality_yield_header,
  640. wgs_metrics_algo_header=sentieon_wgs_metrics_algo_header,
  641. aln_metrics_header=sentieon_aln_metrics_header,
  642. is_metrics_header=sentieon_is_metrics_header,
  643. hs_metrics_header=sentieon_hs_metrics_header,
  644. quality_yield_data=sentieon_quality_yield_data,
  645. wgs_metrics_algo_data=sentieon_wgs_metrics_algo_data,
  646. aln_metrics_data=sentieon_aln_metrics_data,
  647. is_metrics_data=sentieon_is_metrics_data,
  648. hs_metrics_data=sentieon_hs_metrics_data,
  649. project=project,
  650. docker=MULTIQCdocker,
  651. cluster_config=SMALLcluster_config,
  652. disk_size=disk_size
  653. }
  654. call extract_tables.extract_tables as extract_tables {
  655. input:
  656. quality_yield_summary=merge_sentieon_metrics.quality_yield_summary,
  657. wgs_metrics_summary=merge_sentieon_metrics.wgs_metrics_summary,
  658. aln_metrics_summary=merge_sentieon_metrics.aln_metrics_summary,
  659. is_metrics_summary=merge_sentieon_metrics.is_metrics_summary,
  660. hs_metrics_summary=merge_sentieon_metrics.hs_metrics_summary,
  661. fastqc=multiqc_big.fastqc,
  662. fastqscreen=multiqc_big.fastqscreen,
  663. hap=multiqc_big.hap,
  664. project=project,
  665. docker=DIYdocker,
  666. cluster_config=SMALLcluster_config,
  667. disk_size=disk_size
  668. }
  669. call merge_family.merge_family as merge_family {
  670. input:
  671. D5_vcf=benchmark_D5.rtg_vcf,
  672. D6_vcf=benchmark_D6.rtg_vcf,
  673. F7_vcf=benchmark_F7.rtg_vcf,
  674. M8_vcf=benchmark_M8.rtg_vcf,
  675. D5_vcf_tbi=benchmark_D5.rtg_vcf_index,
  676. D6_vcf_tbi=benchmark_D6.rtg_vcf_index,
  677. F7_vcf_tbi=benchmark_F7.rtg_vcf_index,
  678. M8_vcf_tbi=benchmark_M8.rtg_vcf_index,
  679. project=project,
  680. docker=BENCHMARKdocker,
  681. cluster_config=SMALLcluster_config,
  682. disk_size=disk_size,
  683. }
  684. call mendelian.mendelian as mendelian {
  685. input:
  686. family_vcf=merge_family.family_vcf,
  687. ref_dir=ref_dir,
  688. fasta=fasta,
  689. docker=MENDELIANdocker,
  690. cluster_config=BIGcluster_config,
  691. disk_size=disk_size
  692. }
  693. call merge_mendelian.merge_mendelian as merge_mendelian {
  694. input:
  695. D5_trio_vcf=mendelian.D5_trio_vcf,
  696. D6_trio_vcf=mendelian.D6_trio_vcf,
  697. family_vcf=merge_family.family_vcf,
  698. docker=DIYdocker,
  699. cluster_config=SMALLcluster_config,
  700. disk_size=disk_size
  701. }
  702. }
  703. if (vcf_D5!= "") {
  704. call rename_vcf.rename_vcf as rename_vcf{
  705. input:
  706. vcf_D5=vcf_D5,
  707. vcf_D6=vcf_D6,
  708. vcf_F7=vcf_F7,
  709. vcf_M8=vcf_M8,
  710. project=project,
  711. docker=DIYdocker,
  712. cluster_config=SMALLcluster_config,
  713. disk_size=disk_size
  714. }
  715. call filter_vcf.filter_vcf as filter_vcf_D5_vcf {
  716. input:
  717. vcf=rename_vcf.vcf_D5_renamed,
  718. bed=bed,
  719. benchmark_region=benchmark_region,
  720. project=project,
  721. docker=BEDTOOLSdocker,
  722. cluster_config=SMALLcluster_config,
  723. disk_size=disk_size
  724. }
  725. call benchmark.benchmark as benchmark_D5_vcf {
  726. input:
  727. filtered_vcf=filter_vcf_D5_vcf.filtered_vcf,
  728. bed=filter_vcf_D5_vcf.filtered_bed,
  729. benchmarking_dir=benchmarking_dir,
  730. ref_dir=ref_dir,
  731. fasta=fasta,
  732. docker=BENCHMARKdocker,
  733. cluster_config=BIGcluster_config,
  734. disk_size=disk_size
  735. }
  736. call filter_vcf.filter_vcf as filter_vcf_D6_vcf {
  737. input:
  738. vcf=rename_vcf.vcf_D6_renamed,
  739. docker=BEDTOOLSdocker,
  740. bed=bed,
  741. benchmark_region=benchmark_region,
  742. project=project,
  743. cluster_config=SMALLcluster_config,
  744. disk_size=disk_size
  745. }
  746. call benchmark.benchmark as benchmark_D6_vcf {
  747. input:
  748. filtered_vcf=filter_vcf_D6_vcf.filtered_vcf,
  749. bed=filter_vcf_D6_vcf.filtered_bed,
  750. benchmarking_dir=benchmarking_dir,
  751. ref_dir=ref_dir,
  752. fasta=fasta,
  753. docker=BENCHMARKdocker,
  754. cluster_config=BIGcluster_config,
  755. disk_size=disk_size
  756. }
  757. call filter_vcf.filter_vcf as filter_vcf_F7_vcf {
  758. input:
  759. vcf=rename_vcf.vcf_F7_renamed,
  760. docker=BEDTOOLSdocker,
  761. bed=bed,
  762. benchmark_region=benchmark_region,
  763. project=project,
  764. cluster_config=SMALLcluster_config,
  765. disk_size=disk_size
  766. }
  767. call benchmark.benchmark as benchmark_F7_vcf {
  768. input:
  769. filtered_vcf=filter_vcf_F7_vcf.filtered_vcf,
  770. bed=filter_vcf_F7_vcf.filtered_bed,
  771. benchmarking_dir=benchmarking_dir,
  772. ref_dir=ref_dir,
  773. fasta=fasta,
  774. docker=BENCHMARKdocker,
  775. cluster_config=BIGcluster_config,
  776. disk_size=disk_size
  777. }
  778. call filter_vcf.filter_vcf as filter_vcf_M8_vcf {
  779. input:
  780. vcf=rename_vcf.vcf_M8_renamed,
  781. docker=BEDTOOLSdocker,
  782. bed=bed,
  783. benchmark_region=benchmark_region,
  784. project=project,
  785. cluster_config=SMALLcluster_config,
  786. disk_size=disk_size
  787. }
  788. call benchmark.benchmark as benchmark_M8_vcf {
  789. input:
  790. filtered_vcf=filter_vcf_M8_vcf.filtered_vcf,
  791. bed=filter_vcf_M8_vcf.filtered_bed,
  792. benchmarking_dir=benchmarking_dir,
  793. ref_dir=ref_dir,
  794. fasta=fasta,
  795. docker=BENCHMARKdocker,
  796. cluster_config=BIGcluster_config,
  797. disk_size=disk_size
  798. }
  799. Array[File] benchmark_summary_hap = [benchmark_D5_vcf.summary, benchmark_D6_vcf.summary, benchmark_F7_vcf.summary, benchmark_M8_vcf.summary]
  800. call multiqc_hap.multiqc_hap as multiqc_hap {
  801. input:
  802. summary=benchmark_summary_hap,
  803. docker=MULTIQCdocker,
  804. cluster_config=SMALLcluster_config,
  805. disk_size=disk_size
  806. }
  807. call extract_tables_vcf.extract_tables_vcf as extract_tables_vcf {
  808. input:
  809. hap=multiqc_hap.hap,
  810. project=project,
  811. docker=DIYdocker,
  812. cluster_config=SMALLcluster_config,
  813. disk_size=disk_size
  814. }
  815. call merge_family.merge_family as merge_family_vcf {
  816. input:
  817. D5_vcf=benchmark_D5_vcf.rtg_vcf,
  818. D6_vcf=benchmark_D6_vcf.rtg_vcf,
  819. F7_vcf=benchmark_F7_vcf.rtg_vcf,
  820. M8_vcf=benchmark_M8_vcf.rtg_vcf,
  821. D5_vcf_tbi=benchmark_D5_vcf.rtg_vcf_index,
  822. D6_vcf_tbi=benchmark_D6_vcf.rtg_vcf_index,
  823. F7_vcf_tbi=benchmark_F7_vcf.rtg_vcf_index,
  824. M8_vcf_tbi=benchmark_M8_vcf.rtg_vcf_index,
  825. project=project,
  826. docker=BENCHMARKdocker,
  827. cluster_config=SMALLcluster_config,
  828. disk_size=disk_size,
  829. }
  830. call mendelian.mendelian as mendelian_vcf {
  831. input:
  832. family_vcf=merge_family_vcf.family_vcf,
  833. ref_dir=ref_dir,
  834. fasta=fasta,
  835. docker=MENDELIANdocker,
  836. cluster_config=BIGcluster_config,
  837. disk_size=disk_size
  838. }
  839. call merge_mendelian.merge_mendelian as merge_mendelian_vcf {
  840. input:
  841. D5_trio_vcf=mendelian_vcf.D5_trio_vcf,
  842. D6_trio_vcf=mendelian_vcf.D6_trio_vcf,
  843. family_vcf=merge_family_vcf.family_vcf,
  844. docker=DIYdocker,
  845. cluster_config=SMALLcluster_config,
  846. disk_size=disk_size
  847. }
  848. }
  849. }