Sfoglia il codice sorgente

add realigner and bqsr

master
YaqingLiu 4 anni fa
parent
commit
fa91f6bae4
3 ha cambiato i file con 173 aggiunte e 65 eliminazioni
  1. +59
    -0
      tasks/BQSR.wdl
  2. +45
    -0
      tasks/Realigner.wdl
  3. +69
    -65
      workflow.wdl

+ 59
- 0
tasks/BQSR.wdl Vedi File

@@ -0,0 +1,59 @@
task BQSR {
File ref_dir
File dbsnp_dir
File dbmills_dir
String sample
String SENTIEON_INSTALL_DIR
String SENTIEON_LICENSE
String fasta
String dbsnp
String db_mills
File realigned_bam
File realigned_bam_index
String docker
String cluster_config
String disk_size
command <<<
set -o pipefail
set -e
export SENTIEON_LICENSE=${SENTIEON_LICENSE}
nt=$(nproc)
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt \
-r ${ref_dir}/${fasta} -i ${realigned_bam} \
--algo QualCal \
-k ${dbsnp_dir}/${dbsnp} -k ${dbmills_dir}/${db_mills} \
${sample}_recal_data.table
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt \
-r ${ref_dir}/${fasta} -i ${realigned_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.realigned.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_result.csv
${SENTIEON_INSTALL_DIR}/bin/sentieon plot QualCal -o ${sample}_bqsr.pdf ${sample}_recal_result.csv
>>>
runtime {
docker: docker
cluster: cluster_config
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
}
output {
File recal_table = "${sample}_recal_data.table"
File recal_post = "${sample}_recal_data.table.post"
File recaled_bam = "${sample}.sorted.deduped.realigned.recaled.bam"
File recaled_bam_index = "${sample}.sorted.deduped.realigned.recaled.bam.bai"
File recal_csv = "${sample}_recal_result.csv"
File bqsrreport_pdf = "${sample}_bqsr.pdf"
}
}

+ 45
- 0
tasks/Realigner.wdl Vedi File

@@ -0,0 +1,45 @@
task Realigner {
File ref_dir
File dbmills_dir
String SENTIEON_INSTALL_DIR
String SENTIEON_LICENSE
String sample
String fasta
File deduped_bam
File deduped_bam_index
String db_mills
String docker
String cluster_config
String disk_size
command <<<
set -o pipefail
set -e
export SENTIEON_LICENSE=${SENTIEON_LICENSE}
nt=$(nproc)
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt \
-r ${ref_dir}/${fasta} \
-i ${deduped_bam} \
--algo Realigner -k ${dbmills_dir}/${db_mills} ${sample}.sorted.deduped.realigned.bam
>>>
runtime {
docker: docker
cluster: cluster_config
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
}
output {
File realigner_bam = "${sample}.sorted.deduped.realigned.bam"
File realigner_bam_index = "${sample}.sorted.deduped.realigned.bam.bai"
}
}

+ 69
- 65
workflow.wdl Vedi File

@@ -1,72 +1,76 @@
import "./tasks/Realigner.wdl" as Realigner
import "./tasks/BQSR.wdl" as BQSR
import "./tasks/PoN.wdl" as PoN
import "./tasks/mergePoN.wdl" as mergePoN
workflow {{ project_name }} {
String SENTIEON_INSTALL_DIR
String SENTIEON_LICENSE
String panel_id
String SENTIEON_INSTALL_DIR
String SENTIEON_LICENSE
String panel_id

File ref_dir
String fasta
File cosmic_dir
String cosmic_vcf
File dbsnp_dir
String dbsnp
File regions
File ref_dir
String fasta
File cosmic_dir
String cosmic_vcf
File dbsnp_dir
String dbsnp
File regions

Array[Array[File]] normal_recaled_bam_bai
String sentieon_docker
String cluster_config
String disk_size
scatter (item in normal_recaled_bam_bai){
call PoN.PoN as PoN {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
regions=regions,
normal_bam=item[0],
normal_bam_index=item[1],
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
}
}
Array[Array[File]] normal_recaled_bam_bai
String sentieon_docker
String cluster_config
String disk_size
call Realigner.Realigner as Realigner {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
deduped_bam=Dedup.deduped_bam,
deduped_bam_index=Dedup.deduped_bam_index,
db_mills=db_mills,
dbmills_dir=dbmills_dir,
sample=sample_id + '_tumor',
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
}

Array[File] TNhaplotyper_pon_vcfs = PoN.TNhaplotyper_pon_vcf
Array[File] TNhaplotyper2_pon_vcfs = PoN.TNhaplotyper2_pon_vcf
Array[File] TNscope_pon_vcfs = PoN.TNscope_pon_vcf
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 + '_tumor',
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
}

call mergePoN.mergePoN as mergePoN_TNhaplotyper {
input:
pon_vcfs=TNhaplotyper_pon_vcfs,
panel_id=panel_id,
docker=bcftools_docker,
disk_size=disk_size,
cluster_config=cluster_config
}

call mergePoN.mergePoN as mergePoN_TNhaplotyper2 {
input:
pon_vcfs=TNhaplotyper2_pon_vcfs,
panel_id=panel_id,
docker=bcftools_docker,
disk_size=disk_size,
cluster_config=cluster_config
}

call mergePoN.mergePoN as mergePoN_TNscope {
input:
pon_vcfs=TNscope_pon_vcfs,
panel_id=panel_id,
docker=bcftools_docker,
disk_size=disk_size,
cluster_config=cluster_config
}
call PoN.PoN as PoN {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
regions=regions,
normal_bam=BQSR.recaled_bam,
normal_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
}
}
}

Loading…
Annulla
Salva