Germline & Somatic short variant discovery (SNVs + Indels) for WGS & WES.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

432 lines
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/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. import "./tasks/VEP.wdl" as VEP
  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. String vep_docker
  26. File ref_dir
  27. String fasta
  28. File dbmills_dir
  29. String db_mills
  30. File dbsnp_dir
  31. String dbsnp
  32. File germline_resource
  33. File germline_resource_tbi
  34. String hg
  35. File annovar_database
  36. File? regions
  37. Int? interval_padding
  38. File? tnseq_pon
  39. File? tnscope_pon
  40. String vep_path
  41. File cache
  42. String species
  43. String vcf2maf_path
  44. String disk_size
  45. String cluster_config
  46. Boolean haplotyper
  47. Boolean tnseq
  48. Boolean tnscope
  49. Boolean varscan
  50. Boolean annovar
  51. Boolean vep
  52. Boolean only_pass
  53. if (tumor_fastq_1!= "") {
  54. call mapping.mapping as tumor_mapping {
  55. input:
  56. group=sample_id + '_tumor',
  57. sample=sample_id + '_tumor',
  58. fastq_1=tumor_fastq_1,
  59. fastq_2=tumor_fastq_2,
  60. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  61. SENTIEON_LICENSE=SENTIEON_LICENSE,
  62. pl="ILLUMINAL",
  63. fasta=fasta,
  64. ref_dir=ref_dir,
  65. docker=sentieon_docker,
  66. disk_size=disk_size,
  67. cluster_config=cluster_config
  68. }
  69. call Metrics.Metrics as tumor_Metrics {
  70. input:
  71. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  72. SENTIEON_LICENSE=SENTIEON_LICENSE,
  73. fasta=fasta,
  74. ref_dir=ref_dir,
  75. sorted_bam=tumor_mapping.sorted_bam,
  76. sorted_bam_index=tumor_mapping.sorted_bam_index,
  77. sample=sample_id + '_tumor',
  78. docker=sentieon_docker,
  79. disk_size=disk_size,
  80. cluster_config=cluster_config
  81. }
  82. call Dedup.Dedup as tumor_Dedup {
  83. input:
  84. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  85. SENTIEON_LICENSE=SENTIEON_LICENSE,
  86. sorted_bam=tumor_mapping.sorted_bam,
  87. sorted_bam_index=tumor_mapping.sorted_bam_index,
  88. sample=sample_id + '_tumor',
  89. docker=sentieon_docker,
  90. disk_size=disk_size,
  91. cluster_config=cluster_config
  92. }
  93. call deduped_Metrics.deduped_Metrics as tumor_deduped_Metrics {
  94. input:
  95. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  96. SENTIEON_LICENSE=SENTIEON_LICENSE,
  97. fasta=fasta,
  98. ref_dir=ref_dir,
  99. deduped_bam=tumor_Dedup.deduped_bam,
  100. deduped_bam_index=tumor_Dedup.deduped_bam_index,
  101. sample=sample_id + '_tumor',
  102. docker=sentieon_docker,
  103. disk_size=disk_size,
  104. cluster_config=cluster_config
  105. }
  106. call BQSR.BQSR as tumor_BQSR {
  107. input:
  108. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  109. SENTIEON_LICENSE=SENTIEON_LICENSE,
  110. fasta=fasta,
  111. ref_dir=ref_dir,
  112. deduped_bam=tumor_Dedup.deduped_bam,
  113. deduped_bam_index=tumor_Dedup.deduped_bam_index,
  114. db_mills=db_mills,
  115. dbmills_dir=dbmills_dir,
  116. dbsnp=dbsnp,
  117. dbsnp_dir=dbsnp_dir,
  118. sample=sample_id + '_tumor',
  119. docker=sentieon_docker,
  120. disk_size=disk_size,
  121. cluster_config=cluster_config
  122. }
  123. }
  124. call mapping.mapping as normal_mapping {
  125. input:
  126. group=sample_id + '_normal',
  127. sample=sample_id + '_normal',
  128. fastq_1=normal_fastq_1,
  129. fastq_2=normal_fastq_2,
  130. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  131. SENTIEON_LICENSE=SENTIEON_LICENSE,
  132. pl="ILLUMINAL",
  133. fasta=fasta,
  134. ref_dir=ref_dir,
  135. docker=sentieon_docker,
  136. disk_size=disk_size,
  137. cluster_config=cluster_config
  138. }
  139. call Metrics.Metrics as normal_Metrics {
  140. input:
  141. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  142. SENTIEON_LICENSE=SENTIEON_LICENSE,
  143. fasta=fasta,
  144. ref_dir=ref_dir,
  145. sorted_bam=normal_mapping.sorted_bam,
  146. sorted_bam_index=normal_mapping.sorted_bam_index,
  147. sample=sample_id + '_normal',
  148. regions=regions,
  149. docker=sentieon_docker,
  150. disk_size=disk_size,
  151. cluster_config=cluster_config
  152. }
  153. call Dedup.Dedup as normal_Dedup {
  154. input:
  155. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  156. SENTIEON_LICENSE=SENTIEON_LICENSE,
  157. sorted_bam=normal_mapping.sorted_bam,
  158. sorted_bam_index=normal_mapping.sorted_bam_index,
  159. sample=sample_id + '_normal',
  160. docker=sentieon_docker,
  161. disk_size=disk_size,
  162. cluster_config=cluster_config
  163. }
  164. call deduped_Metrics.deduped_Metrics as normal_deduped_Metrics {
  165. input:
  166. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  167. SENTIEON_LICENSE=SENTIEON_LICENSE,
  168. fasta=fasta,
  169. ref_dir=ref_dir,
  170. deduped_bam=normal_Dedup.deduped_bam,
  171. deduped_bam_index=normal_Dedup.deduped_bam_index,
  172. sample=sample_id + '_normal',
  173. regions=regions,
  174. docker=sentieon_docker,
  175. disk_size=disk_size,
  176. cluster_config=cluster_config
  177. }
  178. call BQSR.BQSR as normal_BQSR {
  179. input:
  180. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  181. SENTIEON_LICENSE=SENTIEON_LICENSE,
  182. fasta=fasta,
  183. ref_dir=ref_dir,
  184. deduped_bam=normal_Dedup.deduped_bam,
  185. deduped_bam_index=normal_Dedup.deduped_bam_index,
  186. db_mills=db_mills,
  187. dbmills_dir=dbmills_dir,
  188. dbsnp=dbsnp,
  189. dbsnp_dir=dbsnp_dir,
  190. sample=sample_id + '_normal',
  191. docker=sentieon_docker,
  192. disk_size=disk_size,
  193. cluster_config=cluster_config
  194. }
  195. if (haplotyper) {
  196. call Haplotyper.Haplotyper as Haplotyper {
  197. input:
  198. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  199. SENTIEON_LICENSE=SENTIEON_LICENSE,
  200. sample=sample_id + '_normal',
  201. fasta=fasta,
  202. ref_dir=ref_dir,
  203. deduped_bam=normal_Dedup.deduped_bam,
  204. deduped_bam_index=normal_Dedup.deduped_bam_index,
  205. recal_table=normal_BQSR.recal_table,
  206. dbsnp=dbsnp,
  207. dbsnp_dir=dbsnp_dir,
  208. regions=regions,
  209. docker=sentieon_docker,
  210. disk_size=disk_size,
  211. cluster_config=cluster_config
  212. }
  213. }
  214. if (tnseq) {
  215. call TNseq.TNseq as TNseq {
  216. input:
  217. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  218. SENTIEON_LICENSE=SENTIEON_LICENSE,
  219. sample=sample_id,
  220. normal_deduped_bam=normal_Dedup.deduped_bam,
  221. normal_deduped_bam_index=normal_Dedup.deduped_bam_index,
  222. normal_recal_table=normal_BQSR.recal_table,
  223. tumor_deduped_bam=tumor_Dedup.deduped_bam,
  224. tumor_deduped_bam_index=tumor_Dedup.deduped_bam_index,
  225. tumor_recal_table=tumor_BQSR.recal_table,
  226. normal_name=sample_id + "_normal",
  227. tumor_name=sample_id + "_tumor",
  228. fasta=fasta,
  229. ref_dir=ref_dir,
  230. regions=regions,
  231. interval_padding=interval_padding,
  232. germline_resource=germline_resource,
  233. germline_resource_tbi=germline_resource_tbi,
  234. pon_vcf=tnseq_pon,
  235. docker=sentieon_docker,
  236. cluster_config=cluster_config,
  237. disk_size=disk_size
  238. }
  239. if (annovar) {
  240. call ANNOVAR.ANNOVAR as TNseq_annovar {
  241. input:
  242. vcf=TNseq.TNseq_vcf,
  243. hg=hg,
  244. only_pass=only_pass,
  245. annovar_database=annovar_database,
  246. docker=annovar_docker,
  247. cluster_config=cluster_config,
  248. disk_size=disk_size
  249. }
  250. }
  251. if (vep) {
  252. call VEP.VEP as TNseq_VEP {
  253. input:
  254. vcf=TNseq.TNseq_vcf,
  255. hg=hg,
  256. only_pass=only_pass,
  257. sample_id=sample_id,
  258. tumor_id=sample_id + "_tumor",
  259. normal_id=sample_id + "_normal",
  260. ref_dir=ref_dir,
  261. fasta=fasta,
  262. vep_path=vep_path,
  263. cache=cache,
  264. species=species,
  265. vcf2maf_path=vcf2maf_path,
  266. docker=vep_docker,
  267. cluster_config=cluster_config,
  268. disk_size=disk_size
  269. }
  270. }
  271. }
  272. if (tnscope) {
  273. call TNscope.TNscope as TNscope {
  274. input:
  275. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  276. SENTIEON_LICENSE=SENTIEON_LICENSE,
  277. sample=sample_id,
  278. normal_deduped_bam=normal_Dedup.deduped_bam,
  279. normal_deduped_bam_index=normal_Dedup.deduped_bam_index,
  280. normal_recal_table=normal_BQSR.recal_table,
  281. tumor_deduped_bam=tumor_Dedup.deduped_bam,
  282. tumor_deduped_bam_index=tumor_Dedup.deduped_bam_index,
  283. tumor_recal_table=tumor_BQSR.recal_table,
  284. normal_name=sample_id + "_normal",
  285. tumor_name=sample_id + "_tumor",
  286. fasta=fasta,
  287. ref_dir=ref_dir,
  288. regions=regions,
  289. interval_padding=interval_padding,
  290. dbsnp=dbsnp,
  291. dbsnp_dir=dbsnp_dir,
  292. pon_vcf=tnscope_pon,
  293. docker=sentieon_docker,
  294. cluster_config=cluster_config,
  295. disk_size=disk_size
  296. }
  297. if (annovar) {
  298. call ANNOVAR.ANNOVAR as TNscope_annovar {
  299. input:
  300. vcf=TNscope.TNscope_vcf,
  301. hg=hg,
  302. only_pass=only_pass,
  303. annovar_database=annovar_database,
  304. docker=annovar_docker,
  305. cluster_config=cluster_config,
  306. disk_size=disk_size
  307. }
  308. }
  309. if (vep) {
  310. call VEP.VEP as TNscope_VEP {
  311. input:
  312. vcf=TNscope.TNscope_vcf,
  313. hg=hg,
  314. only_pass=only_pass,
  315. sample_id=sample_id,
  316. tumor_id=sample_id + "_tumor",
  317. normal_id=sample_id + "_normal",
  318. ref_dir=ref_dir,
  319. fasta=fasta,
  320. vep_path=vep_path,
  321. cache=cache,
  322. species=species,
  323. vcf2maf_path=vcf2maf_path,
  324. docker=vep_docker,
  325. cluster_config=cluster_config,
  326. disk_size=disk_size
  327. }
  328. }
  329. }
  330. if (varscan) {
  331. call somatic.somatic as somatic {
  332. input:
  333. sample=sample_id,
  334. tumor_bam=tumor_Dedup.deduped_bam,
  335. tumor_bam_index=tumor_Dedup.deduped_bam_index,
  336. normal_bam=normal_Dedup.deduped_bam,
  337. normal_bam_index=normal_Dedup.deduped_bam_index,
  338. ref_dir=ref_dir,
  339. fasta=fasta,
  340. docker=varscan_docker,
  341. disk_size=disk_size,
  342. cluster_config=cluster_config
  343. }
  344. call processSomatic.processSomatic as processSomatic {
  345. input:
  346. sample=sample_id,
  347. varscan_snp=somatic.varscan_snp,
  348. varscan_indel=somatic.varscan_indel,
  349. docker=varscan_docker,
  350. disk_size=disk_size,
  351. cluster_config=cluster_config
  352. }
  353. call somaticFilter.somaticFilter as somaticFilter {
  354. input:
  355. sample=sample_id,
  356. varscan_snp_somatic_hc=processSomatic.varscan_snp_somatic_hc,
  357. varscan_snp_germline_hc=processSomatic.varscan_snp_germline_hc,
  358. varscan_snp_loh_hc=processSomatic.varscan_snp_loh_hc,
  359. varscan_indel_somatic_hc=processSomatic.varscan_indel_somatic_hc,
  360. varscan_indel_germline_hc=processSomatic.varscan_indel_germline_hc,
  361. varscan_indel_loh_hc=processSomatic.varscan_indel_loh_hc,
  362. varscan_indel=somatic.varscan_indel,
  363. docker=varscan_docker,
  364. disk_size=disk_size,
  365. cluster_config=cluster_config
  366. }
  367. if (annovar) {
  368. call ANNOVAR.ANNOVAR as VarScan_annovar {
  369. input:
  370. vcf=somaticFilter.varscan_somatic_filter,
  371. hg=hg,
  372. only_pass=only_pass,
  373. annovar_database=annovar_database,
  374. docker=annovar_docker,
  375. cluster_config=cluster_config,
  376. disk_size=disk_size
  377. }
  378. }
  379. if (vep) {
  380. call VEP.VEP as VarScan_VEP {
  381. input:
  382. vcf=VarScan.VarScan_vcf,
  383. hg=hg,
  384. only_pass=only_pass,
  385. sample_id=sample_id,
  386. tumor_id=sample_id + "_tumor",
  387. normal_id=sample_id + "_normal",
  388. ref_dir=ref_dir,
  389. fasta=fasta,
  390. vep_path=vep_path,
  391. cache=cache,
  392. species=species,
  393. vcf2maf_path=vcf2maf_path,
  394. docker=vep_docker,
  395. cluster_config=cluster_config,
  396. disk_size=disk_size
  397. }
  398. }
  399. }
  400. }