Automated integrated analysis software for genomics data of the cancer patients.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

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