您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

workflow_total_pipeline.wdl 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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 germline_resource
  26. File germline_resource_tbi
  27. #docker
  28. String docker_fastp
  29. String docker_sentieon
  30. String SENTIEON_LICENSE
  31. String docker_qualimap
  32. String docker_manta
  33. String docker_strelka
  34. #config
  35. String cluster_config
  36. String disk_size
  37. Boolean? fastqc
  38. Boolean bamqc
  39. if (normal_in1 != ""){
  40. call fastqTobam.SentieonFastqToBam as SentieonFastqToBam_normal{
  41. input:
  42. fastq1=normal_in1,
  43. fastq2=normal_in2,
  44. sample_id=sample_id+'_N',
  45. Seq_platform=Seq_platform,
  46. ref_fasta=ref_fasta,
  47. ref_fasta_dir=ref_fasta_dir,
  48. SENTIEON_LICENSE=SENTIEON_LICENSE,
  49. docker=docker_sentieon,
  50. cluster_config=cluster_config,
  51. disk_size=disk_size
  52. }
  53. if (bamqc){
  54. call qualimap.qualimap as qualimap_normal{
  55. input:
  56. sample_id=sample_id+'_N',
  57. bam_file=SentieonFastqToBam_normal.deduped_bam,
  58. bam_bai=SentieonFastqToBam_normal.deduped_bam_bai,
  59. annot_gff=annot_gff,
  60. docker=docker_qualimap,
  61. cluster_config=cluster_config,
  62. disk_size=disk_size
  63. }
  64. }
  65. call Sentieon_BQSR.Sentieon_BQSR as Sentieon_BQSR_normal{
  66. input:
  67. ref_dir=ref_fasta_dir,
  68. dbsnp_dir=dbsnp_dir,
  69. dbmills_dir = dbmills_dir,
  70. sample_id=sample_id+'_N',
  71. ref_fasta=ref_fasta,
  72. dbsnp=dbsnp,
  73. db_mills=db_mills,
  74. deduped_bam=SentieonFastqToBam_normal.deduped_bam,
  75. deduped_bam_index=SentieonFastqToBam_normal.deduped_bam_bai,
  76. docker=docker_sentieon,
  77. cluster_config=cluster_config,
  78. disk_size=disk_size,
  79. SENTIEON_LICENSE=SENTIEON_LICENSE
  80. }
  81. }
  82. if (tumor_in1 != ""){
  83. call fastqTobam.SentieonFastqToBam as SentieonFastqToBam_tumor{
  84. input:
  85. fastq1=tumor_in1,
  86. fastq2=tumor_in2,
  87. sample_id=sample_id+'_T',
  88. Seq_platform=Seq_platform,
  89. ref_fasta=ref_fasta,
  90. ref_fasta_dir=ref_fasta_dir,
  91. SENTIEON_LICENSE=SENTIEON_LICENSE,
  92. docker=docker_sentieon,
  93. cluster_config=cluster_config,
  94. disk_size=disk_size
  95. }
  96. if (bamqc){
  97. call qualimap.qualimap as qualimap_tumor{
  98. input:
  99. sample_id=sample_id+'_T',
  100. bam_file=SentieonFastqToBam_tumor.deduped_bam,
  101. bam_bai=SentieonFastqToBam_tumor.deduped_bam_bai,
  102. annot_gff=annot_gff,
  103. docker=docker_qualimap,
  104. cluster_config=cluster_config,
  105. disk_size=disk_size
  106. }
  107. }
  108. call Sentieon_BQSR.Sentieon_BQSR as Sentieon_BQSR_tumor{
  109. input:
  110. ref_dir=ref_fasta_dir,
  111. dbsnp_dir=dbsnp_dir,
  112. dbmills_dir = dbmills_dir,
  113. sample_id=sample_id+'_T',
  114. ref_fasta=ref_fasta,
  115. dbsnp=dbsnp,
  116. db_mills=db_mills,
  117. deduped_bam=SentieonFastqToBam_tumor.deduped_bam,
  118. deduped_bam_index=SentieonFastqToBam_tumor.deduped_bam_bai,
  119. docker=docker_sentieon,
  120. cluster_config=cluster_config,
  121. disk_size=disk_size,
  122. SENTIEON_LICENSE=SENTIEON_LICENSE
  123. }
  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 TNscope.sentieon_TNscope as sentieon_TNscope{
  144. input:
  145. sample_id = sample_id,
  146. tumor_bam = SentieonFastqToBam_tumor.deduped_bam,
  147. tumor_bam_bai = SentieonFastqToBam_tumor.deduped_bam_bai,
  148. normal_bam = SentieonFastqToBam_normal.deduped_bam,
  149. normal_bam_bai = SentieonFastqToBam_normal.deduped_bam_bai,
  150. tumor_name = sample_id+'_T',
  151. normal_name = sample_id+'_N',
  152. tumor_recall_data = Sentieon_BQSR_tumor.recal_table,
  153. normal_recall_data = Sentieon_BQSR_normal.recal_table,
  154. ref_dir = ref_fasta_dir,
  155. ref_fasta = ref_fasta,
  156. dbsnp_dir = dbsnp_dir,
  157. dbsnp = dbsnp,
  158. # excute env
  159. docker = docker_sentieon,
  160. cluster_config = cluster_config,
  161. disk_size = disk_size,
  162. SENTIEON_LICENSE = SENTIEON_LICENSE
  163. }
  164. call manta_calling.manta_calling as manta_calling{
  165. input:
  166. tumor_bam = Sentieon_BQSR_tumor.recaled_bam,
  167. tumor_bam_bai = Sentieon_BQSR_tumor.recaled_bam_index,
  168. normal_bam = Sentieon_BQSR_normal.recaled_bam,
  169. normal_bam_bai = Sentieon_BQSR_normal.recaled_bam_index,
  170. ref_fasta = ref_fasta,
  171. ref_dir = ref_fasta_dir,
  172. sample_id = sample_id,
  173. docker = docker_manta,
  174. cluster_config = cluster_config,
  175. disk_size = disk_size
  176. }
  177. call strelka_calling.strelka_calling as strelka_calling{
  178. input:
  179. tumor_bam = Sentieon_BQSR_tumor.recaled_bam,
  180. tumor_bam_bai = Sentieon_BQSR_tumor.recaled_bam_index,
  181. normal_bam = Sentieon_BQSR_normal.recaled_bam,
  182. normal_bam_bai = Sentieon_BQSR_normal.recaled_bam_index,
  183. ref_fasta = ref_fasta,
  184. ref_dir = ref_fasta_dir,
  185. sample_id = sample_id,
  186. manta_indel_vcf = manta_calling.manta_indel_vcf,
  187. manta_indel_vcf_index = manta_calling.manta_indel_vcf_index,
  188. docker=docker_strelka,
  189. cluster_config=cluster_config,
  190. disk_size=disk_size
  191. }
  192. }