Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

241 line
5.9KB

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