Browse Source

Alter: BQSR

master
YaqingLiu 3 years ago
parent
commit
9e1ac3e469
5 changed files with 88 additions and 90 deletions
  1. +15
    -0
      tasks/BQSR.wdl
  2. +6
    -7
      tasks/Haplotyper.wdl
  3. +5
    -8
      tasks/TNscope.wdl
  4. +5
    -8
      tasks/TNseq.wdl
  5. +57
    -67
      workflow.wdl

+ 15
- 0
tasks/BQSR.wdl View File

--algo QualCal \ --algo QualCal \
-k ${dbsnp_dir}/${dbsnp} -k ${dbmills_dir}/${db_mills} \ -k ${dbsnp_dir}/${dbsnp} -k ${dbmills_dir}/${db_mills} \
${sample}_recal_data.table ${sample}_recal_data.table
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt \
-r ${ref_dir}/${fasta} -i ${deduped_bam} -q ${sample}_recal_data.table \
--algo QualCal -k ${dbsnp_dir}/${dbsnp} -k ${dbmills_dir}/${db_mills} \
${sample}_recal_data.table.post --algo ReadWriter ${sample}.sorted.deduped.recaled.bam
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --algo QualCal \
--plot --before ${sample}_recal_data.table --after ${sample}_recal_data.table.post ${sample}_recal_data.csv
${SENTIEON_INSTALL_DIR}/bin/sentieon plot bqsr -o ${sample}_bqsrreport.pdf ${sample}_recal_data.csv
>>> >>>
runtime { runtime {
output { output {
File recal_table = "${sample}_recal_data.table" File recal_table = "${sample}_recal_data.table"
File recal_post = "${sample}_recal_data.table.post"
File recaled_bam = "${sample}.sorted.deduped.recaled.bam"
File recaled_bam_index = "${sample}.sorted.deduped.recaled.bam.bai"
File recal_csv = "${sample}_recal_data.csv"
File bqsrreport_pdf = "${sample}_bqsrreport.pdf"
} }
} }

+ 6
- 7
tasks/Haplotyper.wdl View File

String SENTIEON_INSTALL_DIR String SENTIEON_INSTALL_DIR
String SENTIEON_LICENSE String SENTIEON_LICENSE
String fasta String fasta
File deduped_bam
File deduped_bam_index
File recal_table
File recaled_bam
File recaled_bam_index
String dbsnp String dbsnp
String sample String sample
String docker String docker
fi fi
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt \ ${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt \
--interval ${regions} -r ${ref_dir}/${fasta} \
-i ${deduped_bam} -q ${recal_table}\
--algo Haplotyper -d ${dbsnp_dir}/${dbsnp} \
${sample}_hc.vcf
--interval ${regions} -r ${ref_dir}/${fasta} \
-i ${recaled_bam} \
--algo Haplotyper -d ${dbsnp_dir}/${dbsnp} \
${sample}_hc.vcf
>>> >>>
runtime { runtime {

+ 5
- 8
tasks/TNscope.wdl View File

String sample String sample
String SENTIEON_INSTALL_DIR String SENTIEON_INSTALL_DIR
String SENTIEON_LICENSE String SENTIEON_LICENSE
File tumor_deduped_bam
File tumor_deduped_bam_index
File tumor_recal_table
File normal_deduped_bam
File normal_deduped_bam_index
File normal_recal_table
File tumor_recaled_bam
File tumor_recaled_bam_index
File normal_recaled_bam
File normal_recaled_bam_index
String tumor_name String tumor_name
String normal_name String normal_name
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt \ ${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt \
-r ${ref_dir}/${fasta} $INTERVAL \ -r ${ref_dir}/${fasta} $INTERVAL \
-i ${tumor_deduped_bam} -q ${tumor_recal_table} \
-i ${normal_deduped_bam} -q ${normal_recal_table} \
-i ${tumor_recaled_bam} -i ${normal_recaled_bam} \
--algo TNscope \ --algo TNscope \
--tumor_sample ${tumor_name} --normal_sample ${normal_name} \ --tumor_sample ${tumor_name} --normal_sample ${normal_name} \
--dbsnp ${dbsnp_dir}/${dbsnp} \ --dbsnp ${dbsnp_dir}/${dbsnp} \

+ 5
- 8
tasks/TNseq.wdl View File

String sample String sample
String SENTIEON_INSTALL_DIR String SENTIEON_INSTALL_DIR
String SENTIEON_LICENSE String SENTIEON_LICENSE
File tumor_deduped_bam
File tumor_deduped_bam_index
File tumor_recal_table
File normal_deduped_bam
File normal_deduped_bam_index
File normal_recal_table
File tumor_recaled_bam
File tumor_recaled_bam_index
File normal_recaled_bam
File normal_recaled_bam_index
String tumor_name String tumor_name
String normal_name String normal_name




${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt \ ${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt \
-r ${ref_dir}/${fasta} $INTERVAL \ -r ${ref_dir}/${fasta} $INTERVAL \
-i ${tumor_deduped_bam} -q ${tumor_recal_table} \
-i ${normal_deduped_bam} -q ${normal_recal_table} \
-i ${tumor_recaled_bam} -i ${normal_recaled_bam} \
--algo TNhaplotyper2 \ --algo TNhaplotyper2 \
--tumor_sample ${tumor_name} --normal_sample ${normal_name} \ --tumor_sample ${tumor_name} --normal_sample ${normal_name} \
--germline_vcf ${germline_resource} \ --germline_vcf ${germline_resource} \

+ 57
- 67
workflow.wdl View File

sample=sample_id + '_normal', sample=sample_id + '_normal',
fasta=fasta, fasta=fasta,
ref_dir=ref_dir, ref_dir=ref_dir,
deduped_bam=normal_Dedup.deduped_bam,
deduped_bam_index=normal_Dedup.deduped_bam_index,
recal_table=normal_BQSR.recal_table,
recaled_bam=normal_BQSR.recaled_bam,
recaled_bam_index=normal_BQSR.recaled_bam_index,
dbsnp=dbsnp, dbsnp=dbsnp,
dbsnp_dir=dbsnp_dir, dbsnp_dir=dbsnp_dir,
regions=regions, regions=regions,
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE, SENTIEON_LICENSE=SENTIEON_LICENSE,
sample=sample_id, sample=sample_id,
normal_deduped_bam=normal_Dedup.deduped_bam,
normal_deduped_bam_index=normal_Dedup.deduped_bam_index,
normal_recal_table=normal_BQSR.recal_table,
tumor_deduped_bam=tumor_Dedup.deduped_bam,
tumor_deduped_bam_index=tumor_Dedup.deduped_bam_index,
tumor_recal_table=tumor_BQSR.recal_table,
normal_recaled_bam=normal_BQSR.recaled_bam,
normal_recaled_bam_index=normal_BQSR.recaled_bam_index,
tumor_recaled_bam=tumor_BQSR.recaled_bam,
tumor_recaled_bam_index=tumor_BQSR.recaled_bam_index,
normal_name=sample_id + "_normal", normal_name=sample_id + "_normal",
tumor_name=sample_id + "_tumor", tumor_name=sample_id + "_tumor",
fasta=fasta, fasta=fasta,
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE, SENTIEON_LICENSE=SENTIEON_LICENSE,
sample=sample_id, sample=sample_id,
normal_deduped_bam=normal_Dedup.deduped_bam,
normal_deduped_bam_index=normal_Dedup.deduped_bam_index,
normal_recal_table=normal_BQSR.recal_table,
tumor_deduped_bam=tumor_Dedup.deduped_bam,
tumor_deduped_bam_index=tumor_Dedup.deduped_bam_index,
tumor_recal_table=tumor_BQSR.recal_table,
normal_recaled_bam=normal_BQSR.recaled_bam,
normal_recaled_bam_index=normal_BQSR.recaled_bam_index,
tumor_recaled_bam=tumor_BQSR.recaled_bam,
tumor_recaled_bam_index=tumor_BQSR.recaled_bam_index,
normal_name=sample_id + "_normal", normal_name=sample_id + "_normal",
tumor_name=sample_id + "_tumor", tumor_name=sample_id + "_tumor",
fasta=fasta, fasta=fasta,
call somatic.somatic as somatic { call somatic.somatic as somatic {
input: input:
sample=sample_id, sample=sample_id,
tumor_bam=tumor_Dedup.deduped_bam,
tumor_bam_index=tumor_Dedup.deduped_bam_index,
normal_bam=normal_Dedup.deduped_bam,
normal_bam_index=normal_Dedup.deduped_bam_index,
normal_bam=normal_BQSR.recaled_bam,
normal_bam_index=normal_BQSR.recaled_bam_index,
tumor_bam=tumor_BQSR.recaled_bam,
tumor_bam_index=tumor_BQSR.recaled_bam_index,
ref_dir=ref_dir, ref_dir=ref_dir,
fasta=fasta, fasta=fasta,
docker=varscan_docker, docker=varscan_docker,


if (input_bam) { if (input_bam) {
if (tumor_deduped_bam != "") { if (tumor_deduped_bam != "") {
call BQSR.BQSR as tumor_BQSR {
call BQSR.BQSR as tumor_BQSR_fb {
input: input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE, SENTIEON_LICENSE=SENTIEON_LICENSE,
} }
if (normal_deduped_bam != "") { if (normal_deduped_bam != "") {
call BQSR.BQSR as normal_BQSR {
call BQSR.BQSR as normal_BQSR_fb {
input: input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE, SENTIEON_LICENSE=SENTIEON_LICENSE,
} }
if (haplotyper) { if (haplotyper) {
call Haplotyper.Haplotyper as Haplotyper {
call Haplotyper.Haplotyper as Haplotyper_fb {
input: input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE, SENTIEON_LICENSE=SENTIEON_LICENSE,
sample=sample_id + '_normal', sample=sample_id + '_normal',
fasta=fasta, fasta=fasta,
ref_dir=ref_dir, ref_dir=ref_dir,
deduped_bam=normal_Dedup.deduped_bam,
deduped_bam_index=normal_Dedup.deduped_bam_index,
recal_table=normal_BQSR.recal_table,
recaled_bam=normal_BQSR_fb.recaled_bam,
recaled_bam_index=normal_BQSR_fb.recaled_bam_index,
dbsnp=dbsnp, dbsnp=dbsnp,
dbsnp_dir=dbsnp_dir, dbsnp_dir=dbsnp_dir,
regions=regions, regions=regions,
} }
if (tnseq) { if (tnseq) {
call TNseq.TNseq as TNseq {
call TNseq.TNseq as TNseq_fb {
input: input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE, SENTIEON_LICENSE=SENTIEON_LICENSE,
sample=sample_id, sample=sample_id,
normal_deduped_bam=normal_Dedup.deduped_bam,
normal_deduped_bam_index=normal_Dedup.deduped_bam_index,
normal_recal_table=normal_BQSR.recal_table,
tumor_deduped_bam=tumor_Dedup.deduped_bam,
tumor_deduped_bam_index=tumor_Dedup.deduped_bam_index,
tumor_recal_table=tumor_BQSR.recal_table,
normal_recaled_bam=normal_BQSR_fb.recaled_bam,
normal_recaled_bam_index=normal_BQSR_fb.recaled_bam_index,
tumor_recaled_bam=tumor_BQSR_fb.recaled_bam,
tumor_recaled_bam_index=tumor_BQSR_fb.recaled_bam_index,
normal_name=sample_id + "_normal", normal_name=sample_id + "_normal",
tumor_name=sample_id + "_tumor", tumor_name=sample_id + "_tumor",
fasta=fasta, fasta=fasta,
} }


if (annovar) { if (annovar) {
call ANNOVAR.ANNOVAR as TNseq_annovar {
call ANNOVAR.ANNOVAR as TNseq_annovar_fb {
input: input:
vcf=TNseq.TNseq_vcf,
vcf=TNseq_fb.TNseq_vcf,
hg=hg, hg=hg,
only_pass=only_pass, only_pass=only_pass,
annovar_database=annovar_database, annovar_database=annovar_database,
} }


if (vep) { if (vep) {
call VEP.VEP as TNseq_VEP {
call VEP.VEP as TNseq_VEP_fb {
input: input:
vcf=TNseq.TNseq_vcf,
vcf=TNseq_fb.TNseq_vcf,
hg=hg, hg=hg,
only_pass=only_pass, only_pass=only_pass,
sample_id=sample_id, sample_id=sample_id,
} }


if (tnscope) { if (tnscope) {
call TNscope.TNscope as TNscope {
call TNscope.TNscope as TNscope_fb {
input: input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR, SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE, SENTIEON_LICENSE=SENTIEON_LICENSE,
sample=sample_id, sample=sample_id,
normal_deduped_bam=normal_Dedup.deduped_bam,
normal_deduped_bam_index=normal_Dedup.deduped_bam_index,
normal_recal_table=normal_BQSR.recal_table,
tumor_deduped_bam=tumor_Dedup.deduped_bam,
tumor_deduped_bam_index=tumor_Dedup.deduped_bam_index,
tumor_recal_table=tumor_BQSR.recal_table,
normal_recaled_bam=normal_BQSR_fb.recaled_bam,
normal_recaled_bam_index=normal_BQSR_fb.recaled_bam_index,
tumor_recaled_bam=tumor_BQSR_fb.recaled_bam,
tumor_recaled_bam_index=tumor_BQSR_fb.recaled_bam_index,
normal_name=sample_id + "_normal", normal_name=sample_id + "_normal",
tumor_name=sample_id + "_tumor", tumor_name=sample_id + "_tumor",
fasta=fasta, fasta=fasta,
} }
if (annovar) { if (annovar) {
call ANNOVAR.ANNOVAR as TNscope_annovar {
call ANNOVAR.ANNOVAR as TNscope_annovar_fb {
input: input:
vcf=TNscope.TNscope_vcf,
vcf=TNscope_fb.TNscope_vcf,
hg=hg, hg=hg,
only_pass=only_pass, only_pass=only_pass,
annovar_database=annovar_database, annovar_database=annovar_database,
} }


if (vep) { if (vep) {
call VEP.VEP as TNscope_VEP {
call VEP.VEP as TNscope_VEP_fb {
input: input:
vcf=TNscope.TNscope_vcf,
vcf=TNscope_fb.TNscope_vcf,
hg=hg, hg=hg,
only_pass=only_pass, only_pass=only_pass,
sample_id=sample_id, sample_id=sample_id,
} }


if (varscan) { if (varscan) {
call somatic.somatic as somatic {
call somatic.somatic as somatic_fb {
input: input:
sample=sample_id, sample=sample_id,
tumor_bam=tumor_Dedup.deduped_bam,
tumor_bam_index=tumor_Dedup.deduped_bam_index,
normal_bam=normal_Dedup.deduped_bam,
normal_bam_index=normal_Dedup.deduped_bam_index,
normal_bam=normal_BQSR_fb.recaled_bam,
normal_bam_index=normal_BQSR_fb.recaled_bam_index,
tumor_bam=tumor_BQSR_fb.recaled_bam,
tumor_bam_index=tumor_BQSR_fb.recaled_bam_index,
ref_dir=ref_dir, ref_dir=ref_dir,
fasta=fasta, fasta=fasta,
docker=varscan_docker, docker=varscan_docker,
cluster_config=cluster_config cluster_config=cluster_config
} }


call processSomatic.processSomatic as processSomatic {
call processSomatic.processSomatic as processSomatic_fb {
input: input:
sample=sample_id, sample=sample_id,
varscan_snp=somatic.varscan_snp,
varscan_indel=somatic.varscan_indel,
varscan_snp=somatic_fb.varscan_snp,
varscan_indel=somatic_fb.varscan_indel,
docker=varscan_docker, docker=varscan_docker,
disk_size=disk_size, disk_size=disk_size,
cluster_config=cluster_config cluster_config=cluster_config
} }


call somaticFilter.somaticFilter as somaticFilter {
call somaticFilter.somaticFilter as somaticFilter_fb {
input: input:
sample=sample_id, sample=sample_id,
varscan_snp_somatic_hc=processSomatic.varscan_snp_somatic_hc,
varscan_snp_germline_hc=processSomatic.varscan_snp_germline_hc,
varscan_snp_loh_hc=processSomatic.varscan_snp_loh_hc,
varscan_indel_somatic_hc=processSomatic.varscan_indel_somatic_hc,
varscan_indel_germline_hc=processSomatic.varscan_indel_germline_hc,
varscan_indel_loh_hc=processSomatic.varscan_indel_loh_hc,
varscan_indel=somatic.varscan_indel,
varscan_snp_somatic_hc=processSomatic_fb.varscan_snp_somatic_hc,
varscan_snp_germline_hc=processSomatic_fb.varscan_snp_germline_hc,
varscan_snp_loh_hc=processSomatic_fb.varscan_snp_loh_hc,
varscan_indel_somatic_hc=processSomatic_fb.varscan_indel_somatic_hc,
varscan_indel_germline_hc=processSomatic_fb.varscan_indel_germline_hc,
varscan_indel_loh_hc=processSomatic_fb.varscan_indel_loh_hc,
varscan_indel=somatic_fb.varscan_indel,
docker=varscan_docker, docker=varscan_docker,
disk_size=disk_size, disk_size=disk_size,
cluster_config=cluster_config cluster_config=cluster_config
} }


if (annovar) { if (annovar) {
call ANNOVAR.ANNOVAR as VarScan_annovar {
call ANNOVAR.ANNOVAR as VarScan_annovar_fb {
input: input:
vcf=somaticFilter.varscan_somatic_filter,
vcf=somaticFilter_fb.varscan_somatic_filter,
hg=hg, hg=hg,
only_pass=only_pass, only_pass=only_pass,
annovar_database=annovar_database, annovar_database=annovar_database,
} }


if (vep) { if (vep) {
call VEP.VEP as VarScan_VEP {
call VEP.VEP as VarScan_VEP_fb {
input: input:
vcf=VarScan.VarScan_vcf,
vcf=VarScan_fb.VarScan_vcf,
hg=hg, hg=hg,
only_pass=only_pass, only_pass=only_pass,
sample_id=sample_id, sample_id=sample_id,

Loading…
Cancel
Save