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

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