Germline & Somatic short variant discovery (SNVs + Indels) for WGS & WES.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

workflow.wdl 12KB

4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  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. File ref_dir
  28. String fasta
  29. File dbmills_dir
  30. String db_mills
  31. File dbsnp_dir
  32. String dbsnp
  33. File germline_resource
  34. File germline_resource_tbi
  35. File database
  36. File? regions
  37. Int? interval_padding
  38. File? tnseq_pon
  39. File? tnscope_pon
  40. String disk_size
  41. String cluster_config
  42. Boolean haplotyper
  43. Boolean tnseq
  44. Boolean tnscope
  45. Boolean varscan
  46. if (tumor_fastq_1!= "") {
  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. regions=regions,
  158. docker=sentieon_docker,
  159. disk_size=disk_size,
  160. cluster_config=cluster_config
  161. }
  162. call Dedup.Dedup as normal_Dedup {
  163. input:
  164. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  165. SENTIEON_LICENSE=SENTIEON_LICENSE,
  166. sorted_bam=normal_mapping.sorted_bam,
  167. sorted_bam_index=normal_mapping.sorted_bam_index,
  168. sample=sample_id + '_normal',
  169. docker=sentieon_docker,
  170. disk_size=disk_size,
  171. cluster_config=cluster_config
  172. }
  173. call deduped_Metrics.deduped_Metrics as normal_deduped_Metrics {
  174. input:
  175. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  176. SENTIEON_LICENSE=SENTIEON_LICENSE,
  177. fasta=fasta,
  178. ref_dir=ref_dir,
  179. Dedup_bam=normal_Dedup.Dedup_bam,
  180. Dedup_bam_index=normal_Dedup.Dedup_bam_index,
  181. sample=sample_id + '_normal',
  182. regions=regions,
  183. docker=sentieon_docker,
  184. disk_size=disk_size,
  185. cluster_config=cluster_config
  186. }
  187. call Realigner.Realigner as normal_Realigner {
  188. input:
  189. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  190. SENTIEON_LICENSE=SENTIEON_LICENSE,
  191. fasta=fasta,
  192. ref_dir=ref_dir,
  193. Dedup_bam=normal_Dedup.Dedup_bam,
  194. Dedup_bam_index=normal_Dedup.Dedup_bam_index,
  195. db_mills=db_mills,
  196. dbmills_dir=dbmills_dir,
  197. sample=sample_id + '_normal',
  198. docker=sentieon_docker,
  199. disk_size=disk_size,
  200. regions=regions,
  201. cluster_config=cluster_config
  202. }
  203. call BQSR.BQSR as normal_BQSR {
  204. input:
  205. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  206. SENTIEON_LICENSE=SENTIEON_LICENSE,
  207. fasta=fasta,
  208. ref_dir=ref_dir,
  209. realigned_bam=normal_Realigner.realigner_bam,
  210. realigned_bam_index=normal_Realigner.realigner_bam_index,
  211. db_mills=db_mills,
  212. dbmills_dir=dbmills_dir,
  213. dbsnp=dbsnp,
  214. dbsnp_dir=dbsnp_dir,
  215. sample=sample_id + '_normal',
  216. regions=regions,
  217. docker=sentieon_docker,
  218. disk_size=disk_size,
  219. cluster_config=cluster_config
  220. }
  221. if (haplotyper) {
  222. call Haplotyper.Haplotyper as Haplotyper {
  223. input:
  224. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  225. SENTIEON_LICENSE=SENTIEON_LICENSE,
  226. sample=sample_id + '_normal',
  227. fasta=fasta,
  228. ref_dir=ref_dir,
  229. recaled_bam=normal_BQSR.recaled_bam,
  230. recaled_bam_index=normal_BQSR.recaled_bam_index,
  231. recaled_table=normal_BQSR.recal_table,
  232. dbsnp=dbsnp,
  233. dbsnp_dir=dbsnp_dir,
  234. regions=regions,
  235. docker=sentieon_docker,
  236. disk_size=disk_size,
  237. cluster_config=cluster_config
  238. }
  239. }
  240. if (tnseq) {
  241. call TNseq.TNseq as TNseq {
  242. input:
  243. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  244. SENTIEON_LICENSE=SENTIEON_LICENSE,
  245. sample=sample_id,
  246. normal_recaled_bam=normal_BQSR.recaled_bam,
  247. normal_recaled_bam_index=normal_BQSR.recaled_bam_index,
  248. normal_recal_table=normal_BQSR.recal_table,
  249. tumor_recaled_bam=tumor_BQSR.recaled_bam,
  250. tumor_recaled_bam_index=tumor_BQSR.recaled_bam_index,
  251. tumor_recal_table=tumor_BQSR.recal_table,
  252. normal_name=sample_id + "_normal",
  253. tumor_name=sample_id + "_tumor",
  254. fasta=fasta,
  255. ref_dir=ref_dir,
  256. regions=regions,
  257. interval_padding=interval_padding,
  258. germline_resource=germline_resource,
  259. germline_resource_tbi=germline_resource_tbi,
  260. pon_vcf=tnseq_pon,
  261. docker=sentieon_docker,
  262. cluster_config=cluster_config,
  263. disk_size=disk_size
  264. }
  265. call annovar.annovar as TNseq_annovar {
  266. input:
  267. sample=sample_id,
  268. vcf=TNseq.TNseq_vcf,
  269. database=database,
  270. docker=annovar_docker,
  271. cluster_config=cluster_config,
  272. disk_size=disk_size
  273. }
  274. }
  275. if (tnscope) {
  276. call TNscope.TNscope as TNscope {
  277. input:
  278. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  279. SENTIEON_LICENSE=SENTIEON_LICENSE,
  280. sample=sample_id,
  281. normal_recaled_bam=normal_BQSR.recaled_bam,
  282. normal_recaled_bam_index=normal_BQSR.recaled_bam_index,
  283. normal_recal_table=normal_BQSR.recal_table,
  284. tumor_recaled_bam=tumor_BQSR.recaled_bam,
  285. tumor_recaled_bam_index=tumor_BQSR.recaled_bam_index,
  286. tumor_recal_table=tumor_BQSR.recal_table,
  287. normal_name=sample_id + "_normal",
  288. tumor_name=sample_id + "_tumor",
  289. fasta=fasta,
  290. ref_dir=ref_dir,
  291. regions=regions,
  292. interval_padding=interval_padding,
  293. dbsnp=dbsnp,
  294. dbsnp_dir=dbsnp_dir,
  295. pon_vcf=tnscope_pon,
  296. docker=sentieon_docker,
  297. cluster_config=cluster_config,
  298. disk_size=disk_size
  299. }
  300. call annovar.annovar as TNscope_annovar {
  301. input:
  302. sample=sample_id,
  303. vcf=TNscope.TNscope_vcf,
  304. database=database,
  305. docker=annovar_docker,
  306. cluster_config=cluster_config,
  307. disk_size=disk_size
  308. }
  309. }
  310. if (varscan) {
  311. call somatic.somatic as somatic {
  312. input:
  313. sample=sample_id,
  314. tumor_bam=tumor_BQSR.recaled_bam,
  315. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  316. normal_bam=normal_BQSR.recaled_bam,
  317. normal_bam_index=normal_BQSR.recaled_bam_index,
  318. ref_dir=ref_dir,
  319. fasta=fasta,
  320. docker=varscan_docker,
  321. disk_size=disk_size,
  322. cluster_config=cluster_config
  323. }
  324. call processSomatic.processSomatic as processSomatic {
  325. input:
  326. sample=sample_id,
  327. varscan_snp=somatic.varscan_snp,
  328. varscan_indel=somatic.varscan_indel,
  329. docker=varscan_docker,
  330. disk_size=disk_size,
  331. cluster_config=cluster_config
  332. }
  333. call somaticFilter.somaticFilter as somaticFilter {
  334. input:
  335. sample=sample_id,
  336. varscan_snp_somatic_hc=processSomatic.varscan_snp_somatic_hc,
  337. varscan_snp_germline_hc=processSomatic.varscan_snp_germline_hc,
  338. varscan_snp_loh_hc=processSomatic.varscan_snp_loh_hc,
  339. varscan_indel_somatic_hc=processSomatic.varscan_indel_somatic_hc,
  340. varscan_indel_germline_hc=processSomatic.varscan_indel_germline_hc,
  341. varscan_indel_loh_hc=processSomatic.varscan_indel_loh_hc,
  342. varscan_indel=somatic.varscan_indel,
  343. docker=varscan_docker,
  344. disk_size=disk_size,
  345. cluster_config=cluster_config
  346. }
  347. call annovar.annovar as snp_somatic_annovar {
  348. input:
  349. sample=sample_id,
  350. vcf=somaticFilter.varscan_snp_somatic_filter,
  351. database=database,
  352. docker=annovar_docker,
  353. cluster_config=cluster_config,
  354. disk_size=disk_size
  355. }
  356. call vcf2maf.vcf2maf as snp_somatic_vcf2maf {
  357. input:
  358. sample=sample_id,
  359. multianno_txt=snp_somatic_annovar.multianno_txt,
  360. docker=maftools_docker,
  361. cluster_config=cluster_config,
  362. disk_size=disk_size
  363. }
  364. call annovar.annovar as snp_loh_annovar {
  365. input:
  366. sample=sample_id,
  367. vcf=somaticFilter.varscan_snp_loh_filter,
  368. database=database,
  369. docker=annovar_docker,
  370. cluster_config=cluster_config,
  371. disk_size=disk_size
  372. }
  373. call annovar.annovar as indel_somatic_annovar {
  374. input:
  375. sample=sample_id,
  376. vcf=somaticFilter.varscan_indel_somatic_filter,
  377. database=database,
  378. docker=annovar_docker,
  379. cluster_config=cluster_config,
  380. disk_size=disk_size
  381. }
  382. call annovar.annovar as indel_loh_annovar {
  383. input:
  384. sample=sample_id,
  385. vcf=somaticFilter.varscan_indel_loh_filter,
  386. database=database,
  387. docker=annovar_docker,
  388. cluster_config=cluster_config,
  389. disk_size=disk_size
  390. }
  391. }
  392. }
  393. }