瀏覽代碼

Update: TNscope.wdl

tags/v0.1.2
YaqingLiu 4 年之前
父節點
當前提交
0c11f3af3f
共有 3 個檔案被更改,包括 90 行新增75 行删除
  1. +73
    -56
      tasks/TNscope.wdl
  2. +9
    -9
      tasks/TNseq.wdl
  3. +8
    -10
      workflow.wdl

+ 73
- 56
tasks/TNscope.wdl 查看文件

@@ -1,60 +1,77 @@
task TNscope {
File ref_dir
File dbsnp_dir
File? regions
String sample
String SENTIEON_INSTALL_DIR
String SENTIEON_LICENSE
String tumor_name
String normal_name
String docker
String cluster_config
String fasta
File corealigner_bam
File corealigner_bam_index
String dbsnp
String disk_size
Boolean set_pon
String? cosmic_vcf
File? cosmic_dir
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 ""
command <<<
set -o pipefail
set -e
export SENTIEON_LICENSE=${SENTIEON_LICENSE}
nt=$(nproc)
if ${set_pon}; then
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})
fi
if [ ${regions} != "" ]; then
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --interval ${regions} -r ${ref_dir}/${fasta} -i ${corealigner_bam} --algo TNscope --tumor_sample ${tumor_name} --normal_sample ${normal_name} --dbsnp ${dbsnp_dir}/${dbsnp} ${pon_command} ${sample}.TNscope.TN.vcf
else
${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} ${pon_command} ${sample}.TNscope.TN.vcf
fi
>>>
runtime {
docker: docker
cluster: cluster_config
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
}
output {
File TNscope_vcf= "${sample}.TNscope.TN.vcf"
File TNscope_vcf_index = "${sample}.TNscope.TN.vcf.idx"
}
String sample
String SENTIEON_INSTALL_DIR
String SENTIEON_LICENSE
File tumor_recaled_bam
File tumor_recaled_bam_index
File tumor_recal_table
File normal_recaled_bam
File normal_recaled_bam_index
File normal_recal_table
String tumor_name
String normal_name
File ref_dir
String fasta
File dbsnp_dir
String dbsnp
File? regions
String docker
String cluster_config
String disk_size
Boolean set_pon
File? pon_vcf
String pon_command = if set_pon then "--pon /cromwell_root/tmp/PON/$(basename ${pon_vcf})" else ""
command <<<
set -o pipefail
set -e
export SENTIEON_LICENSE=${SENTIEON_LICENSE}
nt=$(nproc)
if ${set_pon}; then
mkdir -p /cromwell_root/tmp/PON/
cp ${pon_vcf} /cromwell_root/tmp/PON/
${SENTIEON_INSTALL_DIR}/bin/sentieon util vcfindex /cromwell_root/tmp/PON/$(basename ${pon_vcf})
fi
if [ ${regions} != "" ]; then
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt \
--interval ${regions} -r ${ref_dir}/${fasta} \
-i ${tumor_recaled_bam} -q ${tumor_recal_table} \
-i ${normal_recaled_bam} -q ${normal_recal_table} \
--algo TNscope \
--tumor_sample ${tumor_name} --normal_sample ${normal_name} \
--dbsnp ${dbsnp_dir}/${dbsnp} \
${pon_command} \
${sample}.TNscope.TN.vcf
else
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt \
-r ${ref_dir}/${fasta} \
-i ${tumor_recaled_bam} -q ${tumor_recal_table} \
-i ${normal_recaled_bam} -q ${normal_recal_table} \
--algo TNscope \
--tumor_sample ${tumor_name} --normal_sample ${normal_name} \
--dbsnp ${dbsnp_dir}/${dbsnp} \
${pon_command} \
${sample}.TNscope.TN.vcf
fi
>>>
runtime {
docker: docker
cluster: cluster_config
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
}
output {
File TNscope_vcf= "${sample}.TNscope.TN.vcf"
File TNscope_vcf_index = "${sample}.TNscope.TN.vcf.idx"
}
}

+ 9
- 9
tasks/TNseq.wdl 查看文件

@@ -17,7 +17,7 @@ task TNseq {
File normal_recaled_bam
File normal_recaled_bam_index
File normal_recal_table
File TNhaplotyper2_PoN
File TNseq_PoN
String dbsnp
String disk_size
File regions
@@ -28,17 +28,17 @@ task TNseq {
export SENTIEON_LICENSE=${SENTIEON_LICENSE}
nt=$(nproc)

${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --interval ${regions} -r ${ref_dir}/${fasta} -i ${corealigner_bam} --algo TNhaplotyper2 --tumor_sample ${tumor_name} --normal_sample ${normal_name} --dbsnp ${dbsnp_dir}/${dbsnp} ${sample}.TNhaplotyper2.TN.vcf
${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --interval ${regions} -r ${ref_dir}/${fasta} -i ${corealigner_bam} --algo TNhaplotyper2 --tumor_sample ${tumor_name} --normal_sample ${normal_name} --dbsnp ${dbsnp_dir}/${dbsnp} ${sample}.TNseq.TN.vcf


${SENTIEON_INSTALL_DIR}/bin/sentieon driver -t $nt --interval ${regions} -r ${ref_dir}/${fasta} \
-i ${tumor_recaled_bam} -q ${tumor_recal_table} \
-i ${normal_recaled_bam} -q ${normal_recal_table} \
--algo TNhaplotyper2 --tumor_sample ${tumor_name} \
--algo TNseq --tumor_sample ${tumor_name} \
--normal_sample ${normal_name} \
--germline_vcf ${germline_resource} \
--pon ${TNhaplotyper2_PoN} \
${sample}.TNhaplotyper2.TN.tmp.vcf \
--pon ${TNseq_PoN} \
${sample}.TNseq.TN.tmp.vcf \
--algo OrientationBias --tumor_sample ${tumor_name} \
ORIENTATION_DATA \
--algo ContaminationModel --tumor_sample ${tumor_name} \
@@ -50,11 +50,11 @@ task TNseq {
sentieon driver -r REFERENCE \
--algo TNfilter --tumor_sample ${tumor_name} \
--normal_sample ${normal_name} \
-v ${sample}.TNhaplotyper2.TN.tmp.vcf \
-v ${sample}.TNseq.TN.tmp.vcf \
--contamination CONTAMINATION_DATA \
--tumor_segments CONTAMINATION_DATA.segments \
--orientation_priors ORIENTATION_DATA \
${sample}.TNhaplotyper2.TN.vcf
${sample}.TNseq.TN.vcf
>>>

runtime {
@@ -65,8 +65,8 @@ task TNseq {
}

output {
File TNhaplotyper2_vcf= "${sample}.TNhaplotyper2.TN.vcf"
File TNhaplotyper2_vcf_index = "${sample}.TNhaplotyper2.TN.vcf.idx"
File TNseq_vcf= "${sample}.TNseq.TN.vcf"
File TNseq_vcf_index = "${sample}.TNseq.TN.vcf.idx"
}

}

+ 8
- 10
workflow.wdl 查看文件

@@ -261,27 +261,25 @@ workflow {{ project_name }} {
input:
SENTIEON_INSTALL_DIR=SENTIEON_INSTALL_DIR,
SENTIEON_LICENSE=SENTIEON_LICENSE,
fasta=fasta,
ref_dir=ref_dir,
regions=regions,
sample=sample_id,
normal_recaled_bam=normal_BQSR.recaled_bam,
normal_recaled_bam_index=normal_BQSR.recaled_bam_index,
normal_recal_table=normal_BQSR.recal_table,
tumor_recaled_bam=tumor_BQSR.recaled_bam,
tumor_recaled_bam_index=tumor_BQSR.recaled_bam_index,
tumor_recal_table=tumor_BQSR.recal_table,
normal_name=sample_id + "_normal",
tumor_name=sample_id + "_tumor",
fasta=fasta,
ref_dir=ref_dir,
regions=regions,
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
cluster_config=cluster_config,
disk_size=disk_size
}

call annovar.annovar as TNseq_annovar {

Loading…
取消
儲存