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

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