You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

262 line
6.6KB

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