|
- import "./tasks/mapping.wdl" as mapping
- import "./tasks/Metrics.wdl" as Metrics
- import "./tasks/Dedup.wdl" as Dedup
- import "./tasks/deduped_Metrics.wdl" as deduped_Metrics
- import "./tasks/Realigner.wdl" as Realigner
- import "./tasks/BQSR.wdl" as BQSR
- import "./tasks/Haplotyper.wdl" as Haplotyper
- import "./tasks/corealigner.wdl" as corealigner
- import "./tasks/PON.wdl" as PON
- import "./tasks/TNseq.wdl" as TNseq
- import "./tasks/TNscope.wdl" as TNscope
- import "./tasks/annovar.wdl" as annovar
- import "./tasks/vcf2maf.wdl" as vcf2maf
-
-
- workflow {{ project_name }} {
-
- String sample_id
- Boolean TN
- File fastq_1
- File fastq_2
- File? normal_recaled_bam
- File? normal_recaled_bam_index
- String type
-
- String SENTIEON_INSTALL_DIR
- String SENTIEON_LICENSE
- String sentieon_docker
- String annovar_docker
- String maftools_docker
-
- File ref_dir
- String fasta
- File dbmills_dir
- String db_mills
- File dbsnp_dir
- String dbsnp
- File regions
- String disk_size
- String cluster_config
-
- Boolean set_pon
- File? pon_vcf
- File? cosmic_dir
- String? cosmic_vcf
-
- Boolean set_annovar
- File? database
- Boolean set_vcf2maf
- Boolean germline
-
-
- call mapping.mapping as mapping {
- input:
- group=sample_id + '_' + type,
- sample=sample_id + '_' + type,
- fastq_1=fastq_1,
- fastq_2=fastq_2,
- SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- pl="ILLUMINAL",
- fasta=fasta,
- ref_dir=ref_dir,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_config
- }
-
- call Metrics.Metrics as Metrics {
- input:
- SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- fasta=fasta,
- ref_dir=ref_dir,
- sorted_bam=mapping.sorted_bam,
- sorted_bam_index=mapping.sorted_bam_index,
- sample=sample_id + '_' + type,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_config
- }
-
- call Dedup.Dedup as Dedup {
- input:
- SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- sorted_bam=mapping.sorted_bam,
- sorted_bam_index=mapping.sorted_bam_index,
- sample=sample_id + '_' + type,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_config
- }
-
- call deduped_Metrics.deduped_Metrics as deduped_Metrics {
- input:
- SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- fasta=fasta,
- ref_dir=ref_dir,
- Dedup_bam=Dedup.Dedup_bam,
- Dedup_bam_index=Dedup.Dedup_bam_index,
- sample=sample_id + '_' + type,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_config
- }
-
- call Realigner.Realigner as Realigner {
- input:
- SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- fasta=fasta,
- ref_dir=ref_dir,
- Dedup_bam=Dedup.Dedup_bam,
- Dedup_bam_index=Dedup.Dedup_bam_index,
- db_mills=db_mills,
- dbmills_dir=dbmills_dir,
- sample=sample_id + '_' + type,
- docker=sentieon_docker,
- disk_size=disk_size,
- regions=regions,
- cluster_config=cluster_config
- }
-
- call BQSR.BQSR as BQSR {
- input:
- SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- fasta=fasta,
- ref_dir=ref_dir,
- realigned_bam=Realigner.realigner_bam,
- realigned_bam_index=Realigner.realigner_bam_index,
- db_mills=db_mills,
- dbmills_dir=dbmills_dir,
- dbsnp=dbsnp,
- dbsnp_dir=dbsnp_dir,
- sample=sample_id + '_' + type,
- regions=regions,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_config
- }
-
- if (set_pon && type == "normal") {
- call PON.PON as PON {
- input:
- SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- sample=sample_id,
- fasta=fasta,
- ref_dir=ref_dir,
- normal_recaled_bam=BQSR.recaled_bam,
- normal_recaled_bam_index=BQSR.recaled_bam_index,
- cosmic_vcf=cosmic_vcf,
- cosmic_dir=cosmic_dir,
- dbsnp=dbsnp,
- dbsnp_dir=dbsnp_dir,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_config
- }
- }
-
- if (germline) {
- call Haplotyper.Haplotyper as Haplotyper {
- input:
- SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- sample=sample_id,
- fasta=fasta,
- ref_dir=ref_dir,
- recaled_bam=BQSR.recaled_bam,
- recaled_bam_index=BQSR.recaled_bam_index,
- dbsnp=dbsnp,
- dbsnp_dir=dbsnp_dir,
- regions=regions,
- docker=sentieon_docker,
- disk_size=disk_size,
- cluster_config=cluster_config
- }
- }
-
- if (type == "tumor" && TN) {
- call corealigner.corealigner as corealigner {
- input:
- SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- fasta=fasta,
- ref_dir=ref_dir,
- sample=sample_id,
- docker=sentieon_docker,
- db_mills=db_mills,
- dbmills_dir=dbmills_dir,
- dbsnp=dbsnp,
- dbsnp_dir=dbsnp_dir,
- tumor_recaled_bam=BQSR.recaled_bam,
- tumor_recaled_bam_index=BQSR.recaled_bam_index,
- normal_recaled_bam=normal_recaled_bam,
- normal_recaled_bam_index=normal_recaled_bam_index,
- disk_size=disk_size,
- cluster_config=cluster_config
- }
- }
-
- if (type == "tumor") {
- call TNseq.TNseq as TNseq {
- input:
- TN=TN,
- SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- fasta=fasta,
- ref_dir=ref_dir,
- regions=regions,
- corealigner_bam=corealigner.corealigner_bam,
- corealigner_bam_index=corealigner.corealigner_bam_index,
- tumor_recaled_bam=BQSR.recaled_bam,
- tumor_recaled_bam_index=BQSR.recaled_bam_index,
- dbsnp=dbsnp,
- dbsnp_dir=dbsnp_dir,
- set_pon=set_pon,
- pon_vcf=pon_vcf,
- cosmic_vcf=cosmic_vcf,
- cosmic_dir=cosmic_dir,
- tumor_name=sample_id + "_tumor",
- normal_name=sample_id + "_normal",
- docker=sentieon_docker,
- sample=sample_id,
- disk_size=disk_size,
- cluster_config=cluster_config
- }
-
- call TNscope.TNscope as TNscope {
- input:
- TN=TN,
- SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
- SENTIEON_LICENSE=SENTIEON_LICENSE,
- fasta=fasta,
- ref_dir=ref_dir,
- regions=regions,
- corealigner_bam=corealigner.corealigner_bam,
- corealigner_bam_index=corealigner.corealigner_bam_index,
- tumor_recaled_bam=BQSR.recaled_bam,
- tumor_recaled_bam_index=BQSR.recaled_bam_index,
- dbsnp=dbsnp,
- dbsnp_dir=dbsnp_dir,
- set_pon=set_pon,
- pon_vcf=pon_vcf,
- cosmic_vcf=cosmic_vcf,
- cosmic_dir=cosmic_dir,
- tumor_name=sample_id + "_tumor",
- normal_name=sample_id + "_normal",
- docker=sentieon_docker,
- sample=sample_id,
- disk_size=disk_size,
- cluster_config=cluster_config
- }
- }
-
- if (set_annovar && defined(TNscope.TNscope_vcf) && defined(TNseq.TNseq_vcf)){
- call annovar.annovar as annovar {
- input:
- docker=annovar_docker,
- database=database,
- TNscope_vcf=TNscope.TNscope_vcf,
- TNseq_vcf=TNseq.TNseq_vcf,
- sample=sample_id,
- cluster_config=cluster_config,
- disk_size=disk_size
- }
-
- if (set_vcf2maf){
- call vcf2maf.vcf2maf as vcf2maf {
- input:
- docker=maftools_docker,
- multianno_TNscope_txt=annovar.multianno_TNscope_txt,
- multianno_TNseq_txt=annovar.multianno_TNseq_txt,
- sample=sample_id,
- cluster_config=cluster_config,
- disk_size=disk_size
- }
- }
- }
- }
|