Germline & Somatic short variant discovery (SNVs + Indels) for WGS & WES.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

415 Zeilen
12KB

  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/TNseq.wdl" as TNseq
  9. import "./tasks/TNscope.wdl" as TNscope
  10. import "./tasks/somatic.wdl" as somatic
  11. import "./tasks/processSomatic.wdl" as processSomatic
  12. import "./tasks/somaticFilter.wdl" as somaticFilter
  13. import "./tasks/annovar.wdl" as annovar
  14. workflow {{ project_name }} {
  15. String sample_id
  16. File tumor_fastq_1
  17. File tumor_fastq_2
  18. File normal_fastq_1
  19. File normal_fastq_2
  20. String SENTIEON_INSTALL_DIR
  21. String SENTIEON_LICENSE
  22. String sentieon_docker
  23. String varscan_docker
  24. String annovar_docker
  25. File ref_dir
  26. String fasta
  27. File dbmills_dir
  28. String db_mills
  29. File dbsnp_dir
  30. String dbsnp
  31. File germline_resource
  32. File germline_resource_tbi
  33. File database
  34. File? regions
  35. Int? interval_padding
  36. File? tnseq_pon
  37. File? tnscope_pon
  38. String disk_size
  39. String cluster_config
  40. Boolean haplotyper
  41. Boolean tnseq
  42. Boolean tnscope
  43. Boolean varscan
  44. if (tumor_fastq_1!= "") {
  45. call mapping.mapping as tumor_mapping {
  46. input:
  47. group=sample_id + '_tumor',
  48. sample=sample_id + '_tumor',
  49. fastq_1=tumor_fastq_1,
  50. fastq_2=tumor_fastq_2,
  51. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  52. SENTIEON_LICENSE=SENTIEON_LICENSE,
  53. pl="ILLUMINAL",
  54. fasta=fasta,
  55. ref_dir=ref_dir,
  56. docker=sentieon_docker,
  57. disk_size=disk_size,
  58. cluster_config=cluster_config
  59. }
  60. call Metrics.Metrics as tumor_Metrics {
  61. input:
  62. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  63. SENTIEON_LICENSE=SENTIEON_LICENSE,
  64. fasta=fasta,
  65. ref_dir=ref_dir,
  66. sorted_bam=tumor_mapping.sorted_bam,
  67. sorted_bam_index=tumor_mapping.sorted_bam_index,
  68. sample=sample_id + '_tumor',
  69. docker=sentieon_docker,
  70. disk_size=disk_size,
  71. cluster_config=cluster_config
  72. }
  73. call Dedup.Dedup as tumor_Dedup {
  74. input:
  75. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  76. SENTIEON_LICENSE=SENTIEON_LICENSE,
  77. sorted_bam=tumor_mapping.sorted_bam,
  78. sorted_bam_index=tumor_mapping.sorted_bam_index,
  79. sample=sample_id + '_tumor',
  80. docker=sentieon_docker,
  81. disk_size=disk_size,
  82. cluster_config=cluster_config
  83. }
  84. call deduped_Metrics.deduped_Metrics as tumor_deduped_Metrics {
  85. input:
  86. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  87. SENTIEON_LICENSE=SENTIEON_LICENSE,
  88. fasta=fasta,
  89. ref_dir=ref_dir,
  90. Dedup_bam=tumor_Dedup.Dedup_bam,
  91. Dedup_bam_index=tumor_Dedup.Dedup_bam_index,
  92. sample=sample_id + '_tumor',
  93. docker=sentieon_docker,
  94. disk_size=disk_size,
  95. cluster_config=cluster_config
  96. }
  97. call Realigner.Realigner as tumor_Realigner {
  98. input:
  99. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  100. SENTIEON_LICENSE=SENTIEON_LICENSE,
  101. fasta=fasta,
  102. ref_dir=ref_dir,
  103. Dedup_bam=tumor_Dedup.Dedup_bam,
  104. Dedup_bam_index=tumor_Dedup.Dedup_bam_index,
  105. db_mills=db_mills,
  106. dbmills_dir=dbmills_dir,
  107. sample=sample_id + '_tumor',
  108. docker=sentieon_docker,
  109. disk_size=disk_size,
  110. regions=regions,
  111. cluster_config=cluster_config
  112. }
  113. call BQSR.BQSR as tumor_BQSR {
  114. input:
  115. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  116. SENTIEON_LICENSE=SENTIEON_LICENSE,
  117. fasta=fasta,
  118. ref_dir=ref_dir,
  119. realigned_bam=tumor_Realigner.realigner_bam,
  120. realigned_bam_index=tumor_Realigner.realigner_bam_index,
  121. db_mills=db_mills,
  122. dbmills_dir=dbmills_dir,
  123. dbsnp=dbsnp,
  124. dbsnp_dir=dbsnp_dir,
  125. sample=sample_id + '_tumor',
  126. regions=regions,
  127. docker=sentieon_docker,
  128. disk_size=disk_size,
  129. cluster_config=cluster_config
  130. }
  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. regions=regions,
  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. regions=regions,
  182. docker=sentieon_docker,
  183. disk_size=disk_size,
  184. cluster_config=cluster_config
  185. }
  186. call Realigner.Realigner as normal_Realigner {
  187. input:
  188. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  189. SENTIEON_LICENSE=SENTIEON_LICENSE,
  190. fasta=fasta,
  191. ref_dir=ref_dir,
  192. Dedup_bam=normal_Dedup.Dedup_bam,
  193. Dedup_bam_index=normal_Dedup.Dedup_bam_index,
  194. db_mills=db_mills,
  195. dbmills_dir=dbmills_dir,
  196. sample=sample_id + '_normal',
  197. docker=sentieon_docker,
  198. disk_size=disk_size,
  199. regions=regions,
  200. cluster_config=cluster_config
  201. }
  202. call BQSR.BQSR as normal_BQSR {
  203. input:
  204. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  205. SENTIEON_LICENSE=SENTIEON_LICENSE,
  206. fasta=fasta,
  207. ref_dir=ref_dir,
  208. realigned_bam=normal_Realigner.realigner_bam,
  209. realigned_bam_index=normal_Realigner.realigner_bam_index,
  210. db_mills=db_mills,
  211. dbmills_dir=dbmills_dir,
  212. dbsnp=dbsnp,
  213. dbsnp_dir=dbsnp_dir,
  214. sample=sample_id + '_normal',
  215. regions=regions,
  216. docker=sentieon_docker,
  217. disk_size=disk_size,
  218. cluster_config=cluster_config
  219. }
  220. if (haplotyper) {
  221. call Haplotyper.Haplotyper as Haplotyper {
  222. input:
  223. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  224. SENTIEON_LICENSE=SENTIEON_LICENSE,
  225. sample=sample_id + '_normal',
  226. fasta=fasta,
  227. ref_dir=ref_dir,
  228. recaled_bam=normal_BQSR.recaled_bam,
  229. recaled_bam_index=normal_BQSR.recaled_bam_index,
  230. recaled_table=normal_BQSR.recal_table,
  231. dbsnp=dbsnp,
  232. dbsnp_dir=dbsnp_dir,
  233. regions=regions,
  234. docker=sentieon_docker,
  235. disk_size=disk_size,
  236. cluster_config=cluster_config
  237. }
  238. }
  239. if (tnseq) {
  240. call TNseq.TNseq as TNseq {
  241. input:
  242. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  243. SENTIEON_LICENSE=SENTIEON_LICENSE,
  244. sample=sample_id,
  245. normal_recaled_bam=normal_BQSR.recaled_bam,
  246. normal_recaled_bam_index=normal_BQSR.recaled_bam_index,
  247. normal_recal_table=normal_BQSR.recal_table,
  248. tumor_recaled_bam=tumor_BQSR.recaled_bam,
  249. tumor_recaled_bam_index=tumor_BQSR.recaled_bam_index,
  250. tumor_recal_table=tumor_BQSR.recal_table,
  251. normal_name=sample_id + "_normal",
  252. tumor_name=sample_id + "_tumor",
  253. fasta=fasta,
  254. ref_dir=ref_dir,
  255. regions=regions,
  256. interval_padding=interval_padding,
  257. germline_resource=germline_resource,
  258. germline_resource_tbi=germline_resource_tbi,
  259. pon_vcf=tnseq_pon,
  260. docker=sentieon_docker,
  261. cluster_config=cluster_config,
  262. disk_size=disk_size
  263. }
  264. call annovar.annovar as TNseq_annovar {
  265. input:
  266. sample=sample_id,
  267. vcf=TNseq.TNseq_vcf,
  268. database=database,
  269. docker=annovar_docker,
  270. cluster_config=cluster_config,
  271. disk_size=disk_size
  272. }
  273. }
  274. if (tnscope) {
  275. call TNscope.TNscope as TNscope {
  276. input:
  277. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  278. SENTIEON_LICENSE=SENTIEON_LICENSE,
  279. sample=sample_id,
  280. normal_recaled_bam=normal_BQSR.recaled_bam,
  281. normal_recaled_bam_index=normal_BQSR.recaled_bam_index,
  282. normal_recal_table=normal_BQSR.recal_table,
  283. tumor_recaled_bam=tumor_BQSR.recaled_bam,
  284. tumor_recaled_bam_index=tumor_BQSR.recaled_bam_index,
  285. tumor_recal_table=tumor_BQSR.recal_table,
  286. normal_name=sample_id + "_normal",
  287. tumor_name=sample_id + "_tumor",
  288. fasta=fasta,
  289. ref_dir=ref_dir,
  290. regions=regions,
  291. interval_padding=interval_padding,
  292. dbsnp=dbsnp,
  293. dbsnp_dir=dbsnp_dir,
  294. pon_vcf=tnscope_pon,
  295. docker=sentieon_docker,
  296. cluster_config=cluster_config,
  297. disk_size=disk_size
  298. }
  299. call annovar.annovar as TNscope_annovar {
  300. input:
  301. sample=sample_id,
  302. vcf=TNscope.TNscope_vcf,
  303. database=database,
  304. docker=annovar_docker,
  305. cluster_config=cluster_config,
  306. disk_size=disk_size
  307. }
  308. }
  309. if (varscan) {
  310. call somatic.somatic as somatic {
  311. input:
  312. sample=sample_id,
  313. tumor_bam=tumor_BQSR.recaled_bam,
  314. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  315. normal_bam=normal_BQSR.recaled_bam,
  316. normal_bam_index=normal_BQSR.recaled_bam_index,
  317. ref_dir=ref_dir,
  318. fasta=fasta,
  319. docker=varscan_docker,
  320. disk_size=disk_size,
  321. cluster_config=cluster_config
  322. }
  323. call processSomatic.processSomatic as processSomatic {
  324. input:
  325. sample=sample_id,
  326. varscan_snp=somatic.varscan_snp,
  327. varscan_indel=somatic.varscan_indel,
  328. docker=varscan_docker,
  329. disk_size=disk_size,
  330. cluster_config=cluster_config
  331. }
  332. call somaticFilter.somaticFilter as somaticFilter {
  333. input:
  334. sample=sample_id,
  335. varscan_snp_somatic_hc=processSomatic.varscan_snp_somatic_hc,
  336. varscan_snp_germline_hc=processSomatic.varscan_snp_germline_hc,
  337. varscan_snp_loh_hc=processSomatic.varscan_snp_loh_hc,
  338. varscan_indel_somatic_hc=processSomatic.varscan_indel_somatic_hc,
  339. varscan_indel_germline_hc=processSomatic.varscan_indel_germline_hc,
  340. varscan_indel_loh_hc=processSomatic.varscan_indel_loh_hc,
  341. varscan_indel=somatic.varscan_indel,
  342. docker=varscan_docker,
  343. disk_size=disk_size,
  344. cluster_config=cluster_config
  345. }
  346. call annovar.annovar as snp_somatic_annovar {
  347. input:
  348. sample=sample_id,
  349. vcf=somaticFilter.varscan_snp_somatic_filter,
  350. database=database,
  351. docker=annovar_docker,
  352. cluster_config=cluster_config,
  353. disk_size=disk_size
  354. }
  355. call annovar.annovar as snp_loh_annovar {
  356. input:
  357. sample=sample_id,
  358. vcf=somaticFilter.varscan_snp_loh_filter,
  359. database=database,
  360. docker=annovar_docker,
  361. cluster_config=cluster_config,
  362. disk_size=disk_size
  363. }
  364. call annovar.annovar as indel_somatic_annovar {
  365. input:
  366. sample=sample_id,
  367. vcf=somaticFilter.varscan_indel_somatic_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_loh_annovar {
  374. input:
  375. sample=sample_id,
  376. vcf=somaticFilter.varscan_indel_loh_filter,
  377. database=database,
  378. docker=annovar_docker,
  379. cluster_config=cluster_config,
  380. disk_size=disk_size
  381. }
  382. }
  383. }