Germline & Somatic short variant discovery (SNVs + Indels) for WGS & WES.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

483 lines
15KB

  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/Realigner.wdl" as Realigner
  6. import "./tasks/BQSR.wdl" as BQSR
  7. import "./tasks/Haplotyper.wdl" as Haplotyper
  8. import "./tasks/corealigner.wdl" as corealigner
  9. import "./tasks/TNseq.wdl" as TNseq
  10. import "./tasks/TNscope.wdl" as TNscope
  11. import "./tasks/somatic.wdl" as somatic
  12. import "./tasks/processSomatic.wdl" as processSomatic
  13. import "./tasks/somaticFilter.wdl" as somaticFilter
  14. import "./tasks/annovar.wdl" as annovar
  15. import "./tasks/vcf2maf.wdl" as vcf2maf
  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. String SENTIEON_INSTALL_DIR
  23. String SENTIEON_LICENSE
  24. String sentieon_docker
  25. String varscan_docker
  26. String annovar_docker
  27. String maftools_docker
  28. File ref_dir
  29. String fasta
  30. File dbmills_dir
  31. String db_mills
  32. File dbsnp_dir
  33. String dbsnp
  34. File germline_resource
  35. File? regions
  36. File database
  37. String disk_size
  38. String cluster_config
  39. Boolean set_pon
  40. File? pon_vcf
  41. File? cosmic_dir
  42. String? cosmic_vcf
  43. Boolean germline
  44. Boolean tnseq
  45. Boolean tnscope
  46. Boolean varscan
  47. call mapping.mapping as tumor_mapping {
  48. input:
  49. group=sample_id + '_tumor',
  50. sample=sample_id + '_tumor',
  51. fastq_1=tumor_fastq_1,
  52. fastq_2=tumor_fastq_2,
  53. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  54. SENTIEON_LICENSE=SENTIEON_LICENSE,
  55. pl="ILLUMINAL",
  56. fasta=fasta,
  57. ref_dir=ref_dir,
  58. docker=sentieon_docker,
  59. disk_size=disk_size,
  60. cluster_config=cluster_config
  61. }
  62. call Metrics.Metrics as tumor_Metrics {
  63. input:
  64. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  65. SENTIEON_LICENSE=SENTIEON_LICENSE,
  66. fasta=fasta,
  67. ref_dir=ref_dir,
  68. sorted_bam=tumor_mapping.sorted_bam,
  69. sorted_bam_index=tumor_mapping.sorted_bam_index,
  70. sample=sample_id + '_tumor',
  71. docker=sentieon_docker,
  72. disk_size=disk_size,
  73. cluster_config=cluster_config
  74. }
  75. call Dedup.Dedup as tumor_Dedup {
  76. input:
  77. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  78. SENTIEON_LICENSE=SENTIEON_LICENSE,
  79. sorted_bam=tumor_mapping.sorted_bam,
  80. sorted_bam_index=tumor_mapping.sorted_bam_index,
  81. sample=sample_id + '_tumor',
  82. docker=sentieon_docker,
  83. disk_size=disk_size,
  84. cluster_config=cluster_config
  85. }
  86. call deduped_Metrics.deduped_Metrics as tumor_deduped_Metrics {
  87. input:
  88. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  89. SENTIEON_LICENSE=SENTIEON_LICENSE,
  90. fasta=fasta,
  91. ref_dir=ref_dir,
  92. Dedup_bam=tumor_Dedup.Dedup_bam,
  93. Dedup_bam_index=tumor_Dedup.Dedup_bam_index,
  94. sample=sample_id + '_tumor',
  95. docker=sentieon_docker,
  96. disk_size=disk_size,
  97. cluster_config=cluster_config
  98. }
  99. call Realigner.Realigner as tumor_Realigner {
  100. input:
  101. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  102. SENTIEON_LICENSE=SENTIEON_LICENSE,
  103. fasta=fasta,
  104. ref_dir=ref_dir,
  105. Dedup_bam=tumor_Dedup.Dedup_bam,
  106. Dedup_bam_index=tumor_Dedup.Dedup_bam_index,
  107. db_mills=db_mills,
  108. dbmills_dir=dbmills_dir,
  109. sample=sample_id + '_tumor',
  110. docker=sentieon_docker,
  111. disk_size=disk_size,
  112. regions=regions,
  113. cluster_config=cluster_config
  114. }
  115. call BQSR.BQSR as tumor_BQSR {
  116. input:
  117. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  118. SENTIEON_LICENSE=SENTIEON_LICENSE,
  119. fasta=fasta,
  120. ref_dir=ref_dir,
  121. realigned_bam=tumor_Realigner.realigner_bam,
  122. realigned_bam_index=tumor_Realigner.realigner_bam_index,
  123. db_mills=db_mills,
  124. dbmills_dir=dbmills_dir,
  125. dbsnp=dbsnp,
  126. dbsnp_dir=dbsnp_dir,
  127. sample=sample_id + '_tumor',
  128. regions=regions,
  129. docker=sentieon_docker,
  130. disk_size=disk_size,
  131. cluster_config=cluster_config
  132. }
  133. call mapping.mapping as normal_mapping {
  134. input:
  135. group=sample_id + '_normal',
  136. sample=sample_id + '_normal',
  137. fastq_1=normal_fastq_1,
  138. fastq_2=normal_fastq_2,
  139. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  140. SENTIEON_LICENSE=SENTIEON_LICENSE,
  141. pl="ILLUMINAL",
  142. fasta=fasta,
  143. ref_dir=ref_dir,
  144. docker=sentieon_docker,
  145. disk_size=disk_size,
  146. cluster_config=cluster_config
  147. }
  148. call Metrics.Metrics as normal_Metrics {
  149. input:
  150. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  151. SENTIEON_LICENSE=SENTIEON_LICENSE,
  152. fasta=fasta,
  153. ref_dir=ref_dir,
  154. sorted_bam=normal_mapping.sorted_bam,
  155. sorted_bam_index=normal_mapping.sorted_bam_index,
  156. sample=sample_id + '_normal',
  157. docker=sentieon_docker,
  158. disk_size=disk_size,
  159. cluster_config=cluster_config
  160. }
  161. call Dedup.Dedup as normal_Dedup {
  162. input:
  163. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  164. SENTIEON_LICENSE=SENTIEON_LICENSE,
  165. sorted_bam=normal_mapping.sorted_bam,
  166. sorted_bam_index=normal_mapping.sorted_bam_index,
  167. sample=sample_id + '_normal',
  168. docker=sentieon_docker,
  169. disk_size=disk_size,
  170. cluster_config=cluster_config
  171. }
  172. call deduped_Metrics.deduped_Metrics as normal_deduped_Metrics {
  173. input:
  174. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  175. SENTIEON_LICENSE=SENTIEON_LICENSE,
  176. fasta=fasta,
  177. ref_dir=ref_dir,
  178. Dedup_bam=normal_Dedup.Dedup_bam,
  179. Dedup_bam_index=normal_Dedup.Dedup_bam_index,
  180. sample=sample_id + '_normal',
  181. docker=sentieon_docker,
  182. disk_size=disk_size,
  183. cluster_config=cluster_config
  184. }
  185. call Realigner.Realigner as normal_Realigner {
  186. input:
  187. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  188. SENTIEON_LICENSE=SENTIEON_LICENSE,
  189. fasta=fasta,
  190. ref_dir=ref_dir,
  191. Dedup_bam=normal_Dedup.Dedup_bam,
  192. Dedup_bam_index=normal_Dedup.Dedup_bam_index,
  193. db_mills=db_mills,
  194. dbmills_dir=dbmills_dir,
  195. sample=sample_id + '_normal',
  196. docker=sentieon_docker,
  197. disk_size=disk_size,
  198. regions=regions,
  199. cluster_config=cluster_config
  200. }
  201. call BQSR.BQSR as normal_BQSR {
  202. input:
  203. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  204. SENTIEON_LICENSE=SENTIEON_LICENSE,
  205. fasta=fasta,
  206. ref_dir=ref_dir,
  207. realigned_bam=normal_Realigner.realigner_bam,
  208. realigned_bam_index=normal_Realigner.realigner_bam_index,
  209. db_mills=db_mills,
  210. dbmills_dir=dbmills_dir,
  211. dbsnp=dbsnp,
  212. dbsnp_dir=dbsnp_dir,
  213. sample=sample_id + '_normal',
  214. regions=regions,
  215. docker=sentieon_docker,
  216. disk_size=disk_size,
  217. cluster_config=cluster_config
  218. }
  219. if (germline) {
  220. call Haplotyper.Haplotyper as Haplotyper {
  221. input:
  222. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  223. SENTIEON_LICENSE=SENTIEON_LICENSE,
  224. sample=sample_id + '_normal',
  225. fasta=fasta,
  226. ref_dir=ref_dir,
  227. recaled_bam=normal_BQSR.recaled_bam,
  228. recaled_bam_index=normal_BQSR.recaled_bam_index,
  229. dbsnp=dbsnp,
  230. dbsnp_dir=dbsnp_dir,
  231. regions=regions,
  232. docker=sentieon_docker,
  233. disk_size=disk_size,
  234. cluster_config=cluster_config
  235. }
  236. }
  237. call corealigner.corealigner as corealigner {
  238. input:
  239. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  240. SENTIEON_LICENSE=SENTIEON_LICENSE,
  241. fasta=fasta,
  242. ref_dir=ref_dir,
  243. sample=sample_id,
  244. docker=sentieon_docker,
  245. db_mills=db_mills,
  246. dbmills_dir=dbmills_dir,
  247. dbsnp=dbsnp,
  248. dbsnp_dir=dbsnp_dir,
  249. tumor_recaled_bam=tumor_BQSR.recaled_bam,
  250. tumor_recaled_bam_index=tumor_BQSR.recaled_bam_index,
  251. normal_recaled_bam=normal_BQSR.recaled_bam,
  252. normal_recaled_bam_index=normal_BQSR.recaled_bam_index,
  253. disk_size=disk_size,
  254. cluster_config=cluster_config
  255. }
  256. if (tnseq) {
  257. call TNseq.TNseq as TNseq {
  258. input:
  259. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  260. SENTIEON_LICENSE=SENTIEON_LICENSE,
  261. fasta=fasta,
  262. ref_dir=ref_dir,
  263. regions=regions,
  264. corealigner_bam=corealigner.corealigner_bam,
  265. corealigner_bam_index=corealigner.corealigner_bam_index,
  266. dbsnp=dbsnp,
  267. dbsnp_dir=dbsnp_dir,
  268. set_pon=set_pon,
  269. pon_vcf=pon_vcf,
  270. cosmic_vcf=cosmic_vcf,
  271. cosmic_dir=cosmic_dir,
  272. tumor_name=sample_id + "_tumor",
  273. normal_name=sample_id + "_normal",
  274. docker=sentieon_docker,
  275. sample=sample_id,
  276. disk_size=disk_size,
  277. cluster_config=cluster_config
  278. }
  279. call annovar.annovar as TNseq_annovar {
  280. input:
  281. sample=sample_id,
  282. vcf=TNseq.TNseq_vcf,
  283. database=database,
  284. docker=annovar_docker,
  285. cluster_config=cluster_config,
  286. disk_size=disk_size
  287. }
  288. call vcf2maf.vcf2maf as TNseq_vcf2maf {
  289. input:
  290. sample=sample_id,
  291. multianno_txt=TNseq_annovar.multianno_txt,
  292. docker=maftools_docker,
  293. cluster_config=cluster_config,
  294. disk_size=disk_size
  295. }
  296. }
  297. if (tnscope) {
  298. call TNscope.TNscope as TNscope {
  299. input:
  300. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  301. SENTIEON_LICENSE=SENTIEON_LICENSE,
  302. fasta=fasta,
  303. ref_dir=ref_dir,
  304. regions=regions,
  305. corealigner_bam=corealigner.corealigner_bam,
  306. corealigner_bam_index=corealigner.corealigner_bam_index,
  307. dbsnp=dbsnp,
  308. dbsnp_dir=dbsnp_dir,
  309. set_pon=set_pon,
  310. pon_vcf=pon_vcf,
  311. cosmic_vcf=cosmic_vcf,
  312. cosmic_dir=cosmic_dir,
  313. tumor_name=sample_id + "_tumor",
  314. normal_name=sample_id + "_normal",
  315. docker=sentieon_docker,
  316. sample=sample_id,
  317. disk_size=disk_size,
  318. cluster_config=cluster_config
  319. }
  320. call annovar.annovar as TNscope_annovar {
  321. input:
  322. sample=sample_id,
  323. vcf=TNscope.TNscope_vcf,
  324. database=database,
  325. docker=annovar_docker,
  326. cluster_config=cluster_config,
  327. disk_size=disk_size
  328. }
  329. call vcf2maf.vcf2maf as TNscope_vcf2maf {
  330. input:
  331. sample=sample_id,
  332. multianno_txt=TNscope_annovar.multianno_txt,
  333. docker=maftools_docker,
  334. cluster_config=cluster_config,
  335. disk_size=disk_size
  336. }
  337. }
  338. if (varscan) {
  339. call somatic.somatic as somatic {
  340. input:
  341. sample=sample_id,
  342. tumor_bam=tumor_BQSR.recaled_bam,
  343. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  344. normal_bam=normal_BQSR.recaled_bam,
  345. normal_bam_index=normal_BQSR.recaled_bam_index,
  346. ref_dir=ref_dir,
  347. fasta=fasta,
  348. docker=varscan_docker,
  349. disk_size=disk_size,
  350. cluster_config=cluster_config
  351. }
  352. call processSomatic.processSomatic as processSomatic {
  353. input:
  354. sample=sample_id,
  355. varscan_snp=somatic.varscan_snp,
  356. varscan_indel=somatic.varscan_indel,
  357. docker=varscan_docker,
  358. disk_size=disk_size,
  359. cluster_config=cluster_config
  360. }
  361. call somaticFilter.somaticFilter as somaticFilter {
  362. input:
  363. sample=sample_id,
  364. varscan_snp_somatic_hc=processSomatic.varscan_snp_somatic_hc,
  365. varscan_snp_germline_hc=processSomatic.varscan_snp_germline_hc,
  366. varscan_snp_loh_hc=processSomatic.varscan_snp_loh_hc,
  367. varscan_indel_somatic_hc=processSomatic.varscan_indel_somatic_hc,
  368. varscan_indel_germline_hc=processSomatic.varscan_indel_germline_hc,
  369. varscan_indel_loh_hc=processSomatic.varscan_indel_loh_hc,
  370. varscan_indel=somatic.varscan_indel,
  371. docker=varscan_docker,
  372. disk_size=disk_size,
  373. cluster_config=cluster_config
  374. }
  375. call annovar.annovar as snp_somatic_annovar {
  376. input:
  377. sample=sample_id,
  378. vcf=somaticFilter.varscan_snp_somatic_filter,
  379. database=database,
  380. docker=annovar_docker,
  381. cluster_config=cluster_config,
  382. disk_size=disk_size
  383. }
  384. call vcf2maf.vcf2maf as snp_somatic_vcf2maf {
  385. input:
  386. sample=sample_id,
  387. multianno_txt=snp_somatic_annovar.multianno_txt,
  388. docker=maftools_docker,
  389. cluster_config=cluster_config,
  390. disk_size=disk_size
  391. }
  392. call annovar.annovar as snp_loh_annovar {
  393. input:
  394. sample=sample_id,
  395. vcf=somaticFilter.varscan_snp_loh_filter,
  396. database=database,
  397. docker=annovar_docker,
  398. cluster_config=cluster_config,
  399. disk_size=disk_size
  400. }
  401. call vcf2maf.vcf2maf as snp_loh_vcf2maf {
  402. input:
  403. sample=sample_id,
  404. multianno_txt=snp_loh_annovar.multianno_txt,
  405. docker=maftools_docker,
  406. cluster_config=cluster_config,
  407. disk_size=disk_size
  408. }
  409. call annovar.annovar as indel_somatic_annovar {
  410. input:
  411. sample=sample_id,
  412. vcf=somaticFilter.varscan_indel_somatic_filter,
  413. database=database,
  414. docker=annovar_docker,
  415. cluster_config=cluster_config,
  416. disk_size=disk_size
  417. }
  418. call vcf2maf.vcf2maf as indel_somatic_vcf2maf {
  419. input:
  420. sample=sample_id,
  421. multianno_txt=indel_somatic_annovar.multianno_txt,
  422. docker=maftools_docker,
  423. cluster_config=cluster_config,
  424. disk_size=disk_size
  425. }
  426. call annovar.annovar as indel_loh_annovar {
  427. input:
  428. sample=sample_id,
  429. vcf=somaticFilter.varscan_indel_loh_filter,
  430. database=database,
  431. docker=annovar_docker,
  432. cluster_config=cluster_config,
  433. disk_size=disk_size
  434. }
  435. call vcf2maf.vcf2maf as indel_loh_vcf2maf {
  436. input:
  437. sample=sample_id,
  438. multianno_txt=indel_loh_annovar.multianno_txt,
  439. docker=maftools_docker,
  440. cluster_config=cluster_config,
  441. disk_size=disk_size
  442. }
  443. }
  444. }