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.

232 lines
5.8KB

  1. #import "./tasks/fastp.wdl" as fastp
  2. import "./tasks/fastqTobam.wdl" as fastqTobam
  3. import "./tasks/qualimap.wdl" as qualimap
  4. import "./tasks/BQSR.wdl" as Sentieon_BQSR
  5. import "./tasks/TNseq.wdl" as TNseq
  6. import "./tasks/TNscope.wdl" as TNscope
  7. import "./tasks/manta.wdl" as manta_calling
  8. import "./tasks/strelka.wdl" as strelka_calling
  9. workflow {{ project_name }} {
  10. #sample info
  11. File? normal_in1
  12. File? normal_in2
  13. File? tumor_in1
  14. File? tumor_in2
  15. String sample_id
  16. String Seq_platform
  17. #reference fasta
  18. String ref_fasta
  19. File ref_fasta_dir
  20. File annot_gff
  21. File dbsnp_dir
  22. File dbmills_dir
  23. String dbsnp
  24. String db_mills
  25. File? regions
  26. Int? interval_padding
  27. File germline_resource
  28. File germline_resource_tbi
  29. #docker
  30. String docker_fastp
  31. String docker_sentieon
  32. String SENTIEON_LICENSE
  33. String docker_qualimap
  34. String docker_manta
  35. String docker_strelka
  36. #config
  37. String cluster_config
  38. String disk_size
  39. Boolean? fastqc
  40. Boolean bamqc
  41. if (normal_in1 != ""){
  42. call fastqTobam.SentieonFastqToBam as SentieonFastqToBam_normal{
  43. input:
  44. fastq1=normal_in1,
  45. fastq2=normal_in2,
  46. sample_id=sample_id+'_N',
  47. Seq_platform=Seq_platform,
  48. ref_fasta=ref_fasta,
  49. ref_fasta_dir=ref_fasta_dir,
  50. SENTIEON_LICENSE=SENTIEON_LICENSE,
  51. docker=docker_sentieon,
  52. cluster_config=cluster_config,
  53. disk_size=disk_size
  54. }
  55. if (bamqc){
  56. call qualimap.qualimap as qualimap_normal{
  57. input:
  58. sample_id=sample_id+'_N',
  59. bam_file=SentieonFastqToBam_normal.deduped_bam,
  60. bam_bai=SentieonFastqToBam_normal.deduped_bam_bai,
  61. annot_gff=annot_gff,
  62. docker=docker_qualimap,
  63. cluster_config=cluster_config,
  64. disk_size=disk_size
  65. }
  66. }
  67. call Sentieon_BQSR.Sentieon_BQSR as Sentieon_BQSR_normal{
  68. input:
  69. ref_dir=ref_fasta_dir,
  70. dbsnp_dir=dbsnp_dir,
  71. dbmills_dir = dbmills_dir,
  72. sample_id=sample_id+'_N',
  73. ref_fasta=ref_fasta,
  74. dbsnp=dbsnp,
  75. db_mills=db_mills,
  76. deduped_bam=SentieonFastqToBam_normal.deduped_bam,
  77. deduped_bam_index=SentieonFastqToBam_normal.deduped_bam_bai,
  78. regions=regions,
  79. interval_padding=interval_padding,
  80. docker=docker_sentieon,
  81. cluster_config=cluster_config,
  82. disk_size=disk_size,
  83. SENTIEON_LICENSE=SENTIEON_LICENSE
  84. }
  85. }
  86. if (tumor_in1 != ""){
  87. call fastqTobam.SentieonFastqToBam as SentieonFastqToBam_tumor{
  88. input:
  89. fastq1=tumor_in1,
  90. fastq2=tumor_in2,
  91. sample_id=sample_id+'_T',
  92. Seq_platform=Seq_platform,
  93. ref_fasta=ref_fasta,
  94. ref_fasta_dir=ref_fasta_dir,
  95. SENTIEON_LICENSE=SENTIEON_LICENSE,
  96. docker=docker_sentieon,
  97. cluster_config=cluster_config,
  98. disk_size=disk_size
  99. }
  100. if (bamqc){
  101. call qualimap.qualimap as qualimap_tumor{
  102. input:
  103. sample_id=sample_id+'_T',
  104. bam_file=SentieonFastqToBam_tumor.deduped_bam,
  105. bam_bai=SentieonFastqToBam_tumor.deduped_bam_bai,
  106. annot_gff=annot_gff,
  107. docker=docker_qualimap,
  108. cluster_config=cluster_config,
  109. disk_size=disk_size
  110. }
  111. }
  112. call Sentieon_BQSR.Sentieon_BQSR as Sentieon_BQSR_tumor{
  113. input:
  114. ref_dir=ref_fasta_dir,
  115. dbsnp_dir=dbsnp_dir,
  116. dbmills_dir = dbmills_dir,
  117. sample_id=sample_id+'_T',
  118. ref_fasta=ref_fasta,
  119. dbsnp=dbsnp,
  120. db_mills=db_mills,
  121. deduped_bam=SentieonFastqToBam_normal.deduped_bam,
  122. deduped_bam_index=SentieonFastqToBam_normal.deduped_bam_bai,
  123. regions=regions,
  124. interval_padding=interval_padding,
  125. docker=docker_sentieon,
  126. cluster_config=cluster_config,
  127. disk_size=disk_size,
  128. SENTIEON_LICENSE=SENTIEON_LICENSE
  129. }
  130. }
  131. call TNseq.sentieon_TNseq as sentieon_TNseq{
  132. input:
  133. sample_id = sample_id,
  134. tumor_bam = Sentieon_BQSR_tumor.recaled_bam,
  135. tumor_bam_bai = Sentieon_BQSR_tumor.recaled_bam_index,
  136. normal_bam = Sentieon_BQSR_normal.recaled_bam,
  137. normal_bam_bai = Sentieon_BQSR_normal.recaled_bam_index,
  138. tumor_name = sample_id+'_T',
  139. normal_name = sample_id+'_N',
  140. ref_dir = ref_fasta_dir,
  141. ref_fasta = ref_fasta,
  142. germline_resource = germline_resource,
  143. germline_resource_tbi = germline_resource_tbi,
  144. docker = docker_sentieon,
  145. cluster_config = cluster_config,
  146. disk_size = disk_size,
  147. SENTIEON_LICENSE = SENTIEON_LICENSE
  148. }
  149. call TNscope.sentieon_TNscope as sentieon_TNscope{
  150. input:
  151. sample_id = sample_id,
  152. tumor_bam = Sentieon_BQSR_tumor.recaled_bam,
  153. tumor_bam_bai = Sentieon_BQSR_tumor.recaled_bam_index,
  154. normal_bam = Sentieon_BQSR_normal.recaled_bam,
  155. normal_bam_bai = Sentieon_BQSR_normal.recaled_bam_index,
  156. tumor_name = sample_id+'_T',
  157. normal_name = sample_id+'_N',
  158. tumor_recall_data = Sentieon_BQSR_normal.recaled_bam,
  159. normal_recall_data = Sentieon_BQSR_normal.recaled_bam_index,
  160. ref_dir = ref_fasta_dir,
  161. ref_fasta = ref_fasta,
  162. regions = regions,
  163. interval_padding = interval_padding,
  164. dbsnp_dir = dbsnp_dir,
  165. dbsnp = dbsnp,
  166. # excute env
  167. docker = docker_sentieon,
  168. cluster_config = cluster_config,
  169. disk_size = disk_size,
  170. SENTIEON_LICENSE = SENTIEON_LICENSE
  171. }
  172. call manta_calling.manta_calling as manta_calling{
  173. input:
  174. tumor_bam = Sentieon_BQSR_tumor.recaled_bam,
  175. tumor_bam_bai = Sentieon_BQSR_tumor.recaled_bam_index,
  176. normal_bam = Sentieon_BQSR_normal.recaled_bam,
  177. normal_bam_bai = Sentieon_BQSR_normal.recaled_bam_index,
  178. ref_fasta = ref_fasta,
  179. ref_dir = ref_fasta_dir,
  180. sample_id = sample_id,
  181. docker = docker_manta,
  182. cluster_config = cluster_config,
  183. disk_size = disk_size
  184. }
  185. call strelka_calling.strelka_calling as strelka_calling{
  186. input:
  187. tumor_bam = Sentieon_BQSR_tumor.recaled_bam,
  188. tumor_bam_bai = Sentieon_BQSR_tumor.recaled_bam_index,
  189. normal_bam = Sentieon_BQSR_normal.recaled_bam,
  190. normal_bam_bai = Sentieon_BQSR_normal.recaled_bam_index,
  191. ref_fasta = ref_fasta,
  192. ref_dir = ref_fasta_dir,
  193. sample_id = sample_id,
  194. manta_indel_vcf = manta_calling.manta_indel_vcf,
  195. manta_indel_vcf_index = manta_calling.manta_indel_vcf_index,
  196. docker=docker_strelka,
  197. cluster_config=cluster_config,
  198. disk_size=disk_size
  199. }
  200. }