Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

267 linhas
6.7KB

  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/corealigner.wdl" as corealigner
  8. import "./tasks/PON.wdl" as PON
  9. import "./tasks/bcftools.wdl" as bcftools
  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. File inputSamplesFile
  16. Array[Array[File]] inputSamples = read_tsv(inputSamplesFile)
  17. #Array[String] sample
  18. String SENTIEON_INSTALL_DIR
  19. String SENTIEON_LICENSE
  20. String sentieon_docker
  21. String annovar_docker
  22. String vcf2maf_r_docker
  23. String bcftools_docker
  24. File ref_dir
  25. String fasta
  26. File dbmills_dir
  27. String db_mills
  28. File dbsnp_dir
  29. String dbsnp
  30. File regions
  31. File database
  32. String disk_size
  33. String cluster_config
  34. Boolean PONmode
  35. File? cosmic_dir
  36. String? cosmic_vcf
  37. Boolean set_annovar
  38. Boolean set_vcf2maf
  39. scatter (sample in inputSamples) {
  40. call mapping.mapping as tumor_mapping {
  41. input:
  42. group=sample[0] + "_tumor",
  43. sample=sample[0] + "_tumor",
  44. fastq_1=sample[1],
  45. fastq_2=sample[2],
  46. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  47. SENTIEON_LICENSE=SENTIEON_LICENSE,
  48. pl="ILLUMINAL",
  49. fasta=fasta,
  50. ref_dir=ref_dir,
  51. docker=sentieon_docker,
  52. disk_size=disk_size,
  53. cluster_config=cluster_config
  54. }
  55. call Metrics.Metrics as tumor_Metrics {
  56. input:
  57. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  58. SENTIEON_LICENSE=SENTIEON_LICENSE,
  59. fasta=fasta,
  60. ref_dir=ref_dir,
  61. sorted_bam=tumor_mapping.sorted_bam,
  62. sorted_bam_index=tumor_mapping.sorted_bam_index,
  63. sample=sample[0] + "_tumor",
  64. docker=sentieon_docker,
  65. disk_size=disk_size,
  66. cluster_config=cluster_config
  67. }
  68. call Dedup.Dedup as tumor_Dedup {
  69. input:
  70. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  71. SENTIEON_LICENSE=SENTIEON_LICENSE,
  72. sorted_bam=tumor_mapping.sorted_bam,
  73. sorted_bam_index=tumor_mapping.sorted_bam_index,
  74. sample=sample[0] + "_tumor",
  75. docker=sentieon_docker,
  76. disk_size=disk_size,
  77. cluster_config=cluster_config
  78. }
  79. call deduped_Metrics.deduped_Metrics as tumor_deduped_Metrics {
  80. input:
  81. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  82. SENTIEON_LICENSE=SENTIEON_LICENSE,
  83. fasta=fasta,
  84. ref_dir=ref_dir,
  85. Dedup_bam=tumor_Dedup.Dedup_bam,
  86. Dedup_bam_index=tumor_Dedup.Dedup_bam_index,
  87. sample=sample[0] + "_tumor",
  88. docker=sentieon_docker,
  89. disk_size=disk_size,
  90. cluster_config=cluster_config
  91. }
  92. call Realigner.Realigner as tumor_Realigner {
  93. input:
  94. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  95. SENTIEON_LICENSE=SENTIEON_LICENSE,
  96. fasta=fasta,
  97. ref_dir=ref_dir,
  98. Dedup_bam=tumor_Dedup.Dedup_bam,
  99. Dedup_bam_index=tumor_Dedup.Dedup_bam_index,
  100. db_mills=db_mills,
  101. dbmills_dir=dbmills_dir,
  102. sample=sample[0] + "_tumor",
  103. docker=sentieon_docker,
  104. disk_size=disk_size,
  105. regions=regions,
  106. cluster_config=cluster_config
  107. }
  108. call BQSR.BQSR as tumor_BQSR {
  109. input:
  110. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  111. SENTIEON_LICENSE=SENTIEON_LICENSE,
  112. fasta=fasta,
  113. ref_dir=ref_dir,
  114. realigned_bam1=tumor_Realigner.realigner_bam,
  115. realigned_bam_index1=tumor_Realigner.realigner_bam_index,
  116. db_mills=db_mills,
  117. dbmills_dir=dbmills_dir,
  118. dbsnp=dbsnp,
  119. dbsnp_dir=dbsnp_dir,
  120. sample=sample[0] + "_tumor",
  121. regions=regions,
  122. docker=sentieon_docker,
  123. disk_size=disk_size,
  124. cluster_config=cluster_config
  125. }
  126. }
  127. scatter (sample in inputSamples) {
  128. call mapping.mapping as normal_mapping {
  129. input:
  130. group=sample[0] + "_normal",
  131. sample=sample[0] + "_normal",
  132. fastq_1=sample[3],
  133. fastq_2=sample[4],
  134. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  135. SENTIEON_LICENSE=SENTIEON_LICENSE,
  136. pl="ILLUMINAL",
  137. fasta=fasta,
  138. ref_dir=ref_dir,
  139. docker=sentieon_docker,
  140. disk_size=disk_size,
  141. cluster_config=cluster_config
  142. }
  143. call Metrics.Metrics as normal_Metrics {
  144. input:
  145. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  146. SENTIEON_LICENSE=SENTIEON_LICENSE,
  147. fasta=fasta,
  148. ref_dir=ref_dir,
  149. sorted_bam=normal_mapping.sorted_bam,
  150. sorted_bam_index=normal_mapping.sorted_bam_index,
  151. sample=sample[0] + "_normal",
  152. docker=sentieon_docker,
  153. disk_size=disk_size,
  154. cluster_config=cluster_config
  155. }
  156. call Dedup.Dedup as normal_Dedup {
  157. input:
  158. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  159. SENTIEON_LICENSE=SENTIEON_LICENSE,
  160. sorted_bam=normal_mapping.sorted_bam,
  161. sorted_bam_index=normal_mapping.sorted_bam_index,
  162. sample=sample[0] + "_normal",
  163. docker=sentieon_docker,
  164. disk_size=disk_size,
  165. cluster_config=cluster_config
  166. }
  167. call deduped_Metrics.deduped_Metrics as normal_deduped_Metrics {
  168. input:
  169. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  170. SENTIEON_LICENSE=SENTIEON_LICENSE,
  171. fasta=fasta,
  172. ref_dir=ref_dir,
  173. Dedup_bam=normal_Dedup.Dedup_bam,
  174. Dedup_bam_index=normal_Dedup.Dedup_bam_index,
  175. sample=sample[0] + "_normal",
  176. docker=sentieon_docker,
  177. disk_size=disk_size,
  178. cluster_config=cluster_config
  179. }
  180. call Realigner.Realigner as normal_Realigner {
  181. input:
  182. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  183. SENTIEON_LICENSE=SENTIEON_LICENSE,
  184. fasta=fasta,
  185. ref_dir=ref_dir,
  186. Dedup_bam=normal_Dedup.Dedup_bam,
  187. Dedup_bam_index=normal_Dedup.Dedup_bam_index,
  188. db_mills=db_mills,
  189. dbmills_dir=dbmills_dir,
  190. sample=sample[0] + "_normal",
  191. docker=sentieon_docker,
  192. disk_size=disk_size,
  193. regions=regions,
  194. cluster_config=cluster_config
  195. }
  196. call BQSR.BQSR as normal_BQSR {
  197. input:
  198. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  199. SENTIEON_LICENSE=SENTIEON_LICENSE,
  200. fasta=fasta,
  201. ref_dir=ref_dir,
  202. realigned_bam1=normal_Realigner.realigner_bam,
  203. realigned_bam_index1=normal_Realigner.realigner_bam_index,
  204. db_mills=db_mills,
  205. dbmills_dir=dbmills_dir,
  206. dbsnp=dbsnp,
  207. dbsnp_dir=dbsnp_dir,
  208. sample=sample[0] + "_normal",
  209. regions=regions,
  210. docker=sentieon_docker,
  211. disk_size=disk_size,
  212. cluster_config=cluster_config
  213. }
  214. if (PONmode) {
  215. call PON.PON as PON {
  216. input:
  217. SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
  218. SENTIEON_LICENSE=SENTIEON_LICENSE,
  219. sample=sample[0],
  220. fasta=fasta,
  221. ref_dir=ref_dir,
  222. normal_recaled_bam=normal_BQSR.recaled_bam,
  223. normal_recaled_bam_index=normal_BQSR.recaled_bam_index,
  224. cosmic_vcf=cosmic_vcf,
  225. cosmic_dir=cosmic_dir,
  226. dbsnp=dbsnp,
  227. dbsnp_dir=dbsnp_dir,
  228. docker=sentieon_docker,
  229. disk_size=disk_size,
  230. cluster_config=cluster_config
  231. }
  232. }
  233. File pon_vcf=PON.pon_vcf
  234. }
  235. call bcftools.bcftools as bcftools {
  236. input:
  237. PONmode=PONmode,
  238. pon_vcf=pon_vcf,
  239. docker=bcftools_docker,
  240. disk_size=disk_size,
  241. cluster_config=cluster_config
  242. }
  243. }