Automated integrated analysis software for genomics data of the cancer patients.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

548 rindas
14KB

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