Germline & Somatic short variant discovery (SNVs + Indels) for WGS & WES.
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

361 líneas
10.0KB

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