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.

262 lines
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. #SEQC2应该是_N_1和T_1
  53. if (normal_deduped_bam != ""){
  54. call Sentieon_BQSR.Sentieon_BQSR as Sentieon_BQSR_normal{
  55. input:
  56. ref_dir=ref_fasta_dir,
  57. dbsnp_dir=dbsnp_dir,
  58. dbmills_dir = dbmills_dir,
  59. sample_id=sample_id+'_N',
  60. ref_fasta=ref_fasta,
  61. dbsnp=dbsnp,
  62. db_mills=db_mills,
  63. deduped_bam=normal_deduped_bam,
  64. deduped_bam_index=normal_deduped_bam_bai,
  65. docker=docker_sentieon,
  66. cluster_config=cluster_config,
  67. disk_size=disk_size,
  68. SENTIEON_LICENSE=SENTIEON_LICENSE
  69. }
  70. }
  71. if (tumor_deduped_bam != ""){
  72. call Sentieon_BQSR.Sentieon_BQSR as Sentieon_BQSR_tumor{
  73. input:
  74. ref_dir=ref_fasta_dir,
  75. dbsnp_dir=dbsnp_dir,
  76. dbmills_dir = dbmills_dir,
  77. sample_id=sample_id+'_T',
  78. ref_fasta=ref_fasta,
  79. dbsnp=dbsnp,
  80. db_mills=db_mills,
  81. deduped_bam=tumor_deduped_bam,
  82. deduped_bam_index=tumor_deduped_bam_bai,
  83. docker=docker_sentieon,
  84. cluster_config=cluster_config,
  85. disk_size=disk_size,
  86. SENTIEON_LICENSE=SENTIEON_LICENSE
  87. }
  88. }
  89. call MSIsensor.MSIsensor as MSIsensor {
  90. input:
  91. sample=sample_id,
  92. fasta=ref_fasta,
  93. ref_dir=ref_fasta_dir,
  94. normal_bam=Sentieon_BQSR_normal.recaled_bam,
  95. normal_bam_index=Sentieon_BQSR_normal.recaled_bam_index,
  96. tumor_bam=Sentieon_BQSR_tumor.recaled_bam,
  97. tumor_bam_index=Sentieon_BQSR_tumor.recaled_bam_index,
  98. baseline=baseline,
  99. docker=docker_MSIsensor,
  100. cluster_config="OnDemand bcs.ps.g.large img-ubuntu-vpc",
  101. disk_size=disk_size
  102. }
  103. call Haplotyper.Haplotyper as Haplotyper {
  104. input:
  105. SENTIEON_LICENSE=SENTIEON_LICENSE,
  106. sample=sample_id + '_N',
  107. fasta=ref_fasta,
  108. ref_dir=ref_fasta_dir,
  109. recaled_bam=Sentieon_BQSR_normal.recaled_bam,
  110. recaled_bam_index=Sentieon_BQSR_normal.recaled_bam_index,
  111. dbsnp=dbsnp,
  112. dbsnp_dir=dbsnp_dir,
  113. regions=regions,
  114. docker=docker_sentieon,
  115. disk_size=disk_size,
  116. cluster_config=cluster_config
  117. }
  118. call bcftools.bcftools as Haplotyper_bcftools {
  119. input:
  120. vcf=Haplotyper.vcf,
  121. fasta=ref_fasta,
  122. ref_dir=ref_fasta_dir,
  123. docker=docker_bcftools,
  124. cluster_config="OnDemand bcs.ps.g.large img-ubuntu-vpc",
  125. disk_size=disk_size
  126. }
  127. call TNseq.sentieon_TNseq as sentieon_TNseq{
  128. input:
  129. sample_id = sample_id,
  130. tumor_bam = Sentieon_BQSR_tumor.recaled_bam,
  131. tumor_bam_bai = Sentieon_BQSR_tumor.recaled_bam_index,
  132. normal_bam = Sentieon_BQSR_normal.recaled_bam,
  133. normal_bam_bai = Sentieon_BQSR_normal.recaled_bam_index,
  134. tumor_name = sample_id+'_T_1',
  135. normal_name = sample_id+'_N_1',
  136. ref_dir = ref_fasta_dir,
  137. ref_fasta = ref_fasta,
  138. germline_resource = germline_resource,
  139. germline_resource_tbi = germline_resource_tbi,
  140. docker = docker_sentieon,
  141. cluster_config = cluster_config,
  142. disk_size = disk_size,
  143. SENTIEON_LICENSE = SENTIEON_LICENSE
  144. }
  145. call bcftools.bcftools as TNseq_bcftools {
  146. input:
  147. vcf=sentieon_TNseq.vcf,
  148. fasta=ref_fasta,
  149. ref_dir=ref_fasta_dir,
  150. docker=docker_bcftools,
  151. cluster_config="OnDemand bcs.ps.g.large img-ubuntu-vpc",
  152. disk_size=disk_size
  153. }
  154. call TNscope.sentieon_TNscope as sentieon_TNscope{
  155. input:
  156. sample_id = sample_id,
  157. tumor_bam = tumor_deduped_bam,
  158. tumor_bam_bai = tumor_deduped_bam_bai,
  159. normal_bam = normal_deduped_bam,
  160. normal_bam_bai = normal_deduped_bam_bai,
  161. tumor_name = sample_id+'_T_1',
  162. normal_name = sample_id+'_N_1',
  163. tumor_recall_data = Sentieon_BQSR_tumor.recal_table,
  164. normal_recall_data = Sentieon_BQSR_normal.recal_table,
  165. ref_dir = ref_fasta_dir,
  166. ref_fasta = ref_fasta,
  167. dbsnp_dir = dbsnp_dir,
  168. dbsnp = dbsnp,
  169. # excute env
  170. docker = docker_sentieon,
  171. cluster_config = cluster_config,
  172. disk_size = disk_size,
  173. SENTIEON_LICENSE = SENTIEON_LICENSE
  174. }
  175. call bcftools.bcftools as TNscope_bcftools {
  176. input:
  177. vcf=sentieon_TNscope.vcf,
  178. fasta=ref_fasta,
  179. ref_dir=ref_fasta_dir,
  180. docker=docker_bcftools,
  181. cluster_config="OnDemand bcs.ps.g.large img-ubuntu-vpc",
  182. disk_size=disk_size
  183. }
  184. call strelka_calling.strelka_calling as strelka_calling{
  185. input:
  186. tumor_bam = Sentieon_BQSR_tumor.recaled_bam,
  187. tumor_bam_bai = Sentieon_BQSR_tumor.recaled_bam_index,
  188. normal_bam = Sentieon_BQSR_normal.recaled_bam,
  189. normal_bam_bai = Sentieon_BQSR_normal.recaled_bam_index,
  190. ref_fasta = ref_fasta,
  191. ref_dir = ref_fasta_dir,
  192. sample_id = sample_id,
  193. docker=docker_strelka,
  194. cluster_config="OnDemand bcs.ps.g.6xlarge img-ubuntu-vpc",
  195. disk_size=disk_size
  196. }
  197. call bcftools_concat.bcftools as bcftools_concat{
  198. input:
  199. ref_dir=ref_fasta_dir,
  200. fasta=ref_fasta,
  201. vcf_indels=strelka_calling.indel_vcf,
  202. vcf_snvs=strelka_calling.snv_vcf,
  203. sample_id=sample_id,
  204. docker=docker_bcftools,
  205. cluster_config="OnDemand bcs.ps.g.large img-ubuntu-vpc",
  206. disk_size=disk_size
  207. }
  208. if (Annovar){
  209. call annovar.ANNOVAR as TNseq_ANNOVAR {
  210. input:
  211. vcf=TNseq_bcftools.norm_vcf,
  212. annovar_database=annovar_database,
  213. docker=docker_annovar,
  214. cluster_config="OnDemand bcs.ps.g.6xlarge img-ubuntu-vpc",
  215. disk_size=disk_size
  216. }
  217. call tmb.TMB as TMB{
  218. input:
  219. sample=sample_id,
  220. hg38_CDS=hg38_CDS,
  221. regions=regions,
  222. snpindel_txt=TNseq_ANNOVAR.multianno_txt,
  223. docker=docker_tmb,
  224. cluster_config="OnDemand bcs.ps.g.large img-ubuntu-vpc",
  225. disk_size=disk_size,
  226. AF_filter=AF_filter
  227. }
  228. }
  229. }