Germline & Somatic short variant discovery (SNVs + Indels) for WGS & WES.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

413 lignes
11KB

  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. docker=sentieon_docker,
  127. disk_size=disk_size,
  128. cluster_config=cluster_config
  129. }
  130. }
  131. call mapping.mapping as normal_mapping {
  132. input:
  133. group=sample_id + '_normal',
  134. sample=sample_id + '_normal',
  135. fastq_1=normal_fastq_1,
  136. fastq_2=normal_fastq_2,
  137. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  138. SENTIEON_LICENSE=SENTIEON_LICENSE,
  139. pl="ILLUMINAL",
  140. fasta=fasta,
  141. ref_dir=ref_dir,
  142. docker=sentieon_docker,
  143. disk_size=disk_size,
  144. cluster_config=cluster_config
  145. }
  146. call Metrics.Metrics as normal_Metrics {
  147. input:
  148. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  149. SENTIEON_LICENSE=SENTIEON_LICENSE,
  150. fasta=fasta,
  151. ref_dir=ref_dir,
  152. sorted_bam=normal_mapping.sorted_bam,
  153. sorted_bam_index=normal_mapping.sorted_bam_index,
  154. sample=sample_id + '_normal',
  155. regions=regions,
  156. docker=sentieon_docker,
  157. disk_size=disk_size,
  158. cluster_config=cluster_config
  159. }
  160. call Dedup.Dedup as normal_Dedup {
  161. input:
  162. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  163. SENTIEON_LICENSE=SENTIEON_LICENSE,
  164. sorted_bam=normal_mapping.sorted_bam,
  165. sorted_bam_index=normal_mapping.sorted_bam_index,
  166. sample=sample_id + '_normal',
  167. docker=sentieon_docker,
  168. disk_size=disk_size,
  169. cluster_config=cluster_config
  170. }
  171. call deduped_Metrics.deduped_Metrics as normal_deduped_Metrics {
  172. input:
  173. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  174. SENTIEON_LICENSE=SENTIEON_LICENSE,
  175. fasta=fasta,
  176. ref_dir=ref_dir,
  177. Dedup_bam=normal_Dedup.Dedup_bam,
  178. Dedup_bam_index=normal_Dedup.Dedup_bam_index,
  179. sample=sample_id + '_normal',
  180. regions=regions,
  181. docker=sentieon_docker,
  182. disk_size=disk_size,
  183. cluster_config=cluster_config
  184. }
  185. call Realigner.Realigner as normal_Realigner {
  186. input:
  187. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  188. SENTIEON_LICENSE=SENTIEON_LICENSE,
  189. fasta=fasta,
  190. ref_dir=ref_dir,
  191. Dedup_bam=normal_Dedup.Dedup_bam,
  192. Dedup_bam_index=normal_Dedup.Dedup_bam_index,
  193. db_mills=db_mills,
  194. dbmills_dir=dbmills_dir,
  195. sample=sample_id + '_normal',
  196. docker=sentieon_docker,
  197. disk_size=disk_size,
  198. regions=regions,
  199. cluster_config=cluster_config
  200. }
  201. call BQSR.BQSR as normal_BQSR {
  202. input:
  203. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  204. SENTIEON_LICENSE=SENTIEON_LICENSE,
  205. fasta=fasta,
  206. ref_dir=ref_dir,
  207. realigned_bam=normal_Realigner.realigner_bam,
  208. realigned_bam_index=normal_Realigner.realigner_bam_index,
  209. db_mills=db_mills,
  210. dbmills_dir=dbmills_dir,
  211. dbsnp=dbsnp,
  212. dbsnp_dir=dbsnp_dir,
  213. sample=sample_id + '_normal',
  214. docker=sentieon_docker,
  215. disk_size=disk_size,
  216. cluster_config=cluster_config
  217. }
  218. if (haplotyper) {
  219. call Haplotyper.Haplotyper as Haplotyper {
  220. input:
  221. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  222. SENTIEON_LICENSE=SENTIEON_LICENSE,
  223. sample=sample_id + '_normal',
  224. fasta=fasta,
  225. ref_dir=ref_dir,
  226. recaled_bam=normal_BQSR.recaled_bam,
  227. recaled_bam_index=normal_BQSR.recaled_bam_index,
  228. recal_table=normal_BQSR.recal_table,
  229. dbsnp=dbsnp,
  230. dbsnp_dir=dbsnp_dir,
  231. regions=regions,
  232. docker=sentieon_docker,
  233. disk_size=disk_size,
  234. cluster_config=cluster_config
  235. }
  236. }
  237. if (tnseq) {
  238. call TNseq.TNseq as TNseq {
  239. input:
  240. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  241. SENTIEON_LICENSE=SENTIEON_LICENSE,
  242. sample=sample_id,
  243. normal_recaled_bam=normal_BQSR.recaled_bam,
  244. normal_recaled_bam_index=normal_BQSR.recaled_bam_index,
  245. normal_recal_table=normal_BQSR.recal_table,
  246. tumor_recaled_bam=tumor_BQSR.recaled_bam,
  247. tumor_recaled_bam_index=tumor_BQSR.recaled_bam_index,
  248. tumor_recal_table=tumor_BQSR.recal_table,
  249. normal_name=sample_id + "_normal",
  250. tumor_name=sample_id + "_tumor",
  251. fasta=fasta,
  252. ref_dir=ref_dir,
  253. regions=regions,
  254. interval_padding=interval_padding,
  255. germline_resource=germline_resource,
  256. germline_resource_tbi=germline_resource_tbi,
  257. pon_vcf=tnseq_pon,
  258. docker=sentieon_docker,
  259. cluster_config=cluster_config,
  260. disk_size=disk_size
  261. }
  262. call annovar.annovar as TNseq_annovar {
  263. input:
  264. sample=sample_id,
  265. vcf=TNseq.TNseq_vcf,
  266. database=database,
  267. docker=annovar_docker,
  268. cluster_config=cluster_config,
  269. disk_size=disk_size
  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_recaled_bam=normal_BQSR.recaled_bam,
  279. normal_recaled_bam_index=normal_BQSR.recaled_bam_index,
  280. normal_recal_table=normal_BQSR.recal_table,
  281. tumor_recaled_bam=tumor_BQSR.recaled_bam,
  282. tumor_recaled_bam_index=tumor_BQSR.recaled_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. call annovar.annovar as TNscope_annovar {
  298. input:
  299. sample=sample_id,
  300. vcf=TNscope.TNscope_vcf,
  301. database=database,
  302. docker=annovar_docker,
  303. cluster_config=cluster_config,
  304. disk_size=disk_size
  305. }
  306. }
  307. if (varscan) {
  308. call somatic.somatic as somatic {
  309. input:
  310. sample=sample_id,
  311. tumor_bam=tumor_BQSR.recaled_bam,
  312. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  313. normal_bam=normal_BQSR.recaled_bam,
  314. normal_bam_index=normal_BQSR.recaled_bam_index,
  315. ref_dir=ref_dir,
  316. fasta=fasta,
  317. docker=varscan_docker,
  318. disk_size=disk_size,
  319. cluster_config=cluster_config
  320. }
  321. call processSomatic.processSomatic as processSomatic {
  322. input:
  323. sample=sample_id,
  324. varscan_snp=somatic.varscan_snp,
  325. varscan_indel=somatic.varscan_indel,
  326. docker=varscan_docker,
  327. disk_size=disk_size,
  328. cluster_config=cluster_config
  329. }
  330. call somaticFilter.somaticFilter as somaticFilter {
  331. input:
  332. sample=sample_id,
  333. varscan_snp_somatic_hc=processSomatic.varscan_snp_somatic_hc,
  334. varscan_snp_germline_hc=processSomatic.varscan_snp_germline_hc,
  335. varscan_snp_loh_hc=processSomatic.varscan_snp_loh_hc,
  336. varscan_indel_somatic_hc=processSomatic.varscan_indel_somatic_hc,
  337. varscan_indel_germline_hc=processSomatic.varscan_indel_germline_hc,
  338. varscan_indel_loh_hc=processSomatic.varscan_indel_loh_hc,
  339. varscan_indel=somatic.varscan_indel,
  340. docker=varscan_docker,
  341. disk_size=disk_size,
  342. cluster_config=cluster_config
  343. }
  344. call annovar.annovar as snp_somatic_annovar {
  345. input:
  346. sample=sample_id,
  347. vcf=somaticFilter.varscan_snp_somatic_filter,
  348. database=database,
  349. docker=annovar_docker,
  350. cluster_config=cluster_config,
  351. disk_size=disk_size
  352. }
  353. call annovar.annovar as snp_loh_annovar {
  354. input:
  355. sample=sample_id,
  356. vcf=somaticFilter.varscan_snp_loh_filter,
  357. database=database,
  358. docker=annovar_docker,
  359. cluster_config=cluster_config,
  360. disk_size=disk_size
  361. }
  362. call annovar.annovar as indel_somatic_annovar {
  363. input:
  364. sample=sample_id,
  365. vcf=somaticFilter.varscan_indel_somatic_filter,
  366. database=database,
  367. docker=annovar_docker,
  368. cluster_config=cluster_config,
  369. disk_size=disk_size
  370. }
  371. call annovar.annovar as indel_loh_annovar {
  372. input:
  373. sample=sample_id,
  374. vcf=somaticFilter.varscan_indel_loh_filter,
  375. database=database,
  376. docker=annovar_docker,
  377. cluster_config=cluster_config,
  378. disk_size=disk_size
  379. }
  380. }
  381. }