Automated integrated analysis software for genomics data of the cancer patients.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

354 lines
9.1KB

  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/bcftools.wdl" as bcftools
  9. import "./tasks/ANNOVAR.wdl" as ANNOVAR
  10. import "./tasks/Manta.wdl" as Manta
  11. import "./tasks/AnnotSV.wdl" as AnnotSV
  12. import "./tasks/CNVkit.wdl" as CNVkit
  13. import "./tasks/MSIsensor.wdl" as MSIsensor
  14. import "./tasks/HRD.wdl" as HRD
  15. import "./tasks/TMB.wdl" as TMB
  16. workflow {{ project_name }} {
  17. String sample_id
  18. File? tumor_fastq_1
  19. File? tumor_fastq_2
  20. File? normal_fastq_1
  21. File? normal_fastq_2
  22. String? duplex_umi
  23. String? read_structure
  24. String SENTIEON_LICENSE
  25. String sentieon_docker
  26. String manta_docker
  27. String bcftools_docker
  28. String annovar_docker
  29. String annotsv_docker
  30. String cnvkit_docker
  31. String sequenza_docker
  32. String msisensor_docker
  33. String tmb_docker
  34. String platform
  35. File ref_dir
  36. String fasta
  37. File dbmills_dir
  38. String db_mills
  39. File dbsnp_dir
  40. String dbsnp
  41. File germline_resource
  42. File germline_resource_tbi
  43. File annovar_database
  44. File annotsv_database
  45. File gc
  46. File baseline
  47. File? regions
  48. Int? interval_padding
  49. String disk_size
  50. String cluster_config
  51. if (tumor_fastq_1!= "") {
  52. call mapping.mapping as tumor_mapping {
  53. input:
  54. group=sample_id + '.T',
  55. sample=sample_id + '.T',
  56. fastq_1=tumor_fastq_1,
  57. fastq_2=tumor_fastq_2,
  58. SENTIEON_LICENSE=SENTIEON_LICENSE,
  59. duplex_umi=duplex_umi,
  60. read_structure=read_structure,
  61. platform=platform,
  62. fasta=fasta,
  63. ref_dir=ref_dir,
  64. docker=sentieon_docker,
  65. disk_size=disk_size,
  66. cluster_config=cluster_config
  67. }
  68. call Metrics.Metrics as tumor_Metrics {
  69. input:
  70. SENTIEON_LICENSE=SENTIEON_LICENSE,
  71. fasta=fasta,
  72. ref_dir=ref_dir,
  73. sorted_bam=tumor_mapping.sorted_bam,
  74. sorted_bam_index=tumor_mapping.sorted_bam_index,
  75. sample=sample_id + '.T',
  76. docker=sentieon_docker,
  77. disk_size=disk_size,
  78. cluster_config=cluster_config
  79. }
  80. call Dedup.Dedup as tumor_Dedup {
  81. input:
  82. SENTIEON_LICENSE=SENTIEON_LICENSE,
  83. sorted_bam=tumor_mapping.sorted_bam,
  84. sorted_bam_index=tumor_mapping.sorted_bam_index,
  85. sample=sample_id + '.T',
  86. docker=sentieon_docker,
  87. disk_size=disk_size,
  88. cluster_config=cluster_config
  89. }
  90. call deduped_Metrics.deduped_Metrics as tumor_deduped_Metrics {
  91. input:
  92. SENTIEON_LICENSE=SENTIEON_LICENSE,
  93. fasta=fasta,
  94. ref_dir=ref_dir,
  95. deduped_bam=tumor_Dedup.deduped_bam,
  96. deduped_bam_index=tumor_Dedup.deduped_bam_index,
  97. sample=sample_id + '.T',
  98. docker=sentieon_docker,
  99. disk_size=disk_size,
  100. cluster_config=cluster_config
  101. }
  102. call BQSR.BQSR as tumor_BQSR {
  103. input:
  104. SENTIEON_LICENSE=SENTIEON_LICENSE,
  105. fasta=fasta,
  106. ref_dir=ref_dir,
  107. deduped_bam=tumor_Dedup.deduped_bam,
  108. deduped_bam_index=tumor_Dedup.deduped_bam_index,
  109. db_mills=db_mills,
  110. dbmills_dir=dbmills_dir,
  111. dbsnp=dbsnp,
  112. dbsnp_dir=dbsnp_dir,
  113. sample=sample_id + '.T',
  114. docker=sentieon_docker,
  115. disk_size=disk_size,
  116. cluster_config=cluster_config
  117. }
  118. }
  119. if (normal_fastq_1!= "") {
  120. call mapping.mapping as normal_mapping {
  121. input:
  122. group=sample_id + '.N',
  123. sample=sample_id + '.N',
  124. fastq_1=normal_fastq_1,
  125. fastq_2=normal_fastq_2,
  126. SENTIEON_LICENSE=SENTIEON_LICENSE,
  127. duplex_umi=duplex_umi,
  128. read_structure=read_structure,
  129. platform=platform,
  130. fasta=fasta,
  131. ref_dir=ref_dir,
  132. docker=sentieon_docker,
  133. disk_size=disk_size,
  134. cluster_config=cluster_config
  135. }
  136. call Metrics.Metrics as normal_Metrics {
  137. input:
  138. SENTIEON_LICENSE=SENTIEON_LICENSE,
  139. fasta=fasta,
  140. ref_dir=ref_dir,
  141. sorted_bam=normal_mapping.sorted_bam,
  142. sorted_bam_index=normal_mapping.sorted_bam_index,
  143. sample=sample_id + '.N',
  144. regions=regions,
  145. docker=sentieon_docker,
  146. disk_size=disk_size,
  147. cluster_config=cluster_config
  148. }
  149. call Dedup.Dedup as normal_Dedup {
  150. input:
  151. SENTIEON_LICENSE=SENTIEON_LICENSE,
  152. sorted_bam=normal_mapping.sorted_bam,
  153. sorted_bam_index=normal_mapping.sorted_bam_index,
  154. sample=sample_id + '.N',
  155. docker=sentieon_docker,
  156. disk_size=disk_size,
  157. cluster_config=cluster_config
  158. }
  159. call deduped_Metrics.deduped_Metrics as normal_deduped_Metrics {
  160. input:
  161. SENTIEON_LICENSE=SENTIEON_LICENSE,
  162. fasta=fasta,
  163. ref_dir=ref_dir,
  164. deduped_bam=normal_Dedup.deduped_bam,
  165. deduped_bam_index=normal_Dedup.deduped_bam_index,
  166. sample=sample_id + '.N',
  167. regions=regions,
  168. docker=sentieon_docker,
  169. disk_size=disk_size,
  170. cluster_config=cluster_config
  171. }
  172. call BQSR.BQSR as normal_BQSR {
  173. input:
  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 + '.N',
  184. docker=sentieon_docker,
  185. disk_size=disk_size,
  186. cluster_config=cluster_config
  187. }
  188. call Haplotyper.Haplotyper as Haplotyper {
  189. input:
  190. SENTIEON_LICENSE=SENTIEON_LICENSE,
  191. sample=sample_id + '.N',
  192. fasta=fasta,
  193. ref_dir=ref_dir,
  194. recaled_bam=normal_BQSR.recaled_bam,
  195. recaled_bam_index=normal_BQSR.recaled_bam_index,
  196. dbsnp=dbsnp,
  197. dbsnp_dir=dbsnp_dir,
  198. regions=regions,
  199. docker=sentieon_docker,
  200. disk_size=disk_size,
  201. cluster_config=cluster_config
  202. }
  203. call bcftools.bcftools as Haplotyper_bcftools {
  204. input:
  205. vcf=Haplotyper.vcf,
  206. fasta=fasta,
  207. ref_dir=ref_dir,
  208. docker=bcftools_docker,
  209. cluster_config=cluster_config,
  210. disk_size=disk_size
  211. }
  212. }
  213. call Manta.Manta as Manta {
  214. input:
  215. sample=sample_id,
  216. fasta=fasta,
  217. ref_dir=ref_dir,
  218. regions=regions,
  219. normal_bam=normal_BQSR.recaled_bam,
  220. normal_bam_index=normal_BQSR.recaled_bam_index,
  221. tumor_bam=tumor_BQSR.recaled_bam,
  222. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  223. docker=manta_docker,
  224. cluster_config=cluster_config,
  225. disk_size=disk_size
  226. }
  227. call AnnotSV.AnnotSV as Manta_AnnotSV {
  228. input:
  229. sample=sample_id,
  230. somatic_vcf=Manta.somatic_vcf,
  231. germline_vcf=Manta.germline_vcf,
  232. annotsv_database=annotsv_database,
  233. docker=annotsv_docker,
  234. cluster_config=cluster_config,
  235. disk_size=disk_size
  236. }
  237. call TNseq.TNseq as TNseq {
  238. input:
  239. SENTIEON_LICENSE=SENTIEON_LICENSE,
  240. sample=sample_id,
  241. normal_bam=normal_BQSR.recaled_bam,
  242. normal_bam_index=normal_BQSR.recaled_bam_index,
  243. tumor_bam=tumor_BQSR.recaled_bam,
  244. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  245. normal_name=sample_id + ".N",
  246. tumor_name=sample_id + ".T",
  247. fasta=fasta,
  248. ref_dir=ref_dir,
  249. regions=regions,
  250. interval_padding=interval_padding,
  251. germline_resource=germline_resource,
  252. germline_resource_tbi=germline_resource_tbi,
  253. docker=sentieon_docker,
  254. cluster_config=cluster_config,
  255. disk_size=disk_size
  256. }
  257. call bcftools.bcftools as TNseq_bcftools {
  258. input:
  259. vcf=TNseq.vcf,
  260. fasta=fasta,
  261. ref_dir=ref_dir,
  262. docker=bcftools_docker,
  263. cluster_config=cluster_config,
  264. disk_size=disk_size
  265. }
  266. call ANNOVAR.ANNOVAR as TNseq_ANNOVAR {
  267. input:
  268. vcf=TNseq_bcftools.norm_vcf,
  269. annovar_database=annovar_database,
  270. docker=annovar_docker,
  271. cluster_config=cluster_config,
  272. disk_size=disk_size
  273. }
  274. call MSIsensor.MSIsensor as MSIsensor {
  275. input:
  276. sample=sample_id,
  277. fasta=fasta,
  278. ref_dir=ref_dir,
  279. normal_bam=normal_BQSR.recaled_bam,
  280. normal_bam_index=normal_BQSR.recaled_bam_index,
  281. tumor_bam=tumor_BQSR.recaled_bam,
  282. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  283. baseline=baseline,
  284. docker=msisensor_docker,
  285. cluster_config=cluster_config,
  286. disk_size=disk_size
  287. }
  288. call HRD.HRD as HRD {
  289. input:
  290. sample=sample_id,
  291. fasta=fasta,
  292. ref_dir=ref_dir,
  293. gc=gc,
  294. normal_bam=normal_BQSR.recaled_bam,
  295. normal_bam_index=normal_BQSR.recaled_bam_index,
  296. tumor_bam=tumor_BQSR.recaled_bam,
  297. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  298. docker=sequenza_docker,
  299. cluster_config=cluster_config,
  300. disk_size=disk_size
  301. }
  302. call TMB.TMB as TMB {
  303. input:
  304. sample=sample_id,
  305. regions=regions,
  306. snpindel_txt=TNseq_ANNOVAR.multianno_txt,
  307. docker=tmb_docker,
  308. cluster_config=cluster_config,
  309. disk_size=disk_size
  310. }
  311. call CNVkit.CNVkit as CNVkit {
  312. input:
  313. sample=sample_id,
  314. fasta=fasta,
  315. ref_dir=ref_dir,
  316. regions=regions,
  317. ref_flat=ref_flat,
  318. normal_bam=normal_BQSR.recaled_bam,
  319. normal_bam_index=normal_BQSR.recaled_bam_index,
  320. tumor_bam=tumor_BQSR.recaled_bam,
  321. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  322. hrd=HRD.hrd,
  323. docker=cnvkit_docker,
  324. cluster_config=cluster_config,
  325. disk_size=disk_size
  326. }
  327. }