Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

250 lines
6.2KB

  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. String ref_bed
  24. File annot_gff
  25. File dbsnp_dir
  26. File dbmills_dir
  27. String dbsnp
  28. String db_mills
  29. File germline_resource
  30. File germline_resource_tbi
  31. File annovar_database
  32. File? regions
  33. File baseline
  34. File hg38_CDS
  35. #docker
  36. String docker_fastp
  37. String docker_sentieon
  38. String SENTIEON_LICENSE
  39. String docker_qualimap
  40. String docker_manta
  41. String docker_strelka
  42. String docker_bcftools
  43. String docker_annovar
  44. String docker_tmb
  45. String docker_MSIsensor
  46. #config
  47. String cluster_config
  48. String disk_size
  49. Boolean? fastqc
  50. Boolean bamqc
  51. Boolean Annovar
  52. Boolean AF_filter
  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 Haplotyper.Haplotyper as Haplotyper {
  90. input:
  91. SENTIEON_LICENSE=SENTIEON_LICENSE,
  92. sample=sample_id + '_N',
  93. fasta=ref_fasta,
  94. ref_dir=ref_fasta_dir,
  95. recaled_bam=Sentieon_BQSR_normal.recaled_bam,
  96. recaled_bam_index=Sentieon_BQSR_normal.recaled_bam_index,
  97. dbsnp=dbsnp,
  98. dbsnp_dir=dbsnp_dir,
  99. regions=regions,
  100. docker=docker_sentieon,
  101. disk_size=disk_size,
  102. cluster_config=cluster_config
  103. }
  104. call bcftools.bcftools as Haplotyper_bcftools {
  105. input:
  106. vcf=Haplotyper.vcf,
  107. fasta=ref_fasta,
  108. ref_dir=ref_fasta_dir,
  109. docker=docker_bcftools,
  110. cluster_config="OnDemand bcs.ps.g.large img-ubuntu-vpc",
  111. disk_size=disk_size
  112. }
  113. call TNseq.sentieon_TNseq as sentieon_TNseq{
  114. input:
  115. sample_id = sample_id,
  116. tumor_bam = Sentieon_BQSR_tumor.recaled_bam,
  117. tumor_bam_bai = Sentieon_BQSR_tumor.recaled_bam_index,
  118. normal_bam = Sentieon_BQSR_normal.recaled_bam,
  119. normal_bam_bai = Sentieon_BQSR_normal.recaled_bam_index,
  120. tumor_name = sample_id+'_T',
  121. normal_name = sample_id+'_N',
  122. ref_dir = ref_fasta_dir,
  123. ref_fasta = ref_fasta,
  124. germline_resource = germline_resource,
  125. germline_resource_tbi = germline_resource_tbi,
  126. docker = docker_sentieon,
  127. cluster_config = cluster_config,
  128. disk_size = disk_size,
  129. SENTIEON_LICENSE = SENTIEON_LICENSE
  130. }
  131. call bcftools.bcftools as TNseq_bcftools {
  132. input:
  133. vcf=sentieon_TNseq.vcf,
  134. fasta=ref_fasta,
  135. ref_dir=ref_fasta_dir,
  136. docker=docker_bcftools,
  137. cluster_config="OnDemand bcs.ps.g.large img-ubuntu-vpc",
  138. disk_size=disk_size
  139. }
  140. call TNscope.sentieon_TNscope as sentieon_TNscope{
  141. input:
  142. sample_id = sample_id,
  143. tumor_bam = tumor_deduped_bam,
  144. tumor_bam_bai = tumor_deduped_bam_bai,
  145. normal_bam = normal_deduped_bam,
  146. normal_bam_bai = normal_deduped_bam_bai,
  147. tumor_name = sample_id+'_T',
  148. normal_name = sample_id+'_N',
  149. tumor_recall_data = Sentieon_BQSR_tumor.recal_table,
  150. normal_recall_data = Sentieon_BQSR_normal.recal_table,
  151. ref_dir = ref_fasta_dir,
  152. ref_fasta = ref_fasta,
  153. dbsnp_dir = dbsnp_dir,
  154. dbsnp = dbsnp,
  155. # excute env
  156. docker = docker_sentieon,
  157. cluster_config = cluster_config,
  158. disk_size = disk_size,
  159. SENTIEON_LICENSE = SENTIEON_LICENSE
  160. }
  161. call bcftools.bcftools as TNscope_bcftools {
  162. input:
  163. vcf=sentieon_TNscope.vcf,
  164. fasta=ref_fasta,
  165. ref_dir=ref_fasta_dir,
  166. docker=docker_bcftools,
  167. cluster_config="OnDemand bcs.ps.g.large img-ubuntu-vpc",
  168. disk_size=disk_size
  169. }
  170. call strelka_calling.strelka_calling as strelka_calling{
  171. input:
  172. tumor_bam = Sentieon_BQSR_tumor.recaled_bam,
  173. tumor_bam_bai = Sentieon_BQSR_tumor.recaled_bam_index,
  174. normal_bam = Sentieon_BQSR_normal.recaled_bam,
  175. normal_bam_bai = Sentieon_BQSR_normal.recaled_bam_index,
  176. ref_fasta = ref_fasta,
  177. ref_dir = ref_fasta_dir,
  178. sample_id = sample_id,
  179. ref_bed = ref_bed,
  180. docker=docker_strelka,
  181. cluster_config="OnDemand bcs.ps.g.6xlarge img-ubuntu-vpc",
  182. disk_size=disk_size
  183. }
  184. call bcftools_concat.bcftools as bcftools_concat{
  185. input:
  186. ref_dir=ref_fasta_dir,
  187. fasta=ref_fasta,
  188. vcf_indels=strelka_calling.indel_vcf,
  189. vcf_snvs=strelka_calling.snv_vcf,
  190. sample_id=sample_id,
  191. docker=docker_bcftools,
  192. cluster_config="OnDemand bcs.ps.g.large img-ubuntu-vpc",
  193. disk_size=disk_size
  194. }
  195. if (Annovar){
  196. call annovar.ANNOVAR as TNseq_ANNOVAR {
  197. input:
  198. vcf=TNseq_bcftools.norm_vcf,
  199. annovar_database=annovar_database,
  200. docker=docker_annovar,
  201. cluster_config="OnDemand bcs.ps.g.6xlarge img-ubuntu-vpc",
  202. disk_size=disk_size
  203. }
  204. call tmb.TMB as TMB{
  205. input:
  206. sample=sample_id,
  207. hg38_CDS=hg38_CDS,
  208. regions=regions,
  209. snpindel_txt=TNseq_ANNOVAR.multianno_txt,
  210. docker=docker_tmb,
  211. cluster_config="OnDemand bcs.ps.g.large img-ubuntu-vpc",
  212. disk_size=disk_size,
  213. AF_filter=AF_filter
  214. }
  215. }
  216. }