Bläddra i källkod

fix bug

master
YaqingLiu 5 år sedan
förälder
incheckning
a4980b4e00
10 ändrade filer med 253 tillägg och 257 borttagningar
  1. Binär
      .DS_Store
  2. +2
    -2
      defaults
  3. +7
    -3
      inputs
  4. +5
    -5
      tasks/BQSR.wdl
  5. +4
    -9
      tasks/PON.wdl
  6. +14
    -14
      tasks/TNscope.wdl
  7. +19
    -19
      tasks/TNseq.wdl
  8. +2
    -2
      tasks/bcftools.wdl
  9. +8
    -9
      tasks/corealigner.wdl
  10. +192
    -194
      workflow.wdl

Binär
.DS_Store Visa fil


+ 2
- 2
defaults Visa fil

@@ -12,8 +12,8 @@
"vcf2maf_r_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/r-base:4.0.2",
"bcftools_docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/bcftools:v1.9",
"database": "oss://pgx-reference-data/annovar/",
"regions": "oss://pgx-reference-data/reference/wes_bedfiles/agilent_v6/agilent_v6.bed",
"PONmode": true,
"regions": "oss://pgx-reference-data/reference/wes_bedfiles/agilent_v6/agilent_v6_cosmic_hg38.bed",
"set_pon": true,
"cosmic_vcf": "CosmicCodingMuts.hg38.v91.vcf",
"cosmic_dir": "oss://pgx-reference-data/reference/cosmic/",
"disk_size": "200",

+ 7
- 3
inputs Visa fil

@@ -1,4 +1,9 @@
{
"{{ project_name }}.fastq_1": "{{ fastq_1 }}",
"{{ project_name }}.fastq_2": "{{ fastq_2 }}",
"{{ project_name }}.normal_recaled_bam": "{{ normal_recaled_bam }}",
"{{ project_name }}.normal_recaled_bam_index": "{{ normal_recaled_bam_index }}",
"{{ project_name }}.type": "{{ type }}",
"{{ project_name }}.fasta": "{{ fasta }}",
"{{ project_name }}.ref_dir": "{{ ref_dir }}",
"{{ project_name }}.dbsnp": "{{ dbsnp }}",
@@ -10,11 +15,10 @@
"{{ project_name }}.sentieon_docker": "{{ sentieon_docker }}",
"{{ project_name }}.annovar_docker": "{{ annovar_docker }}",
"{{ project_name }}.vcf2maf_r_docker": "{{ vcf2maf_r_docker }}",
"{{ project_name }}.bcftools_docker": "{{ bcftools_docker }}",
"{{ project_name }}.database": "{{ database }}",
"{{ project_name }}.inputSamplesFile": "{{ inputSamplesFile }}",
"{{ project_name }}.regions": "{{ regions }}",
"{{ project_name }}.PONmode": "{{ PONmode }}",
"{{ project_name }}.set_pon": "{{ set_pon }}",
"{{ project_name }}.pon_vcf": "{{ pon_vcf }}",
"{{ project_name }}.cosmic_vcf": "{{ cosmic_vcf }}",
"{{ project_name }}.cosmic_dir": "{{ cosmic_dir }}",
"{{ project_name }}.disk_size": "{{ disk_size }}",

+ 5
- 5
tasks/BQSR.wdl Visa fil

@@ -11,8 +11,8 @@ task BQSR {
File regions
String dbsnp
String db_mills
File realigned_bam1
File realigned_bam_index1
File realigned_bam
File realigned_bam_index
String docker
String cluster_config
String disk_size
@@ -24,13 +24,13 @@ task BQSR {
export SENTIEON_LICENSE=${SENTIEON_LICENSE}
nt=$(nproc)
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} -t $nt -i ${realigned_bam1} --interval ${regions} --algo QualCal -k ${dbsnp_dir}/${dbsnp} -k ${dbmills_dir}/${db_mills} ${sample}_recal_data.table
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} -t $nt -i ${realigned_bam} --interval ${regions} --algo QualCal -k ${dbsnp_dir}/${dbsnp} -k ${dbmills_dir}/${db_mills} ${sample}_recal_data.table
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} -t $nt -i ${realigned_bam1} -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 -r ${ref_dir}/${fasta} -t $nt -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_data.csv
${SENTIEON_INSTALL_DIR}/bin/sentieon plot QualCal -o ${sample}_bqsrreport.pdf ${sample}_recal_data.csv
${SENTIEON_INSTALL_DIR}/bin/sentieon plot bqsr -o ${sample}_bqsrreport.pdf ${sample}_recal_data.csv
>>>

+ 4
- 9
tasks/PON.wdl Visa fil

@@ -3,7 +3,6 @@ task PON {
String SENTIEON_INSTALL_DIR
String SENTIEON_LICENSE
String sample
Boolean PONmode

File ref_dir
String fasta
@@ -23,14 +22,10 @@ task PON {
set -e
export SENTIEON_LICENSE=${SENTIEON_LICENSE}
nt=$(nproc)
if [ ${PONmode} ]; then
mkdir -p /cromwell_root/tmp/cosmic/
cp ${cosmic_dir}/${cosmic_vcf} /cromwell_root/tmp/cosmic/
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/cosmic/${cosmic_vcf}
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -r ${ref_dir}/${fasta} -i ${normal_recaled_bam} --algo TNhaplotyper --detect_pon --cosmic /cromwell_root/tmp/cosmic/${cosmic_vcf} --dbsnp ${dbsnp_dir}/${dbsnp} ${sample}_pon.vcf
else
touch ${sample}_pon.vcf
fi
mkdir -p /cromwell_root/tmp/cosmic/
cp ${cosmic_dir}/${cosmic_vcf} /cromwell_root/tmp/cosmic/
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/cosmic/${cosmic_vcf}
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -r ${ref_dir}/${fasta} -i ${normal_recaled_bam} --algo TNhaplotyper --detect_pon --cosmic /cromwell_root/tmp/cosmic/${cosmic_vcf} --dbsnp ${dbsnp_dir}/${dbsnp} ${sample}_pon.vcf
>>>
runtime {

+ 14
- 14
tasks/TNscope.wdl Visa fil

@@ -12,16 +12,20 @@ task TNscope {
String cluster_config
String fasta
File corealigner_bam
File corealigner_bam_index
File? corealigner_bam
File? corealigner_bam_index
File tumor_recaled_bam
File tumor_recaled_bam_index
String dbsnp
String disk_size
Boolean PONmode
Boolean set_pon
String? cosmic_vcf
File? cosmic_dir
File panel_of_normal_vcf
File? pon_vcf
String pon_command = if set_pon then "--pon /cromwell_root/tmp/PON/$(basename ${pon_vcf}) --cosmic /cromwell_root/tmp/PON/${cosmic_vcf}" else ""
String input_command = if defined(corealigner_bam) then "-i ${corealigner_bam} --tumor_sample ${tumor_name} --normal_sample ${normal_name}" else "-i ${tumor_recaled_bam} --tumor_sample ${tumor_name}"
command <<<
set -o pipefail
@@ -29,16 +33,12 @@ task TNscope {
export SENTIEON_LICENSE=${SENTIEON_LICENSE}
nt=$(nproc)
if [ ${PONmode} ]; then
mkdir -p /cromwell_root/tmp/cosmic/
cp ${cosmic_dir}/${cosmic_vcf} /cromwell_root/tmp/cosmic/
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/cosmic/${cosmic_vcf}
PONcommand="--pon ${panel_of_normal_vcf} --cosmic /cromwell_root/tmp/cosmic/${cosmic_vcf}"
else
PONcommand=""
fi
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -r ${ref_dir}/${fasta} -i ${corealigner_bam} --algo TNscope --tumor_sample ${tumor_name} --normal_sample ${normal_name} --dbsnp ${dbsnp_dir}/${dbsnp} PONcommand ${sample}.TNscope.TN.vcf
mkdir -p /cromwell_root/tmp/PON/
cp ${cosmic_dir}/${cosmic_vcf} /cromwell_root/tmp/PON/
cp ${pon_vcf} /cromwell_root/tmp/PON/
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/PON/${cosmic_vcf}
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/PON/$(basename ${pon_vcf})
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -r ${ref_dir}/${fasta} --algo TNscope ${input_command} --dbsnp ${dbsnp_dir}/${dbsnp} ${pon_command} ${sample}.TNscope.TN.vcf
>>>

+ 19
- 19
tasks/TNseq.wdl Visa fil

@@ -1,7 +1,7 @@
task TNseq {
File ref_dir
File dbsnp_dir
Array[String] sample
String sample
String SENTIEON_INSTALL_DIR
String SENTIEON_LICENSE
String tumor_name
@@ -10,16 +10,20 @@ task TNseq {
String cluster_config
String fasta
Array[File] corealigner_bam
Array[File] corealigner_bam_index
File? corealigner_bam
File? corealigner_bam_index
File tumor_recaled_bam
File tumor_recaled_bam_index
String dbsnp
String disk_size
Boolean PONmode
Boolean set_pon
String? cosmic_vcf
File? cosmic_dir
File panel_of_normal_vcf
File? pon_vcf
String pon_command = if set_pon then "--pon /cromwell_root/tmp/PON/$(basename ${pon_vcf}) --cosmic /cromwell_root/tmp/PON/${cosmic_vcf}" else ""
String input_command = if defined(corealigner_bam) then "-i ${corealigner_bam} --tumor_sample ${tumor_name} --normal_sample ${normal_name}" else "-i ${tumor_recaled_bam} --tumor_sample ${tumor_name}"
command <<<
set -o pipefail
@@ -27,16 +31,12 @@ task TNseq {
export SENTIEON_LICENSE=${SENTIEON_LICENSE}
nt=$(nproc)
if [ ${PONmode} ]; then
mkdir -p /cromwell_root/tmp/cosmic/
cp ${cosmic_dir}/${cosmic_vcf} /cromwell_root/tmp/cosmic/
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/cosmic/${cosmic_vcf}
PONcommand="--pon ${panel_of_normal_vcf} --cosmic /cromwell_root/tmp/cosmic/${cosmic_vcf}"
else
PONcommand=""
fi
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -r ${ref_dir}/${fasta} -i ${sep=" -i " corealigner_bam} --algo TNhaplotyper --tumor_sample ${tumor_name} --normal_sample ${normal_name} --dbsnp ${dbsnp_dir}/${dbsnp} PONcommand ${sep=" " sample}.TNseq.TN.vcf
mkdir -p /cromwell_root/tmp/PON/
cp ${cosmic_dir}/${cosmic_vcf} /cromwell_root/tmp/PON/
cp ${pon_vcf} /cromwell_root/tmp/PON/
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/PON/${cosmic_vcf}
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/PON/$(basename ${pon_vcf})
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt -r ${ref_dir}/${fasta} --algo TNhaplotyper ${input_command} --dbsnp ${dbsnp_dir}/${dbsnp} ${pon_command} ${sample}.TNseq.TN.vcf
>>>
@@ -48,8 +48,8 @@ task TNseq {
}
output {
File TNseq_vcf= "${sep=" " sample}.TNseq.TN.vcf"
File TNseq_vcf_index = "${sep=" " sample}.TNseq.TN.vcf.idx"
File TNseq_vcf= "${sample}.TNseq.TN.vcf"
File TNseq_vcf_index = "${sample}.TNseq.TN.vcf.idx"
}
}

+ 2
- 2
tasks/bcftools.wdl Visa fil

@@ -4,14 +4,14 @@ task bcftools {
String docker
String cluster_config
String disk_size
Boolean PONmode
Boolean set_pon


command <<<
set -o pipefail
set -e
if [ ${PONmode} ]; then
if [ ${set_pon} ]; then
mkdir -p /cromwell_root/tmp/bcftools/
for i in ${sep=" " pon_vcf}
do

+ 8
- 9
tasks/corealigner.wdl Visa fil

@@ -4,7 +4,7 @@ task corealigner {
File dbsnp_dir
File dbmills_dir
Array[String] sample
String sample
String SENTIEON_INSTALL_DIR
String SENTIEON_LICENSE
String docker
@@ -13,10 +13,10 @@ task corealigner {
String dbsnp
String db_mills
Array[File] tumor_recaled_bam
Array[File] tumor_recaled_bam_index
Array[File] normal_recaled_bam
Array[File] normal_recaled_bam_index
File tumor_recaled_bam
File tumor_recaled_bam_index
File normal_recaled_bam
File normal_recaled_bam_index
String disk_size
@@ -25,8 +25,7 @@ task corealigner {
set -e
export SENTIEON_LICENSE=${SENTIEON_LICENSE}
nt=$(nproc)
#${sep=" " tumor_recaled_bam}
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} -t $nt -i ${sep=" -i " tumor_recaled_bam} -i ${sep=" -i " normal_recaled_bam} --algo Realigner -k ${dbmills_dir}/${db_mills} -k ${dbsnp_dir}/${dbsnp} ${sep=" " sample}_corealigned.bam
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -r ${ref_dir}/${fasta} -t $nt -i ${tumor_recaled_bam} -i ${normal_recaled_bam} --algo Realigner -k ${dbmills_dir}/${db_mills} -k ${dbsnp_dir}/${dbsnp} ${sample}_corealigned.bam
>>>
runtime {
@@ -37,8 +36,8 @@ task corealigner {
}
output {
File corealigner_bam = "${sep=" " sample}_corealigned.bam"
File corealigner_bam_index = "${sep=" " sample}_corealigned.bam.bai"
File corealigner_bam = "${sample}_corealigned.bam"
File corealigner_bam_index = "${sample}_corealigned.bam.bai"
}
}

+ 192
- 194
workflow.wdl Visa fil

@@ -4,27 +4,27 @@ 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/corealigner.wdl" as corealigner
import "./tasks/corealigner.wdl" as corealigner
import "./tasks/PON.wdl" as PON
import "./tasks/bcftools.wdl" as bcftools
#import "./tasks/TNseq.wdl" as TNseq
#import "./tasks/TNscope.wdl" as TNscope
#import "./tasks/annovar.wdl" as annovar
#import "./tasks/vcf2maf.wdl" as vcf2maf
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 }} {

File inputSamplesFile
Array[Array[File]] inputSamples = read_tsv(inputSamplesFile)
#Array[String] sample
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 vcf2maf_r_docker
String bcftools_docker
File ref_dir
String fasta
@@ -33,232 +33,230 @@ workflow {{ project_name }} {
File dbsnp_dir
String dbsnp
File regions
File database
String disk_size
String cluster_config

Boolean PONmode
Boolean set_pon
File? pon_vcf
File? cosmic_dir
String? cosmic_vcf

Boolean set_annovar
File? database
Boolean set_vcf2maf

scatter (sample in inputSamples) {
call mapping.mapping as tumor_mapping {
input:
group=sample[0] + "_tumor",
sample=sample[0] + "_tumor",
fastq_1=sample[1],
fastq_2=sample[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 mapping.mapping as mapping {
input:
group=sample + '_' + type,
sample=sample + '_' + 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 tumor_Metrics {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
sorted_bam=tumor_mapping.sorted_bam,
sorted_bam_index=tumor_mapping.sorted_bam_index,
sample=sample[0] + "_tumor",
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 + '_' + type,
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
}

call Dedup.Dedup as tumor_Dedup {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
sorted_bam=tumor_mapping.sorted_bam,
sorted_bam_index=tumor_mapping.sorted_bam_index,
sample=sample[0] + "_tumor",
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 + '_' + type,
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
}

call deduped_Metrics.deduped_Metrics as tumor_deduped_Metrics {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
Dedup_bam=tumor_Dedup.Dedup_bam,
Dedup_bam_index=tumor_Dedup.Dedup_bam_index,
sample=sample[0] + "_tumor",
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 + '_' + type,
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
}

call Realigner.Realigner as tumor_Realigner {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
Dedup_bam=tumor_Dedup.Dedup_bam,
Dedup_bam_index=tumor_Dedup.Dedup_bam_index,
db_mills=db_mills,
dbmills_dir=dbmills_dir,
sample=sample[0] + "_tumor",
docker=sentieon_docker,
disk_size=disk_size,
regions=regions,
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 + '_' + 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 + '_' + type,
regions=regions,
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
}

call BQSR.BQSR as tumor_BQSR {
if (set_pon && type == "normal") {
call PON.PON as PON {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
sample=sample,
fasta=fasta,
ref_dir=ref_dir,
realigned_bam1=tumor_Realigner.realigner_bam,
realigned_bam_index1=tumor_Realigner.realigner_bam_index,
db_mills=db_mills,
dbmills_dir=dbmills_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,
sample=sample[0] + "_tumor",
regions=regions,
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
}
}

scatter (sample in inputSamples) {
call mapping.mapping as normal_mapping {
input:
group=sample[0] + "_normal",
sample=sample[0] + "_normal",
fastq_1=sample[3],
fastq_2=sample[4],
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 normal_Metrics {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
sorted_bam=normal_mapping.sorted_bam,
sorted_bam_index=normal_mapping.sorted_bam_index,
sample=sample[0] + "_normal",
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
}

call Dedup.Dedup as normal_Dedup {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
sorted_bam=normal_mapping.sorted_bam,
sorted_bam_index=normal_mapping.sorted_bam_index,
sample=sample[0] + "_normal",
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
}

call deduped_Metrics.deduped_Metrics as normal_deduped_Metrics {
if (type == "tumor" && defined(normal_recaled_bam)) {
call corealigner.corealigner as corealigner {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
Dedup_bam=normal_Dedup.Dedup_bam,
Dedup_bam_index=normal_Dedup.Dedup_bam_index,
sample=sample[0] + "_normal",
sample=sample,
docker=sentieon_docker,
disk_size=disk_size,
cluster_config=cluster_config
}

call Realigner.Realigner as normal_Realigner {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
Dedup_bam=normal_Dedup.Dedup_bam,
Dedup_bam_index=normal_Dedup.Dedup_bam_index,
db_mills=db_mills,
dbmills_dir=dbmills_dir,
sample=sample[0] + "_normal",
docker=sentieon_docker,
disk_size=disk_size,
regions=regions,
cluster_config=cluster_config
}

call BQSR.BQSR as normal_BQSR {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
realigned_bam1=normal_Realigner.realigner_bam,
realigned_bam_index1=normal_Realigner.realigner_bam_index,
db_mills=db_mills,
dbmills_dir=dbmills_dir,
dbsnp=dbsnp,
dbsnp_dir=dbsnp_dir,
sample=sample[0] + "_normal",
regions=regions,
docker=sentieon_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,
sample=sample[0],
PONmode=PONmode,
fasta=fasta,
ref_dir=ref_dir,
normal_recaled_bam=normal_BQSR.recaled_bam,
normal_recaled_bam_index=normal_BQSR.recaled_bam_index,
cosmic_vcf=cosmic_vcf,
cosmic_dir=cosmic_dir,
dbsnp=dbsnp,
dbsnp_dir=dbsnp_dir,
docker=sentieon_docker,
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
}
File bam_to_use = corealigner.corealigner_bam
}

call bcftools.bcftools as bcftools {
if (type == "tumor" && !defined(normal_recaled_bam)) {
File bam_to_use = BQSR.recaled_bam
}

#File bam_to_use = select_first([corealigner.corealigner_bam, BQSR.recaled_bam])


call TNseq.TNseq as TNseq {
input:
PONmode=PONmode,
pon_vcf=PON.pon_vcf,
docker=bcftools_docker,
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
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 + "_tumor",
normal_name=sample + "_normal",
docker=sentieon_docker,
sample=sample,
disk_size=disk_size,
cluster_config=cluster_config
}
}
call TNscope.TNscope as TNscope {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
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 + "_tumor",
normal_name=sample + "_normal",
docker=sentieon_docker,
sample=sample,
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_file=TNscope.TNscope_vcf,
tnseq_vcf_file=TNseq.TNseq_vcf,
sample=sample,
cluster_config=cluster_config,
disk_size=disk_size
}

if (set_vcf2maf){
call vcf2maf.vcf2maf as vcf2maf {
input:
docker=vcf2maf_r_docker,
multianno_tnscope_txt=annovar.multianno_tnscope_txt,
multianno_tnseq_txt=annovar.multianno_tnseq_txt,
sample=sample,
cluster_config=cluster_config,
disk_size=disk_size
}
}
}
}

Laddar…
Avbryt
Spara