Automated integrated analysis software for genomics data of the cancer patients.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

352 行
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? regions
  46. Int? interval_padding
  47. String disk_size
  48. String cluster_config
  49. if (tumor_fastq_1!= "") {
  50. call mapping.mapping as tumor_mapping {
  51. input:
  52. group=sample_id + '.T',
  53. sample=sample_id + '.T',
  54. fastq_1=tumor_fastq_1,
  55. fastq_2=tumor_fastq_2,
  56. SENTIEON_LICENSE=SENTIEON_LICENSE,
  57. duplex_umi=duplex_umi,
  58. read_structure=read_structure,
  59. platform=platform,
  60. fasta=fasta,
  61. ref_dir=ref_dir,
  62. docker=sentieon_docker,
  63. disk_size=disk_size,
  64. cluster_config=cluster_config
  65. }
  66. call Metrics.Metrics as tumor_Metrics {
  67. input:
  68. SENTIEON_LICENSE=SENTIEON_LICENSE,
  69. fasta=fasta,
  70. ref_dir=ref_dir,
  71. sorted_bam=tumor_mapping.sorted_bam,
  72. sorted_bam_index=tumor_mapping.sorted_bam_index,
  73. sample=sample_id + '.T',
  74. docker=sentieon_docker,
  75. disk_size=disk_size,
  76. cluster_config=cluster_config
  77. }
  78. call Dedup.Dedup as tumor_Dedup {
  79. input:
  80. SENTIEON_LICENSE=SENTIEON_LICENSE,
  81. sorted_bam=tumor_mapping.sorted_bam,
  82. sorted_bam_index=tumor_mapping.sorted_bam_index,
  83. sample=sample_id + '.T',
  84. docker=sentieon_docker,
  85. disk_size=disk_size,
  86. cluster_config=cluster_config
  87. }
  88. call deduped_Metrics.deduped_Metrics as tumor_deduped_Metrics {
  89. input:
  90. SENTIEON_LICENSE=SENTIEON_LICENSE,
  91. fasta=fasta,
  92. ref_dir=ref_dir,
  93. deduped_bam=tumor_Dedup.deduped_bam,
  94. deduped_bam_index=tumor_Dedup.deduped_bam_index,
  95. sample=sample_id + '.T',
  96. docker=sentieon_docker,
  97. disk_size=disk_size,
  98. cluster_config=cluster_config
  99. }
  100. call BQSR.BQSR as tumor_BQSR {
  101. input:
  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 + '.T',
  112. docker=sentieon_docker,
  113. disk_size=disk_size,
  114. cluster_config=cluster_config
  115. }
  116. }
  117. if (normal_fastq_1!= "") {
  118. call mapping.mapping as normal_mapping {
  119. input:
  120. group=sample_id + '.N',
  121. sample=sample_id + '.N',
  122. fastq_1=normal_fastq_1,
  123. fastq_2=normal_fastq_2,
  124. SENTIEON_LICENSE=SENTIEON_LICENSE,
  125. duplex_umi=duplex_umi,
  126. read_structure=read_structure,
  127. platform=platform,
  128. fasta=fasta,
  129. ref_dir=ref_dir,
  130. docker=sentieon_docker,
  131. disk_size=disk_size,
  132. cluster_config=cluster_config
  133. }
  134. call Metrics.Metrics as normal_Metrics {
  135. input:
  136. SENTIEON_LICENSE=SENTIEON_LICENSE,
  137. fasta=fasta,
  138. ref_dir=ref_dir,
  139. sorted_bam=normal_mapping.sorted_bam,
  140. sorted_bam_index=normal_mapping.sorted_bam_index,
  141. sample=sample_id + '.N',
  142. regions=regions,
  143. docker=sentieon_docker,
  144. disk_size=disk_size,
  145. cluster_config=cluster_config
  146. }
  147. call Dedup.Dedup as normal_Dedup {
  148. input:
  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 + '.N',
  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_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 + '.N',
  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_LICENSE=SENTIEON_LICENSE,
  173. fasta=fasta,
  174. ref_dir=ref_dir,
  175. deduped_bam=normal_Dedup.deduped_bam,
  176. deduped_bam_index=normal_Dedup.deduped_bam_index,
  177. db_mills=db_mills,
  178. dbmills_dir=dbmills_dir,
  179. dbsnp=dbsnp,
  180. dbsnp_dir=dbsnp_dir,
  181. sample=sample_id + '.N',
  182. docker=sentieon_docker,
  183. disk_size=disk_size,
  184. cluster_config=cluster_config
  185. }
  186. call Haplotyper.Haplotyper as Haplotyper {
  187. input:
  188. SENTIEON_LICENSE=SENTIEON_LICENSE,
  189. sample=sample_id + '.N',
  190. fasta=fasta,
  191. ref_dir=ref_dir,
  192. recaled_bam=normal_BQSR.recaled_bam,
  193. recaled_bam_index=normal_BQSR.recaled_bam_index,
  194. dbsnp=dbsnp,
  195. dbsnp_dir=dbsnp_dir,
  196. regions=regions,
  197. docker=sentieon_docker,
  198. disk_size=disk_size,
  199. cluster_config=cluster_config
  200. }
  201. call bcftools.bcftools as Haplotyper_bcftools {
  202. input:
  203. vcf=Haplotyper.vcf,
  204. fasta=fasta,
  205. ref_dir=ref_dir,
  206. docker=bcftools_docker,
  207. cluster_config=cluster_config,
  208. disk_size=disk_size
  209. }
  210. }
  211. call Manta.Manta as Manta {
  212. input:
  213. sample=sample_id,
  214. fasta=fasta,
  215. ref_dir=ref_dir,
  216. regions=regions,
  217. normal_bam=normal_BQSR.recaled_bam,
  218. normal_bam_index=normal_BQSR.recaled_bam_index,
  219. tumor_bam=tumor_BQSR.recaled_bam,
  220. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  221. docker=manta_docker,
  222. cluster_config=cluster_config,
  223. disk_size=disk_size
  224. }
  225. call AnnotSV.AnnotSV as Manta_AnnotSV {
  226. input:
  227. sample=sample_id,
  228. somatic_vcf=Manta.somatic_vcf,
  229. germline_vcf=Manta.germline_vcf,
  230. annotsv_database=annotsv_database,
  231. docker=annotsv_docker,
  232. cluster_config=cluster_config,
  233. disk_size=disk_size
  234. }
  235. call TNseq.TNseq as TNseq {
  236. input:
  237. SENTIEON_LICENSE=SENTIEON_LICENSE,
  238. sample=sample_id,
  239. normal_bam=normal_BQSR.recaled_bam,
  240. normal_bam_index=normal_BQSR.recaled_bam_index,
  241. tumor_bam=tumor_BQSR.recaled_bam,
  242. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  243. normal_name=sample_id + ".N",
  244. tumor_name=sample_id + ".T",
  245. fasta=fasta,
  246. ref_dir=ref_dir,
  247. regions=regions,
  248. interval_padding=interval_padding,
  249. germline_resource=germline_resource,
  250. germline_resource_tbi=germline_resource_tbi,
  251. docker=sentieon_docker,
  252. cluster_config=cluster_config,
  253. disk_size=disk_size
  254. }
  255. call bcftools.bcftools as TNseq_bcftools {
  256. input:
  257. vcf=TNseq.vcf,
  258. fasta=fasta,
  259. ref_dir=ref_dir,
  260. docker=bcftools_docker,
  261. cluster_config=cluster_config,
  262. disk_size=disk_size
  263. }
  264. call ANNOVAR.ANNOVAR as TNseq_ANNOVAR {
  265. input:
  266. vcf=TNseq_bcftools.norm_vcf,
  267. annovar_database=annovar_database,
  268. docker=annovar_docker,
  269. cluster_config=cluster_config,
  270. disk_size=disk_size
  271. }
  272. call MSIsensor.MSIsensor as MSIsensor {
  273. input:
  274. sample=sample_id,
  275. fasta=fasta,
  276. ref_dir=ref_dir,
  277. normal_bam=normal_BQSR.recaled_bam,
  278. normal_bam_index=normal_BQSR.recaled_bam_index,
  279. tumor_bam=tumor_BQSR.recaled_bam,
  280. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  281. baseline=baseline,
  282. docker=msisensor_docker,
  283. cluster_config=cluster_config,
  284. disk_size=disk_size
  285. }
  286. call HRD.HRD as HRD {
  287. input:
  288. sample=sample_id,
  289. fasta=fasta,
  290. ref_dir=ref_dir,
  291. gc=gc,
  292. normal_bam=normal_BQSR.recaled_bam,
  293. normal_bam_index=normal_BQSR.recaled_bam_index,
  294. tumor_bam=tumor_BQSR.recaled_bam,
  295. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  296. docker=sequenza_docker,
  297. cluster_config=cluster_config,
  298. disk_size=disk_size
  299. }
  300. call TMB.TMB as TMB {
  301. input:
  302. sample=sample_id,
  303. regions=regions,
  304. snpindel_txt=TNseq_ANNOVAR.multianno_txt,
  305. docker=tmb_docker,
  306. cluster_config=cluster_config,
  307. disk_size=disk_size
  308. }
  309. call CNVkit.CNVkit as CNVkit {
  310. input:
  311. sample=sample_id,
  312. fasta=fasta,
  313. ref_dir=ref_dir,
  314. regions=regions,
  315. ref_flat=ref_flat,
  316. normal_bam=normal_BQSR.recaled_bam,
  317. normal_bam_index=normal_BQSR.recaled_bam_index,
  318. tumor_bam=tumor_BQSR.recaled_bam,
  319. tumor_bam_index=tumor_BQSR.recaled_bam_index,
  320. hrd=HRD.hrd,
  321. docker=cnvkit_docker,
  322. cluster_config=cluster_config,
  323. disk_size=disk_size
  324. }
  325. }