Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

316 lines
7.8KB

  1. import "./tasks/BQSR.wdl" as Sentieon_BQSR
  2. import "./tasks/TNseq.wdl" as TNseq
  3. import "./tasks/TNscope.wdl" as TNscope
  4. import "./tasks/manta.wdl" as manta_calling
  5. import "./tasks/strelka.wdl" as strelka_calling
  6. import "./tasks/bcftools.wdl" as bcftools
  7. import "./tasks/bcftools_concat.wdl" as bcftools_concat
  8. import "./tasks/Haplotyper.wdl" as Haplotyper
  9. import "./tasks/MSIsensor.wdl" as MSIsensor
  10. import "./tasks/tmb.wdl" as TMB
  11. workflow {{ project_name }} {
  12. #sample info
  13. File? normal_deduped_bam
  14. File? normal_deduped_bam_bai
  15. File? tumor_deduped_bam
  16. File? tumor_deduped_bam_bai
  17. String sample_id
  18. String Seq_platform
  19. #reference fasta
  20. String ref_fasta
  21. File ref_fasta_dir
  22. File annot_gff
  23. File dbsnp_dir
  24. File dbmills_dir
  25. String dbsnp
  26. String db_mills
  27. File germline_resource
  28. File germline_resource_tbi
  29. File annovar_database
  30. File? regions
  31. File baseline
  32. File hg38_CDS
  33. #docker
  34. String docker_fastp
  35. String docker_sentieon
  36. String SENTIEON_LICENSE
  37. String docker_qualimap
  38. String docker_manta
  39. String docker_strelka
  40. String docker_bcftools
  41. String docker_annovar
  42. String docker_tmb
  43. String docker_MSIsensor
  44. #config
  45. String cluster_config
  46. String disk_size
  47. Boolean? fastqc
  48. Boolean bamqc
  49. Boolean Annovar
  50. Boolean AF_filter
  51. if (normal_deduped_bam != ""){
  52. call Sentieon_BQSR.Sentieon_BQSR as Sentieon_BQSR_normal{
  53. input:
  54. ref_dir=ref_fasta_dir,
  55. dbsnp_dir=dbsnp_dir,
  56. dbmills_dir = dbmills_dir,
  57. sample_id=sample_id+'_N',
  58. ref_fasta=ref_fasta,
  59. dbsnp=dbsnp,
  60. db_mills=db_mills,
  61. deduped_bam=normal_deduped_bam,
  62. deduped_bam_index=normal_deduped_bam_bai,
  63. docker=docker_sentieon,
  64. cluster_config=cluster_config,
  65. disk_size=disk_size,
  66. SENTIEON_LICENSE=SENTIEON_LICENSE
  67. }
  68. }
  69. if (tumor_deduped_bam != ""){
  70. call Sentieon_BQSR.Sentieon_BQSR as Sentieon_BQSR_tumor{
  71. input:
  72. ref_dir=ref_fasta_dir,
  73. dbsnp_dir=dbsnp_dir,
  74. dbmills_dir = dbmills_dir,
  75. sample_id=sample_id+'_T',
  76. ref_fasta=ref_fasta,
  77. dbsnp=dbsnp,
  78. db_mills=db_mills,
  79. deduped_bam=tumor_deduped_bam,
  80. deduped_bam_index=tumor_deduped_bam_bai,
  81. docker=docker_sentieon,
  82. cluster_config=cluster_config,
  83. disk_size=disk_size,
  84. SENTIEON_LICENSE=SENTIEON_LICENSE
  85. }
  86. }
  87. call MSIsensor.MSIsensor as MSIsensor {
  88. input:
  89. sample=sample_id,
  90. fasta=ref_fasta,
  91. ref_dir=ref_fasta_dir,
  92. normal_bam=Sentieon_BQSR_normal.recaled_bam,
  93. normal_bam_index=Sentieon_BQSR_normal.recaled_bam_index,
  94. tumor_bam=Sentieon_BQSR_tumor.recaled_bam,
  95. tumor_bam_index=Sentieon_BQSR_tumor.recaled_bam_index,
  96. baseline=baseline,
  97. docker=docker_MSIsensor,
  98. cluster_config=cluster_config,
  99. disk_size=disk_size
  100. }
  101. call Haplotyper.Haplotyper as Haplotyper {
  102. input:
  103. SENTIEON_LICENSE=SENTIEON_LICENSE,
  104. sample=sample_id + '.N',
  105. fasta=ref_fasta,
  106. ref_dir=ref_fasta_dir,
  107. recaled_bam=Sentieon_BQSR_normal.recaled_bam,
  108. recaled_bam_index=Sentieon_BQSR_normal.recaled_bam_index,
  109. dbsnp=dbsnp,
  110. dbsnp_dir=dbsnp_dir,
  111. regions=regions,
  112. docker=docker_sentieon,
  113. disk_size=disk_size,
  114. cluster_config=cluster_config
  115. }
  116. call bcftools.bcftools as Haplotyper_bcftools {
  117. input:
  118. vcf=Haplotyper.vcf,
  119. fasta=ref_fasta,
  120. ref_dir=ref_fasta_dir,
  121. docker=docker_bcftools,
  122. cluster_config=cluster_config,
  123. disk_size=disk_size
  124. }
  125. call TNseq.sentieon_TNseq as sentieon_TNseq{
  126. input:
  127. sample_id = sample_id,
  128. tumor_bam = Sentieon_BQSR_tumor.recaled_bam,
  129. tumor_bam_bai = Sentieon_BQSR_tumor.recaled_bam_index,
  130. normal_bam = Sentieon_BQSR_normal.recaled_bam,
  131. normal_bam_bai = Sentieon_BQSR_normal.recaled_bam_index,
  132. tumor_name = sample_id+'_T',
  133. normal_name = sample_id+'_N',
  134. ref_dir = ref_fasta_dir,
  135. ref_fasta = ref_fasta,
  136. germline_resource = germline_resource,
  137. germline_resource_tbi = germline_resource_tbi,
  138. docker = docker_sentieon,
  139. cluster_config = cluster_config,
  140. disk_size = disk_size,
  141. SENTIEON_LICENSE = SENTIEON_LICENSE
  142. }
  143. call bcftools.bcftools as TNseq_bcftools {
  144. input:
  145. vcf=sentieon_TNseq.vcf,
  146. fasta=ref_fasta,
  147. ref_dir=ref_fasta_dir,
  148. docker=docker_bcftools,
  149. cluster_config=cluster_config,
  150. disk_size=disk_size
  151. }
  152. call TNscope.sentieon_TNscope as sentieon_TNscope{
  153. input:
  154. sample_id = sample_id,
  155. tumor_bam = tumor_deduped_bam,
  156. tumor_bam_bai = tumor_deduped_bam_bai,
  157. normal_bam = normal_deduped_bam,
  158. normal_bam_bai = normal_deduped_bam_bai,
  159. tumor_name = sample_id+'_T',
  160. normal_name = sample_id+'_N',
  161. tumor_recall_data = Sentieon_BQSR_tumor.recal_table,
  162. normal_recall_data = Sentieon_BQSR_normal.recal_table,
  163. ref_dir = ref_fasta_dir,
  164. ref_fasta = ref_fasta,
  165. dbsnp_dir = dbsnp_dir,
  166. dbsnp = dbsnp,
  167. # excute env
  168. docker = docker_sentieon,
  169. cluster_config = cluster_config,
  170. disk_size = disk_size,
  171. SENTIEON_LICENSE = SENTIEON_LICENSE
  172. }
  173. call bcftools.bcftools as TNscope_bcftools {
  174. input:
  175. vcf=sentieon_TNscope.vcf,
  176. fasta=ref_fasta,
  177. ref_dir=ref_fasta_dir,
  178. docker=docker_bcftools,
  179. cluster_config=cluster_config,
  180. disk_size=disk_size
  181. }
  182. call manta_calling.manta_calling as manta_calling{
  183. input:
  184. tumor_bam = Sentieon_BQSR_tumor.recaled_bam,
  185. tumor_bam_bai = Sentieon_BQSR_tumor.recaled_bam_index,
  186. normal_bam = Sentieon_BQSR_normal.recaled_bam,
  187. normal_bam_bai = Sentieon_BQSR_normal.recaled_bam_index,
  188. ref_fasta = ref_fasta,
  189. ref_dir = ref_fasta_dir,
  190. sample_id = sample_id,
  191. docker = docker_manta,
  192. cluster_config = cluster_config,
  193. disk_size = disk_size
  194. }
  195. call strelka_calling.strelka_calling as strelka_calling{
  196. input:
  197. tumor_bam = Sentieon_BQSR_tumor.recaled_bam,
  198. tumor_bam_bai = Sentieon_BQSR_tumor.recaled_bam_index,
  199. normal_bam = Sentieon_BQSR_normal.recaled_bam,
  200. normal_bam_bai = Sentieon_BQSR_normal.recaled_bam_index,
  201. ref_fasta = ref_fasta,
  202. ref_dir = ref_fasta_dir,
  203. sample_id = sample_id,
  204. manta_indel_vcf = manta_calling.manta_indel_vcf,
  205. manta_indel_vcf_index = manta_calling.manta_indel_vcf_index,
  206. docker=docker_strelka,
  207. cluster_config=cluster_config,
  208. disk_size=disk_size
  209. }
  210. call bcftools_concat.bcftools as bcftools_concat{
  211. input:
  212. ref_dir=ref_fasta_dir,
  213. fasta=ref_fasta,
  214. vcf_indels=strelka_calling.indel_vcf,
  215. vcf_snvs=strelka_calling.snv_vcf,
  216. sample_id=sample_id,
  217. docker=docker_bcftools,
  218. cluster_config=cluster_config,
  219. disk_size=disk_size
  220. }
  221. call bcftools.bcftools as strelka_bcftools {
  222. input:
  223. vcf=bcftools_concat.concat_vcf,
  224. fasta=ref_fasta,
  225. ref_dir=ref_fasta_dir,
  226. docker=docker_bcftools,
  227. cluster_config=cluster_config,
  228. disk_size=disk_size
  229. }
  230. if (Annovar){
  231. call annovar.ANNOVAR as TNseq_ANNOVAR {
  232. input:
  233. vcf=TNseq_bcftools.norm_vcf,
  234. annovar_database=annovar_database,
  235. docker=docker_annovar,
  236. cluster_config=cluster_config,
  237. disk_size=disk_size
  238. }
  239. call tmb.TMB as TMB{
  240. input:
  241. sample=sample_id,
  242. hg38_CDS=hg38_CDS,
  243. regions=regions,
  244. snpindel_txt=TNseq_ANNOVAR.multianno_txt,
  245. docker=docker_tmb,
  246. cluster_config=cluster_config,
  247. disk_size=disk_size,
  248. AF_filter=AF_filter
  249. }
  250. call annovar.ANNOVAR as TNscope_ANNOVAR {
  251. input:
  252. vcf=TNscope_bcftools.norm_vcf,
  253. annovar_database=annovar_database,
  254. docker=docker_annovar,
  255. cluster_config=cluster_config,
  256. disk_size=disk_size
  257. }
  258. call annovar.ANNOVAR as Haplotyper_ANNOVAR {
  259. input:
  260. vcf=Haplotyper_bcftools.norm_vcf,
  261. annovar_database=annovar_database,
  262. docker=docker_annovar,
  263. cluster_config=cluster_config,
  264. disk_size=disk_size
  265. }
  266. # call annovar.ANNOVAR as strelka_ANNOVAR {
  267. # input:
  268. # vcf=strelka_bcftools.norm_vcf,
  269. # annovar_database=annovar_database,
  270. # docker=docker_annovar,
  271. # cluster_config=cluster_config,
  272. # disk_size=disk_size
  273. # }
  274. }
  275. }