|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250 |
- import "./tasks/BQSR.wdl" as Sentieon_BQSR
- import "./tasks/TNseq.wdl" as TNseq
- import "./tasks/TNscope.wdl" as TNscope
- import "./tasks/manta.wdl" as manta_calling
- import "./tasks/strelka.wdl" as strelka_calling
- import "./tasks/bcftools.wdl" as bcftools
- import "./tasks/bcftools_concat.wdl" as bcftools_concat
- import "./tasks/annovar.wdl" as annovar
- import "./tasks/Haplotyper.wdl" as Haplotyper
- import "./tasks/MSIsensor.wdl" as MSIsensor
- import "./tasks/tmb.wdl" as tmb
-
-
- workflow {{ project_name }} {
- #sample info
- File? normal_deduped_bam
- File? normal_deduped_bam_bai
- File? tumor_deduped_bam
- File? tumor_deduped_bam_bai
- String sample_id
- String Seq_platform
- #reference fasta
- String ref_fasta
- File ref_fasta_dir
- String ref_bed
- File annot_gff
- File dbsnp_dir
- File dbmills_dir
- String dbsnp
- String db_mills
- File germline_resource
- File germline_resource_tbi
- File annovar_database
- File? regions
- File baseline
- File hg38_CDS
-
- #docker
- String docker_fastp
- String docker_sentieon
- String SENTIEON_LICENSE
- String docker_qualimap
- String docker_manta
- String docker_strelka
- String docker_bcftools
- String docker_annovar
- String docker_tmb
- String docker_MSIsensor
-
- #config
- String cluster_config
- String disk_size
- Boolean? fastqc
- Boolean bamqc
- Boolean Annovar
- Boolean AF_filter
-
-
- if (normal_deduped_bam != ""){
-
- call Sentieon_BQSR.Sentieon_BQSR as Sentieon_BQSR_normal{
- input:
- ref_dir=ref_fasta_dir,
- dbsnp_dir=dbsnp_dir,
- dbmills_dir = dbmills_dir,
- sample_id=sample_id+'_N',
- ref_fasta=ref_fasta,
- dbsnp=dbsnp,
- db_mills=db_mills,
- deduped_bam=normal_deduped_bam,
- deduped_bam_index=normal_deduped_bam_bai,
- docker=docker_sentieon,
- cluster_config=cluster_config,
- disk_size=disk_size,
- SENTIEON_LICENSE=SENTIEON_LICENSE
- }
-
- }
-
- if (tumor_deduped_bam != ""){
-
- call Sentieon_BQSR.Sentieon_BQSR as Sentieon_BQSR_tumor{
- input:
- ref_dir=ref_fasta_dir,
- dbsnp_dir=dbsnp_dir,
- dbmills_dir = dbmills_dir,
- sample_id=sample_id+'_T',
- ref_fasta=ref_fasta,
- dbsnp=dbsnp,
- db_mills=db_mills,
- deduped_bam=tumor_deduped_bam,
- deduped_bam_index=tumor_deduped_bam_bai,
- docker=docker_sentieon,
- cluster_config=cluster_config,
- disk_size=disk_size,
- SENTIEON_LICENSE=SENTIEON_LICENSE
- }
-
- }
-
-
-
-
- call Haplotyper.Haplotyper as Haplotyper {
- input:
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- sample=sample_id + '_N',
- fasta=ref_fasta,
- ref_dir=ref_fasta_dir,
- recaled_bam=Sentieon_BQSR_normal.recaled_bam,
- recaled_bam_index=Sentieon_BQSR_normal.recaled_bam_index,
- dbsnp=dbsnp,
- dbsnp_dir=dbsnp_dir,
- regions=regions,
- docker=docker_sentieon,
- disk_size=disk_size,
- cluster_config=cluster_config
- }
-
- call bcftools.bcftools as Haplotyper_bcftools {
- input:
- vcf=Haplotyper.vcf,
- fasta=ref_fasta,
- ref_dir=ref_fasta_dir,
- docker=docker_bcftools,
- cluster_config="OnDemand bcs.ps.g.large img-ubuntu-vpc",
- disk_size=disk_size
- }
-
- call TNseq.sentieon_TNseq as sentieon_TNseq{
- input:
- sample_id = sample_id,
- tumor_bam = Sentieon_BQSR_tumor.recaled_bam,
- tumor_bam_bai = Sentieon_BQSR_tumor.recaled_bam_index,
- normal_bam = Sentieon_BQSR_normal.recaled_bam,
- normal_bam_bai = Sentieon_BQSR_normal.recaled_bam_index,
- tumor_name = sample_id+'_T',
- normal_name = sample_id+'_N',
-
- ref_dir = ref_fasta_dir,
- ref_fasta = ref_fasta,
- germline_resource = germline_resource,
- germline_resource_tbi = germline_resource_tbi,
-
- docker = docker_sentieon,
- cluster_config = cluster_config,
- disk_size = disk_size,
- SENTIEON_LICENSE = SENTIEON_LICENSE
- }
-
-
-
- call bcftools.bcftools as TNseq_bcftools {
- input:
- vcf=sentieon_TNseq.vcf,
- fasta=ref_fasta,
- ref_dir=ref_fasta_dir,
- docker=docker_bcftools,
- cluster_config="OnDemand bcs.ps.g.large img-ubuntu-vpc",
- disk_size=disk_size
- }
-
- call TNscope.sentieon_TNscope as sentieon_TNscope{
- input:
- sample_id = sample_id,
- tumor_bam = tumor_deduped_bam,
- tumor_bam_bai = tumor_deduped_bam_bai,
- normal_bam = normal_deduped_bam,
- normal_bam_bai = normal_deduped_bam_bai,
- tumor_name = sample_id+'_T',
- normal_name = sample_id+'_N',
- tumor_recall_data = Sentieon_BQSR_tumor.recal_table,
- normal_recall_data = Sentieon_BQSR_normal.recal_table,
-
- ref_dir = ref_fasta_dir,
- ref_fasta = ref_fasta,
- dbsnp_dir = dbsnp_dir,
- dbsnp = dbsnp,
- # excute env
- docker = docker_sentieon,
- cluster_config = cluster_config,
- disk_size = disk_size,
- SENTIEON_LICENSE = SENTIEON_LICENSE
- }
-
- call bcftools.bcftools as TNscope_bcftools {
- input:
- vcf=sentieon_TNscope.vcf,
- fasta=ref_fasta,
- ref_dir=ref_fasta_dir,
- docker=docker_bcftools,
- cluster_config="OnDemand bcs.ps.g.large img-ubuntu-vpc",
- disk_size=disk_size
- }
-
-
- call strelka_calling.strelka_calling as strelka_calling{
- input:
- tumor_bam = Sentieon_BQSR_tumor.recaled_bam,
- tumor_bam_bai = Sentieon_BQSR_tumor.recaled_bam_index,
- normal_bam = Sentieon_BQSR_normal.recaled_bam,
- normal_bam_bai = Sentieon_BQSR_normal.recaled_bam_index,
- ref_fasta = ref_fasta,
- ref_dir = ref_fasta_dir,
- sample_id = sample_id,
- ref_bed = ref_bed,
- docker=docker_strelka,
- cluster_config="OnDemand bcs.ps.g.6xlarge img-ubuntu-vpc",
- disk_size=disk_size
- }
-
- call bcftools_concat.bcftools as bcftools_concat{
- input:
- ref_dir=ref_fasta_dir,
- fasta=ref_fasta,
- vcf_indels=strelka_calling.indel_vcf,
- vcf_snvs=strelka_calling.snv_vcf,
- sample_id=sample_id,
- docker=docker_bcftools,
- cluster_config="OnDemand bcs.ps.g.large img-ubuntu-vpc",
- disk_size=disk_size
-
- }
-
- if (Annovar){
- call annovar.ANNOVAR as TNseq_ANNOVAR {
- input:
- vcf=TNseq_bcftools.norm_vcf,
- annovar_database=annovar_database,
- docker=docker_annovar,
- cluster_config="OnDemand bcs.ps.g.6xlarge img-ubuntu-vpc",
- disk_size=disk_size
- }
-
- call tmb.TMB as TMB{
- input:
- sample=sample_id,
- hg38_CDS=hg38_CDS,
- regions=regions,
- snpindel_txt=TNseq_ANNOVAR.multianno_txt,
- docker=docker_tmb,
- cluster_config="OnDemand bcs.ps.g.large img-ubuntu-vpc",
- disk_size=disk_size,
- AF_filter=AF_filter
- }
-
-
- }
-
- }
|