Automated integrated analysis software for genomics data of the cancer patients.
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

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