Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

282 lines
6.8KB

  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/corealigner.wdl" as corealigner
  9. import "./tasks/PON.wdl" as PON
  10. import "./tasks/TNseq.wdl" as TNseq
  11. import "./tasks/TNscope.wdl" as TNscope
  12. import "./tasks/annovar.wdl" as annovar
  13. import "./tasks/vcf2maf.wdl" as vcf2maf
  14. workflow {{ project_name }} {
  15. String sample_id
  16. Boolean TN
  17. File fastq_1
  18. File fastq_2
  19. File? normal_recaled_bam
  20. File? normal_recaled_bam_index
  21. String type
  22. String SENTIEON_INSTALL_DIR
  23. String SENTIEON_LICENSE
  24. String sentieon_docker
  25. String annovar_docker
  26. String maftools_docker
  27. File ref_dir
  28. String fasta
  29. File dbmills_dir
  30. String db_mills
  31. File dbsnp_dir
  32. String dbsnp
  33. File regions
  34. String disk_size
  35. String cluster_config
  36. Boolean set_pon
  37. File? pon_vcf
  38. File? cosmic_dir
  39. String? cosmic_vcf
  40. Boolean set_annovar
  41. File? database
  42. Boolean set_vcf2maf
  43. Boolean germline
  44. call mapping.mapping as mapping {
  45. input:
  46. group=sample_id + '_' + type,
  47. sample=sample_id + '_' + type,
  48. fastq_1=fastq_1,
  49. fastq_2=fastq_2,
  50. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  51. SENTIEON_LICENSE=SENTIEON_LICENSE,
  52. pl="ILLUMINAL",
  53. fasta=fasta,
  54. ref_dir=ref_dir,
  55. docker=sentieon_docker,
  56. disk_size=disk_size,
  57. cluster_config=cluster_config
  58. }
  59. call Metrics.Metrics as Metrics {
  60. input:
  61. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  62. SENTIEON_LICENSE=SENTIEON_LICENSE,
  63. fasta=fasta,
  64. ref_dir=ref_dir,
  65. sorted_bam=mapping.sorted_bam,
  66. sorted_bam_index=mapping.sorted_bam_index,
  67. sample=sample_id + '_' + type,
  68. docker=sentieon_docker,
  69. disk_size=disk_size,
  70. cluster_config=cluster_config
  71. }
  72. call Dedup.Dedup as Dedup {
  73. input:
  74. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  75. SENTIEON_LICENSE=SENTIEON_LICENSE,
  76. sorted_bam=mapping.sorted_bam,
  77. sorted_bam_index=mapping.sorted_bam_index,
  78. sample=sample_id + '_' + type,
  79. docker=sentieon_docker,
  80. disk_size=disk_size,
  81. cluster_config=cluster_config
  82. }
  83. call deduped_Metrics.deduped_Metrics as deduped_Metrics {
  84. input:
  85. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  86. SENTIEON_LICENSE=SENTIEON_LICENSE,
  87. fasta=fasta,
  88. ref_dir=ref_dir,
  89. Dedup_bam=Dedup.Dedup_bam,
  90. Dedup_bam_index=Dedup.Dedup_bam_index,
  91. sample=sample_id + '_' + type,
  92. docker=sentieon_docker,
  93. disk_size=disk_size,
  94. cluster_config=cluster_config
  95. }
  96. call Realigner.Realigner as Realigner {
  97. input:
  98. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  99. SENTIEON_LICENSE=SENTIEON_LICENSE,
  100. fasta=fasta,
  101. ref_dir=ref_dir,
  102. Dedup_bam=Dedup.Dedup_bam,
  103. Dedup_bam_index=Dedup.Dedup_bam_index,
  104. db_mills=db_mills,
  105. dbmills_dir=dbmills_dir,
  106. sample=sample_id + '_' + type,
  107. docker=sentieon_docker,
  108. disk_size=disk_size,
  109. regions=regions,
  110. cluster_config=cluster_config
  111. }
  112. call BQSR.BQSR as BQSR {
  113. input:
  114. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  115. SENTIEON_LICENSE=SENTIEON_LICENSE,
  116. fasta=fasta,
  117. ref_dir=ref_dir,
  118. realigned_bam=Realigner.realigner_bam,
  119. realigned_bam_index=Realigner.realigner_bam_index,
  120. db_mills=db_mills,
  121. dbmills_dir=dbmills_dir,
  122. dbsnp=dbsnp,
  123. dbsnp_dir=dbsnp_dir,
  124. sample=sample_id + '_' + type,
  125. regions=regions,
  126. docker=sentieon_docker,
  127. disk_size=disk_size,
  128. cluster_config=cluster_config
  129. }
  130. if (set_pon && type == "normal") {
  131. call PON.PON as PON {
  132. input:
  133. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  134. SENTIEON_LICENSE=SENTIEON_LICENSE,
  135. sample=sample_id,
  136. fasta=fasta,
  137. ref_dir=ref_dir,
  138. normal_recaled_bam=BQSR.recaled_bam,
  139. normal_recaled_bam_index=BQSR.recaled_bam_index,
  140. cosmic_vcf=cosmic_vcf,
  141. cosmic_dir=cosmic_dir,
  142. dbsnp=dbsnp,
  143. dbsnp_dir=dbsnp_dir,
  144. docker=sentieon_docker,
  145. disk_size=disk_size,
  146. cluster_config=cluster_config
  147. }
  148. }
  149. if (germline) {
  150. call Haplotyper.Haplotyper as Haplotyper {
  151. input:
  152. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  153. SENTIEON_LICENSE=SENTIEON_LICENSE,
  154. sample=sample_id,
  155. fasta=fasta,
  156. ref_dir=ref_dir,
  157. recaled_bam=BQSR.recaled_bam,
  158. recaled_bam_index=BQSR.recaled_bam_index,
  159. dbsnp=dbsnp,
  160. dbsnp_dir=dbsnp_dir,
  161. regions=regions,
  162. docker=sentieon_docker,
  163. disk_size=disk_size,
  164. cluster_config=cluster_config
  165. }
  166. }
  167. if (type == "tumor" && TN) {
  168. call corealigner.corealigner as corealigner {
  169. input:
  170. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  171. SENTIEON_LICENSE=SENTIEON_LICENSE,
  172. fasta=fasta,
  173. ref_dir=ref_dir,
  174. sample=sample_id,
  175. docker=sentieon_docker,
  176. db_mills=db_mills,
  177. dbmills_dir=dbmills_dir,
  178. dbsnp=dbsnp,
  179. dbsnp_dir=dbsnp_dir,
  180. tumor_recaled_bam=BQSR.recaled_bam,
  181. tumor_recaled_bam_index=BQSR.recaled_bam_index,
  182. normal_recaled_bam=normal_recaled_bam,
  183. normal_recaled_bam_index=normal_recaled_bam_index,
  184. disk_size=disk_size,
  185. cluster_config=cluster_config
  186. }
  187. }
  188. if (type == "tumor") {
  189. call TNseq.TNseq as TNseq {
  190. input:
  191. TN=TN,
  192. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  193. SENTIEON_LICENSE=SENTIEON_LICENSE,
  194. fasta=fasta,
  195. ref_dir=ref_dir,
  196. corealigner_bam=corealigner.corealigner_bam,
  197. corealigner_bam_index=corealigner.corealigner_bam_index,
  198. tumor_recaled_bam=BQSR.recaled_bam,
  199. tumor_recaled_bam_index=BQSR.recaled_bam_index,
  200. dbsnp=dbsnp,
  201. dbsnp_dir=dbsnp_dir,
  202. set_pon=set_pon,
  203. pon_vcf=pon_vcf,
  204. cosmic_vcf=cosmic_vcf,
  205. cosmic_dir=cosmic_dir,
  206. tumor_name=sample_id + "_tumor",
  207. normal_name=sample_id + "_normal",
  208. docker=sentieon_docker,
  209. sample=sample_id,
  210. disk_size=disk_size,
  211. cluster_config=cluster_config
  212. }
  213. call TNscope.TNscope as TNscope {
  214. input:
  215. TN=TN,
  216. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  217. SENTIEON_LICENSE=SENTIEON_LICENSE,
  218. fasta=fasta,
  219. ref_dir=ref_dir,
  220. corealigner_bam=corealigner.corealigner_bam,
  221. corealigner_bam_index=corealigner.corealigner_bam_index,
  222. tumor_recaled_bam=BQSR.recaled_bam,
  223. tumor_recaled_bam_index=BQSR.recaled_bam_index,
  224. dbsnp=dbsnp,
  225. dbsnp_dir=dbsnp_dir,
  226. set_pon=set_pon,
  227. pon_vcf=pon_vcf,
  228. cosmic_vcf=cosmic_vcf,
  229. cosmic_dir=cosmic_dir,
  230. tumor_name=sample_id + "_tumor",
  231. normal_name=sample_id + "_normal",
  232. docker=sentieon_docker,
  233. sample=sample_id,
  234. disk_size=disk_size,
  235. cluster_config=cluster_config
  236. }
  237. }
  238. if (set_annovar){
  239. call annovar.annovar as annovar {
  240. input:
  241. docker=annovar_docker,
  242. database=database,
  243. TNscope_vcf=TNscope.TNscope_vcf,
  244. TNseq_vcf=TNseq.TNseq_vcf,
  245. sample=sample_id,
  246. cluster_config=cluster_config,
  247. disk_size=disk_size
  248. }
  249. if (set_vcf2maf){
  250. call vcf2maf.vcf2maf as vcf2maf {
  251. input:
  252. docker=maftools_docker,
  253. multianno_TNscope_txt=annovar.multianno_TNscope_txt,
  254. multianno_TNseq_txt=annovar.multianno_TNseq_txt,
  255. sample=sample_id,
  256. cluster_config=cluster_config,
  257. disk_size=disk_size
  258. }
  259. }
  260. }
  261. }