Germline & Somatic short variant discovery (SNVs + Indels) for WGS & WES.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

357 lines
9.8KB

  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/TNscope.wdl" as TNscope
  9. import "./tasks/somatic.wdl" as somatic
  10. import "./tasks/processSomatic.wdl" as processSomatic
  11. import "./tasks/somaticFilter.wdl" as somaticFilter
  12. import "./tasks/ANNOVAR.wdl" as ANNOVAR
  13. workflow {{ project_name }} {
  14. String sample_id
  15. File? tumor_fastq_1
  16. File? tumor_fastq_2
  17. File normal_fastq_1
  18. File normal_fastq_2
  19. String SENTIEON_INSTALL_DIR
  20. String SENTIEON_LICENSE
  21. String sentieon_docker
  22. String varscan_docker
  23. String annovar_docker
  24. File ref_dir
  25. String fasta
  26. File dbmills_dir
  27. String db_mills
  28. File dbsnp_dir
  29. String dbsnp
  30. File germline_resource
  31. File germline_resource_tbi
  32. String hg
  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. Boolean annovar
  45. if (tumor_fastq_1!= "") {
  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. deduped_bam=tumor_Dedup.deduped_bam,
  92. deduped_bam_index=tumor_Dedup.deduped_bam_index,
  93. sample=sample_id + '_tumor',
  94. docker=sentieon_docker,
  95. disk_size=disk_size,
  96. cluster_config=cluster_config
  97. }
  98. call BQSR.BQSR as tumor_BQSR {
  99. input:
  100. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  101. SENTIEON_LICENSE=SENTIEON_LICENSE,
  102. fasta=fasta,
  103. ref_dir=ref_dir,
  104. deduped_bam=tumor_Dedup.deduped_bam,
  105. deduped_bam_index=tumor_Dedup.deduped_bam_index,
  106. db_mills=db_mills,
  107. dbmills_dir=dbmills_dir,
  108. dbsnp=dbsnp,
  109. dbsnp_dir=dbsnp_dir,
  110. sample=sample_id + '_tumor',
  111. docker=sentieon_docker,
  112. disk_size=disk_size,
  113. cluster_config=cluster_config
  114. }
  115. }
  116. call mapping.mapping as normal_mapping {
  117. input:
  118. group=sample_id + '_normal',
  119. sample=sample_id + '_normal',
  120. fastq_1=normal_fastq_1,
  121. fastq_2=normal_fastq_2,
  122. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  123. SENTIEON_LICENSE=SENTIEON_LICENSE,
  124. pl="ILLUMINAL",
  125. fasta=fasta,
  126. ref_dir=ref_dir,
  127. docker=sentieon_docker,
  128. disk_size=disk_size,
  129. cluster_config=cluster_config
  130. }
  131. call Metrics.Metrics as normal_Metrics {
  132. input:
  133. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  134. SENTIEON_LICENSE=SENTIEON_LICENSE,
  135. fasta=fasta,
  136. ref_dir=ref_dir,
  137. sorted_bam=normal_mapping.sorted_bam,
  138. sorted_bam_index=normal_mapping.sorted_bam_index,
  139. sample=sample_id + '_normal',
  140. regions=regions,
  141. docker=sentieon_docker,
  142. disk_size=disk_size,
  143. cluster_config=cluster_config
  144. }
  145. call Dedup.Dedup as normal_Dedup {
  146. input:
  147. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  148. SENTIEON_LICENSE=SENTIEON_LICENSE,
  149. sorted_bam=normal_mapping.sorted_bam,
  150. sorted_bam_index=normal_mapping.sorted_bam_index,
  151. sample=sample_id + '_normal',
  152. docker=sentieon_docker,
  153. disk_size=disk_size,
  154. cluster_config=cluster_config
  155. }
  156. call deduped_Metrics.deduped_Metrics as normal_deduped_Metrics {
  157. input:
  158. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  159. SENTIEON_LICENSE=SENTIEON_LICENSE,
  160. fasta=fasta,
  161. ref_dir=ref_dir,
  162. deduped_bam=normal_Dedup.deduped_bam,
  163. deduped_bam_index=normal_Dedup.deduped_bam_index,
  164. sample=sample_id + '_normal',
  165. regions=regions,
  166. docker=sentieon_docker,
  167. disk_size=disk_size,
  168. cluster_config=cluster_config
  169. }
  170. call BQSR.BQSR as normal_BQSR {
  171. input:
  172. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  173. SENTIEON_LICENSE=SENTIEON_LICENSE,
  174. fasta=fasta,
  175. ref_dir=ref_dir,
  176. deduped_bam=normal_Dedup.deduped_bam,
  177. deduped_bam_index=normal_Dedup.deduped_bam_index,
  178. db_mills=db_mills,
  179. dbmills_dir=dbmills_dir,
  180. dbsnp=dbsnp,
  181. dbsnp_dir=dbsnp_dir,
  182. sample=sample_id + '_normal',
  183. docker=sentieon_docker,
  184. disk_size=disk_size,
  185. cluster_config=cluster_config
  186. }
  187. if (haplotyper) {
  188. call Haplotyper.Haplotyper as Haplotyper {
  189. input:
  190. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  191. SENTIEON_LICENSE=SENTIEON_LICENSE,
  192. sample=sample_id + '_normal',
  193. fasta=fasta,
  194. ref_dir=ref_dir,
  195. deduped_bam=normal_Dedup.deduped_bam,
  196. deduped_bam_index=normal_Dedup.deduped_bam_index,
  197. recal_table=normal_BQSR.recal_table,
  198. dbsnp=dbsnp,
  199. dbsnp_dir=dbsnp_dir,
  200. regions=regions,
  201. docker=sentieon_docker,
  202. disk_size=disk_size,
  203. cluster_config=cluster_config
  204. }
  205. }
  206. if (tnseq) {
  207. call TNseq.TNseq as TNseq {
  208. input:
  209. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  210. SENTIEON_LICENSE=SENTIEON_LICENSE,
  211. sample=sample_id,
  212. normal_deduped_bam=normal_Dedup.deduped_bam,
  213. normal_deduped_bam_index=normal_Dedup.deduped_bam_index,
  214. normal_recal_table=normal_BQSR.recal_table,
  215. tumor_deduped_bam=tumor_Dedup.deduped_bam,
  216. tumor_deduped_bam_index=tumor_Dedup.deduped_bam_index,
  217. tumor_recal_table=tumor_BQSR.recal_table,
  218. normal_name=sample_id + "_normal",
  219. tumor_name=sample_id + "_tumor",
  220. fasta=fasta,
  221. ref_dir=ref_dir,
  222. regions=regions,
  223. interval_padding=interval_padding,
  224. germline_resource=germline_resource,
  225. germline_resource_tbi=germline_resource_tbi,
  226. pon_vcf=tnseq_pon,
  227. docker=sentieon_docker,
  228. cluster_config=cluster_config,
  229. disk_size=disk_size
  230. }
  231. if (annovar) {
  232. call ANNOVAR.ANNOVAR as TNseq_annovar {
  233. input:
  234. vcf=TNseq.TNseq_vcf,
  235. hg=hg,
  236. database=database,
  237. docker=annovar_docker,
  238. cluster_config=cluster_config,
  239. disk_size=disk_size
  240. }
  241. }
  242. }
  243. if (tnscope) {
  244. call TNscope.TNscope as TNscope {
  245. input:
  246. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  247. SENTIEON_LICENSE=SENTIEON_LICENSE,
  248. sample=sample_id,
  249. normal_deduped_bam=normal_Dedup.deduped_bam,
  250. normal_deduped_bam_index=normal_Dedup.deduped_bam_index,
  251. normal_recal_table=normal_BQSR.recal_table,
  252. tumor_deduped_bam=tumor_Dedup.deduped_bam,
  253. tumor_deduped_bam_index=tumor_Dedup.deduped_bam_index,
  254. tumor_recal_table=tumor_BQSR.recal_table,
  255. normal_name=sample_id + "_normal",
  256. tumor_name=sample_id + "_tumor",
  257. fasta=fasta,
  258. ref_dir=ref_dir,
  259. regions=regions,
  260. interval_padding=interval_padding,
  261. dbsnp=dbsnp,
  262. dbsnp_dir=dbsnp_dir,
  263. pon_vcf=tnscope_pon,
  264. docker=sentieon_docker,
  265. cluster_config=cluster_config,
  266. disk_size=disk_size
  267. }
  268. if (annovar) {
  269. call ANNOVAR.ANNOVAR as TNscope_annovar {
  270. input:
  271. vcf=TNscope.TNscope_vcf,
  272. hg=hg,
  273. database=database,
  274. docker=annovar_docker,
  275. cluster_config=cluster_config,
  276. disk_size=disk_size
  277. }
  278. }
  279. }
  280. if (varscan) {
  281. call somatic.somatic as somatic {
  282. input:
  283. sample=sample_id,
  284. tumor_bam=tumor_Dedup.deduped_bam,
  285. tumor_bam_index=tumor_Dedup.deduped_bam_index,
  286. normal_bam=normal_Dedup.deduped_bam,
  287. normal_bam_index=normal_Dedup.deduped_bam_index,
  288. ref_dir=ref_dir,
  289. fasta=fasta,
  290. docker=varscan_docker,
  291. disk_size=disk_size,
  292. cluster_config=cluster_config
  293. }
  294. call processSomatic.processSomatic as processSomatic {
  295. input:
  296. sample=sample_id,
  297. varscan_snp=somatic.varscan_snp,
  298. varscan_indel=somatic.varscan_indel,
  299. docker=varscan_docker,
  300. disk_size=disk_size,
  301. cluster_config=cluster_config
  302. }
  303. call somaticFilter.somaticFilter as somaticFilter {
  304. input:
  305. sample=sample_id,
  306. varscan_snp_somatic_hc=processSomatic.varscan_snp_somatic_hc,
  307. varscan_snp_germline_hc=processSomatic.varscan_snp_germline_hc,
  308. varscan_snp_loh_hc=processSomatic.varscan_snp_loh_hc,
  309. varscan_indel_somatic_hc=processSomatic.varscan_indel_somatic_hc,
  310. varscan_indel_germline_hc=processSomatic.varscan_indel_germline_hc,
  311. varscan_indel_loh_hc=processSomatic.varscan_indel_loh_hc,
  312. varscan_indel=somatic.varscan_indel,
  313. docker=varscan_docker,
  314. disk_size=disk_size,
  315. cluster_config=cluster_config
  316. }
  317. if (annovar) {
  318. call ANNOVAR.ANNOVAR as VarScan_annovar {
  319. input:
  320. vcf=somaticFilter.varscan_somatic_filter,
  321. hg=hg,
  322. database=database,
  323. docker=annovar_docker,
  324. cluster_config=cluster_config,
  325. disk_size=disk_size
  326. }
  327. }
  328. }
  329. }