Germline & Somatic short variant discovery (SNVs + Indels) for WGS & WES.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

745 行
21KB

  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/TNscope.wdl" as TNscope
  9. import "./tasks/somatic.wdl" as somatic
  10. import "./tasks/processSomatic.wdl" as processSomatic
  11. import "./tasks/somaticFilter.wdl" as somaticFilter
  12. import "./tasks/replaceRG.wdl" as replaceRG
  13. import "./tasks/pindel.wdl" as pindel
  14. import "./tasks/ANNOVAR.wdl" as ANNOVAR
  15. import "./tasks/VEP.wdl" as VEP
  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. File? tumor_deduped_bam
  23. File? normal_deduped_bam
  24. Boolean input_fastq
  25. Boolean input_bam
  26. String SENTIEON_INSTALL_DIR
  27. String SENTIEON_LICENSE
  28. String sentieon_docker
  29. String varscan_docker
  30. String pindel_docker
  31. String samtools_docker
  32. String annovar_docker
  33. String vep_docker
  34. String pl
  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. String hg
  44. File annovar_database
  45. File? regions
  46. Int? interval_padding
  47. File? tnseq_pon
  48. File? tnscope_pon
  49. String vep_path
  50. File cache
  51. String species
  52. String vcf2maf_path
  53. String disk_size
  54. String cluster_config
  55. Boolean haplotyper
  56. Boolean tnseq
  57. Boolean tnscope
  58. Boolean varscan
  59. Boolean annovar
  60. Boolean vep
  61. Boolean only_pass
  62. if (input_fastq) {
  63. if (tumor_fastq_1!= "") {
  64. call mapping.mapping as tumor_mapping {
  65. input:
  66. group=sample_id + '.T',
  67. sample=sample_id + '.T',
  68. fastq_1=tumor_fastq_1,
  69. fastq_2=tumor_fastq_2,
  70. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  71. SENTIEON_LICENSE=SENTIEON_LICENSE,
  72. pl=pl,
  73. fasta=fasta,
  74. ref_dir=ref_dir,
  75. docker=sentieon_docker,
  76. disk_size=disk_size,
  77. cluster_config=cluster_config
  78. }
  79. call Metrics.Metrics as tumor_Metrics {
  80. input:
  81. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  82. SENTIEON_LICENSE=SENTIEON_LICENSE,
  83. fasta=fasta,
  84. ref_dir=ref_dir,
  85. sorted_bam=tumor_mapping.sorted_bam,
  86. sorted_bam_index=tumor_mapping.sorted_bam_index,
  87. sample=sample_id + '.T',
  88. docker=sentieon_docker,
  89. disk_size=disk_size,
  90. cluster_config=cluster_config
  91. }
  92. call Dedup.Dedup as tumor_Dedup {
  93. input:
  94. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  95. SENTIEON_LICENSE=SENTIEON_LICENSE,
  96. sorted_bam=tumor_mapping.sorted_bam,
  97. sorted_bam_index=tumor_mapping.sorted_bam_index,
  98. sample=sample_id + '.T',
  99. docker=sentieon_docker,
  100. disk_size=disk_size,
  101. cluster_config=cluster_config
  102. }
  103. call deduped_Metrics.deduped_Metrics as tumor_deduped_Metrics {
  104. input:
  105. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  106. SENTIEON_LICENSE=SENTIEON_LICENSE,
  107. fasta=fasta,
  108. ref_dir=ref_dir,
  109. deduped_bam=tumor_Dedup.deduped_bam,
  110. deduped_bam_index=tumor_Dedup.deduped_bam_index,
  111. sample=sample_id + '.T',
  112. docker=sentieon_docker,
  113. disk_size=disk_size,
  114. cluster_config=cluster_config
  115. }
  116. call BQSR.BQSR as tumor_BQSR {
  117. input:
  118. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  119. SENTIEON_LICENSE=SENTIEON_LICENSE,
  120. fasta=fasta,
  121. ref_dir=ref_dir,
  122. deduped_bam=tumor_Dedup.deduped_bam,
  123. deduped_bam_index=tumor_Dedup.deduped_bam_index,
  124. db_mills=db_mills,
  125. dbmills_dir=dbmills_dir,
  126. dbsnp=dbsnp,
  127. dbsnp_dir=dbsnp_dir,
  128. sample=sample_id + '.T',
  129. docker=sentieon_docker,
  130. disk_size=disk_size,
  131. cluster_config=cluster_config
  132. }
  133. }
  134. if (normal_fastq_1!= "") {
  135. call mapping.mapping as normal_mapping {
  136. input:
  137. group=sample_id + '.N',
  138. sample=sample_id + '.N',
  139. fastq_1=normal_fastq_1,
  140. fastq_2=normal_fastq_2,
  141. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  142. SENTIEON_LICENSE=SENTIEON_LICENSE,
  143. pl=pl,
  144. fasta=fasta,
  145. ref_dir=ref_dir,
  146. docker=sentieon_docker,
  147. disk_size=disk_size,
  148. cluster_config=cluster_config
  149. }
  150. call Metrics.Metrics as normal_Metrics {
  151. input:
  152. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  153. SENTIEON_LICENSE=SENTIEON_LICENSE,
  154. fasta=fasta,
  155. ref_dir=ref_dir,
  156. sorted_bam=normal_mapping.sorted_bam,
  157. sorted_bam_index=normal_mapping.sorted_bam_index,
  158. sample=sample_id + '.N',
  159. regions=regions,
  160. docker=sentieon_docker,
  161. disk_size=disk_size,
  162. cluster_config=cluster_config
  163. }
  164. call Dedup.Dedup as normal_Dedup {
  165. input:
  166. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  167. SENTIEON_LICENSE=SENTIEON_LICENSE,
  168. sorted_bam=normal_mapping.sorted_bam,
  169. sorted_bam_index=normal_mapping.sorted_bam_index,
  170. sample=sample_id + '.N',
  171. docker=sentieon_docker,
  172. disk_size=disk_size,
  173. cluster_config=cluster_config
  174. }
  175. call deduped_Metrics.deduped_Metrics as normal_deduped_Metrics {
  176. input:
  177. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  178. SENTIEON_LICENSE=SENTIEON_LICENSE,
  179. fasta=fasta,
  180. ref_dir=ref_dir,
  181. deduped_bam=normal_Dedup.deduped_bam,
  182. deduped_bam_index=normal_Dedup.deduped_bam_index,
  183. sample=sample_id + '.N',
  184. regions=regions,
  185. docker=sentieon_docker,
  186. disk_size=disk_size,
  187. cluster_config=cluster_config
  188. }
  189. call BQSR.BQSR as normal_BQSR {
  190. input:
  191. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  192. SENTIEON_LICENSE=SENTIEON_LICENSE,
  193. fasta=fasta,
  194. ref_dir=ref_dir,
  195. deduped_bam=normal_Dedup.deduped_bam,
  196. deduped_bam_index=normal_Dedup.deduped_bam_index,
  197. db_mills=db_mills,
  198. dbmills_dir=dbmills_dir,
  199. dbsnp=dbsnp,
  200. dbsnp_dir=dbsnp_dir,
  201. sample=sample_id + '.N',
  202. docker=sentieon_docker,
  203. disk_size=disk_size,
  204. cluster_config=cluster_config
  205. }
  206. }
  207. if (haplotyper) {
  208. call Haplotyper.Haplotyper as Haplotyper {
  209. input:
  210. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  211. SENTIEON_LICENSE=SENTIEON_LICENSE,
  212. sample=sample_id + '.N',
  213. fasta=fasta,
  214. ref_dir=ref_dir,
  215. recaled_bam=normal_BQSR.recaled_bam,
  216. recaled_bam_index=normal_BQSR.recaled_bam_index,
  217. dbsnp=dbsnp,
  218. dbsnp_dir=dbsnp_dir,
  219. regions=regions,
  220. docker=sentieon_docker,
  221. disk_size=disk_size,
  222. cluster_config=cluster_config
  223. }
  224. }
  225. if (pindel) {
  226. call pindel.pindel as pindel {
  227. input:
  228. sample_id=sample_id + '.N',
  229. bam=normal_BQSR.recaled_bam,
  230. bam_index=normal_BQSR.recaled_bam_index,
  231. fasta=fasta,
  232. ref_dir=ref_dir,
  233. docker=pindel_docker,
  234. disk_size=disk_size,
  235. cluster_config=cluster_config
  236. }
  237. }
  238. if (tnseq) {
  239. call TNseq.TNseq as TNseq {
  240. input:
  241. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  242. SENTIEON_LICENSE=SENTIEON_LICENSE,
  243. sample=sample_id,
  244. normal_recaled_bam=normal_BQSR.recaled_bam,
  245. normal_recaled_bam_index=normal_BQSR.recaled_bam_index,
  246. tumor_recaled_bam=tumor_BQSR.recaled_bam,
  247. tumor_recaled_bam_index=tumor_BQSR.recaled_bam_index,
  248. normal_name=sample_id + ".N",
  249. tumor_name=sample_id + ".T",
  250. fasta=fasta,
  251. ref_dir=ref_dir,
  252. regions=regions,
  253. interval_padding=interval_padding,
  254. germline_resource=germline_resource,
  255. germline_resource_tbi=germline_resource_tbi,
  256. pon_vcf=tnseq_pon,
  257. docker=sentieon_docker,
  258. cluster_config=cluster_config,
  259. disk_size=disk_size
  260. }
  261. if (annovar) {
  262. call ANNOVAR.ANNOVAR as TNseq_annovar {
  263. input:
  264. vcf=TNseq.TNseq_filter_vcf,
  265. hg=hg,
  266. only_pass=only_pass,
  267. annovar_database=annovar_database,
  268. docker=annovar_docker,
  269. cluster_config=cluster_config,
  270. disk_size=disk_size
  271. }
  272. }
  273. if (vep) {
  274. call VEP.VEP as TNseq_VEP {
  275. input:
  276. vcf=TNseq.TNseq_filter_vcf,
  277. hg=hg,
  278. only_pass=only_pass,
  279. sample_id=sample_id,
  280. tumor_id=sample_id + ".T",
  281. normal_id=sample_id + ".N",
  282. ref_dir=ref_dir,
  283. fasta=fasta,
  284. vep_path=vep_path,
  285. cache=cache,
  286. species=species,
  287. vcf2maf_path=vcf2maf_path,
  288. docker=vep_docker,
  289. cluster_config=cluster_config,
  290. disk_size=disk_size
  291. }
  292. }
  293. }
  294. if (tnscope) {
  295. call TNscope.TNscope as TNscope {
  296. input:
  297. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  298. SENTIEON_LICENSE=SENTIEON_LICENSE,
  299. sample=sample_id,
  300. normal_recaled_bam=normal_BQSR.recaled_bam,
  301. normal_recaled_bam_index=normal_BQSR.recaled_bam_index,
  302. tumor_recaled_bam=tumor_BQSR.recaled_bam,
  303. tumor_recaled_bam_index=tumor_BQSR.recaled_bam_index,
  304. normal_name=sample_id + ".N",
  305. tumor_name=sample_id + ".T",
  306. fasta=fasta,
  307. ref_dir=ref_dir,
  308. regions=regions,
  309. interval_padding=interval_padding,
  310. dbsnp=dbsnp,
  311. dbsnp_dir=dbsnp_dir,
  312. pon_vcf=tnscope_pon,
  313. docker=sentieon_docker,
  314. cluster_config=cluster_config,
  315. disk_size=disk_size
  316. }
  317. if (annovar) {
  318. call ANNOVAR.ANNOVAR as TNscope_annovar {
  319. input:
  320. vcf=TNscope.TNscope_vcf,
  321. hg=hg,
  322. only_pass=only_pass,
  323. annovar_database=annovar_database,
  324. docker=annovar_docker,
  325. cluster_config=cluster_config,
  326. disk_size=disk_size
  327. }
  328. }
  329. if (vep) {
  330. call VEP.VEP as TNscope_VEP {
  331. input:
  332. vcf=TNscope.TNscope_vcf,
  333. hg=hg,
  334. only_pass=only_pass,
  335. sample_id=sample_id,
  336. tumor_id=sample_id + ".T",
  337. normal_id=sample_id + ".N",
  338. ref_dir=ref_dir,
  339. fasta=fasta,
  340. vep_path=vep_path,
  341. cache=cache,
  342. species=species,
  343. vcf2maf_path=vcf2maf_path,
  344. docker=vep_docker,
  345. cluster_config=cluster_config,
  346. disk_size=disk_size
  347. }
  348. }
  349. }
  350. if (varscan) {
  351. call somatic.somatic as somatic {
  352. input:
  353. sample=sample_id,
  354. normal_bam=normal_BQSR.recaled_bam,
  355. normal_bam_index=normal_BQSR.recaled_bam_index,
  356. tumor_bam=tumor_BQSR.recaled_bam,
  357. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  358. ref_dir=ref_dir,
  359. fasta=fasta,
  360. docker=varscan_docker,
  361. disk_size=disk_size,
  362. cluster_config=cluster_config
  363. }
  364. call processSomatic.processSomatic as processSomatic {
  365. input:
  366. sample=sample_id,
  367. varscan_snp=somatic.varscan_snp,
  368. varscan_indel=somatic.varscan_indel,
  369. docker=varscan_docker,
  370. disk_size=disk_size,
  371. cluster_config=cluster_config
  372. }
  373. call somaticFilter.somaticFilter as somaticFilter {
  374. input:
  375. sample=sample_id,
  376. varscan_snp_somatic_hc=processSomatic.varscan_snp_somatic_hc,
  377. varscan_snp_germline_hc=processSomatic.varscan_snp_germline_hc,
  378. varscan_snp_loh_hc=processSomatic.varscan_snp_loh_hc,
  379. varscan_indel_somatic_hc=processSomatic.varscan_indel_somatic_hc,
  380. varscan_indel_germline_hc=processSomatic.varscan_indel_germline_hc,
  381. varscan_indel_loh_hc=processSomatic.varscan_indel_loh_hc,
  382. varscan_indel=somatic.varscan_indel,
  383. docker=varscan_docker,
  384. disk_size=disk_size,
  385. cluster_config=cluster_config
  386. }
  387. if (annovar) {
  388. call ANNOVAR.ANNOVAR as VarScan_annovar {
  389. input:
  390. vcf=somaticFilter.varscan_somatic_filter,
  391. hg=hg,
  392. only_pass=only_pass,
  393. annovar_database=annovar_database,
  394. docker=annovar_docker,
  395. cluster_config=cluster_config,
  396. disk_size=disk_size
  397. }
  398. }
  399. if (vep) {
  400. call VEP.VEP as VarScan_VEP {
  401. input:
  402. vcf=somaticFilter.varscan_somatic_filter,
  403. hg=hg,
  404. only_pass=only_pass,
  405. sample_id=sample_id,
  406. tumor_id=sample_id + ".T",
  407. normal_id=sample_id + ".N",
  408. ref_dir=ref_dir,
  409. fasta=fasta,
  410. vep_path=vep_path,
  411. cache=cache,
  412. species=species,
  413. vcf2maf_path=vcf2maf_path,
  414. docker=vep_docker,
  415. cluster_config=cluster_config,
  416. disk_size=disk_size
  417. }
  418. }
  419. }
  420. }
  421. if (input_bam) {
  422. if (tumor_deduped_bam != "") {
  423. call replaceRG.replaceRG as tumor_replaceRG {
  424. input:
  425. bam=tumor_deduped_bam,
  426. group=group_id + '.T',
  427. sample=sample_id + '.T',
  428. pl=pl,
  429. docker=samtools_docker,
  430. disk_size=disk_size,
  431. cluster_config=cluster_config
  432. }
  433. call BQSR.BQSR as tumor_BQSR_fb {
  434. input:
  435. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  436. SENTIEON_LICENSE=SENTIEON_LICENSE,
  437. fasta=fasta,
  438. ref_dir=ref_dir,
  439. deduped_bam=tumor_replaceRG.bam,
  440. deduped_bam_index=tumor_replaceRG.bam_index,
  441. db_mills=db_mills,
  442. dbmills_dir=dbmills_dir,
  443. dbsnp=dbsnp,
  444. dbsnp_dir=dbsnp_dir,
  445. sample=sample_id + '.T',
  446. docker=sentieon_docker,
  447. disk_size=disk_size,
  448. cluster_config=cluster_config
  449. }
  450. }
  451. if (normal_deduped_bam != "") {
  452. call replaceRG.replaceRG as normal_replaceRG {
  453. input:
  454. bam=normal_deduped_bam,
  455. group=group_id + '.N',
  456. sample=sample_id + '.N',
  457. pl=pl,
  458. docker=samtools_docker,
  459. disk_size=disk_size,
  460. cluster_config=cluster_config
  461. }
  462. call BQSR.BQSR as normal_BQSR_fb {
  463. input:
  464. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  465. SENTIEON_LICENSE=SENTIEON_LICENSE,
  466. fasta=fasta,
  467. ref_dir=ref_dir,
  468. deduped_bam=normal_replaceRG.bam,
  469. deduped_bam_index=normal_replaceRG.bam_index,
  470. db_mills=db_mills,
  471. dbmills_dir=dbmills_dir,
  472. dbsnp=dbsnp,
  473. dbsnp_dir=dbsnp_dir,
  474. sample=sample_id + '.N',
  475. docker=sentieon_docker,
  476. disk_size=disk_size,
  477. cluster_config=cluster_config
  478. }
  479. }
  480. if (haplotyper) {
  481. call Haplotyper.Haplotyper as Haplotyper_fb {
  482. input:
  483. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  484. SENTIEON_LICENSE=SENTIEON_LICENSE,
  485. sample=sample_id + '.N',
  486. fasta=fasta,
  487. ref_dir=ref_dir,
  488. recaled_bam=normal_BQSR_fb.recaled_bam,
  489. recaled_bam_index=normal_BQSR_fb.recaled_bam_index,
  490. dbsnp=dbsnp,
  491. dbsnp_dir=dbsnp_dir,
  492. regions=regions,
  493. docker=sentieon_docker,
  494. disk_size=disk_size,
  495. cluster_config=cluster_config
  496. }
  497. }
  498. if (pindel) {
  499. call pindel.pindel as pindel_fb {
  500. input:
  501. sample_id=sample_id + '.N',
  502. bam=normal_BQSR_fb.recaled_bam,
  503. bam_index=normal_BQSR_fb.recaled_bam_index,
  504. fasta=fasta,
  505. ref_dir=ref_dir,
  506. docker=pindel_docker,
  507. disk_size=disk_size,
  508. cluster_config=cluster_config
  509. }
  510. }
  511. if (tnseq) {
  512. call TNseq.TNseq as TNseq_fb {
  513. input:
  514. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  515. SENTIEON_LICENSE=SENTIEON_LICENSE,
  516. sample=sample_id,
  517. normal_recaled_bam=normal_BQSR_fb.recaled_bam,
  518. normal_recaled_bam_index=normal_BQSR_fb.recaled_bam_index,
  519. tumor_recaled_bam=tumor_BQSR_fb.recaled_bam,
  520. tumor_recaled_bam_index=tumor_BQSR_fb.recaled_bam_index,
  521. normal_name=sample_id + ".N",
  522. tumor_name=sample_id + ".T",
  523. fasta=fasta,
  524. ref_dir=ref_dir,
  525. regions=regions,
  526. interval_padding=interval_padding,
  527. germline_resource=germline_resource,
  528. germline_resource_tbi=germline_resource_tbi,
  529. pon_vcf=tnseq_pon,
  530. docker=sentieon_docker,
  531. cluster_config=cluster_config,
  532. disk_size=disk_size
  533. }
  534. if (annovar) {
  535. call ANNOVAR.ANNOVAR as TNseq_annovar_fb {
  536. input:
  537. vcf=TNseq_fb.TNseq_filter_vcf,
  538. hg=hg,
  539. only_pass=only_pass,
  540. annovar_database=annovar_database,
  541. docker=annovar_docker,
  542. cluster_config=cluster_config,
  543. disk_size=disk_size
  544. }
  545. }
  546. if (vep) {
  547. call VEP.VEP as TNseq_VEP_fb {
  548. input:
  549. vcf=TNseq_fb.TNseq_filter_vcf,
  550. hg=hg,
  551. only_pass=only_pass,
  552. sample_id=sample_id,
  553. tumor_id=sample_id + ".T",
  554. normal_id=sample_id + ".N",
  555. ref_dir=ref_dir,
  556. fasta=fasta,
  557. vep_path=vep_path,
  558. cache=cache,
  559. species=species,
  560. vcf2maf_path=vcf2maf_path,
  561. docker=vep_docker,
  562. cluster_config=cluster_config,
  563. disk_size=disk_size
  564. }
  565. }
  566. }
  567. if (tnscope) {
  568. call TNscope.TNscope as TNscope_fb {
  569. input:
  570. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  571. SENTIEON_LICENSE=SENTIEON_LICENSE,
  572. sample=sample_id,
  573. normal_recaled_bam=normal_BQSR_fb.recaled_bam,
  574. normal_recaled_bam_index=normal_BQSR_fb.recaled_bam_index,
  575. tumor_recaled_bam=tumor_BQSR_fb.recaled_bam,
  576. tumor_recaled_bam_index=tumor_BQSR_fb.recaled_bam_index,
  577. normal_name=sample_id + ".N",
  578. tumor_name=sample_id + ".T",
  579. fasta=fasta,
  580. ref_dir=ref_dir,
  581. regions=regions,
  582. interval_padding=interval_padding,
  583. dbsnp=dbsnp,
  584. dbsnp_dir=dbsnp_dir,
  585. pon_vcf=tnscope_pon,
  586. docker=sentieon_docker,
  587. cluster_config=cluster_config,
  588. disk_size=disk_size
  589. }
  590. if (annovar) {
  591. call ANNOVAR.ANNOVAR as TNscope_annovar_fb {
  592. input:
  593. vcf=TNscope_fb.TNscope_vcf,
  594. hg=hg,
  595. only_pass=only_pass,
  596. annovar_database=annovar_database,
  597. docker=annovar_docker,
  598. cluster_config=cluster_config,
  599. disk_size=disk_size
  600. }
  601. }
  602. if (vep) {
  603. call VEP.VEP as TNscope_VEP_fb {
  604. input:
  605. vcf=TNscope_fb.TNscope_vcf,
  606. hg=hg,
  607. only_pass=only_pass,
  608. sample_id=sample_id,
  609. tumor_id=sample_id + ".T",
  610. normal_id=sample_id + ".N",
  611. ref_dir=ref_dir,
  612. fasta=fasta,
  613. vep_path=vep_path,
  614. cache=cache,
  615. species=species,
  616. vcf2maf_path=vcf2maf_path,
  617. docker=vep_docker,
  618. cluster_config=cluster_config,
  619. disk_size=disk_size
  620. }
  621. }
  622. }
  623. if (varscan) {
  624. call somatic.somatic as somatic_fb {
  625. input:
  626. sample=sample_id,
  627. normal_bam=normal_BQSR_fb.recaled_bam,
  628. normal_bam_index=normal_BQSR_fb.recaled_bam_index,
  629. tumor_bam=tumor_BQSR_fb.recaled_bam,
  630. tumor_bam_index=tumor_BQSR_fb.recaled_bam_index,
  631. ref_dir=ref_dir,
  632. fasta=fasta,
  633. docker=varscan_docker,
  634. disk_size=disk_size,
  635. cluster_config=cluster_config
  636. }
  637. call processSomatic.processSomatic as processSomatic_fb {
  638. input:
  639. sample=sample_id,
  640. varscan_snp=somatic_fb.varscan_snp,
  641. varscan_indel=somatic_fb.varscan_indel,
  642. docker=varscan_docker,
  643. disk_size=disk_size,
  644. cluster_config=cluster_config
  645. }
  646. call somaticFilter.somaticFilter as somaticFilter_fb {
  647. input:
  648. sample=sample_id,
  649. varscan_snp_somatic_hc=processSomatic_fb.varscan_snp_somatic_hc,
  650. varscan_snp_germline_hc=processSomatic_fb.varscan_snp_germline_hc,
  651. varscan_snp_loh_hc=processSomatic_fb.varscan_snp_loh_hc,
  652. varscan_indel_somatic_hc=processSomatic_fb.varscan_indel_somatic_hc,
  653. varscan_indel_germline_hc=processSomatic_fb.varscan_indel_germline_hc,
  654. varscan_indel_loh_hc=processSomatic_fb.varscan_indel_loh_hc,
  655. varscan_indel=somatic_fb.varscan_indel,
  656. docker=varscan_docker,
  657. disk_size=disk_size,
  658. cluster_config=cluster_config
  659. }
  660. if (annovar) {
  661. call ANNOVAR.ANNOVAR as VarScan_annovar_fb {
  662. input:
  663. vcf=somaticFilter_fb.varscan_somatic_filter,
  664. hg=hg,
  665. only_pass=only_pass,
  666. annovar_database=annovar_database,
  667. docker=annovar_docker,
  668. cluster_config=cluster_config,
  669. disk_size=disk_size
  670. }
  671. }
  672. if (vep) {
  673. call VEP.VEP as VarScan_VEP_fb {
  674. input:
  675. vcf=somaticFilter_fb.varscan_somatic_filter,
  676. hg=hg,
  677. only_pass=only_pass,
  678. sample_id=sample_id,
  679. tumor_id=sample_id + ".T",
  680. normal_id=sample_id + ".N",
  681. ref_dir=ref_dir,
  682. fasta=fasta,
  683. vep_path=vep_path,
  684. cache=cache,
  685. species=species,
  686. vcf2maf_path=vcf2maf_path,
  687. docker=vep_docker,
  688. cluster_config=cluster_config,
  689. disk_size=disk_size
  690. }
  691. }
  692. }
  693. }
  694. }