Automated integrated analysis software for genomics data of the cancer patients.
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.

workflow.wdl 8.9KB

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