"varscan": false, | "varscan": false, | ||||
"annovar": false, | "annovar": false, | ||||
"vep": false, | "vep": false, | ||||
"only_pass": true, | |||||
"input_fastq": false, | "input_fastq": false, | ||||
"input_bam": false | "input_bam": false | ||||
} | } |
"{{ project_name }}.tnscope": {{ tnscope | tojson }}, | "{{ project_name }}.tnscope": {{ tnscope | tojson }}, | ||||
"{{ project_name }}.varscan": {{ varscan | tojson }}, | "{{ project_name }}.varscan": {{ varscan | tojson }}, | ||||
"{{ project_name }}.annovar": {{ annovar | tojson }}, | "{{ project_name }}.annovar": {{ annovar | tojson }}, | ||||
"{{ project_name }}.only_pass": {{ only_pass | tojson }}, | |||||
"{{ project_name }}.vep": {{ vep | tojson }}, | "{{ project_name }}.vep": {{ vep | tojson }}, | ||||
"{{ project_name }}.input_fastq": {{ input_fastq | tojson }}, | "{{ project_name }}.input_fastq": {{ input_fastq | tojson }}, | ||||
"{{ project_name }}.input_bam": {{ input_bam | tojson }} | "{{ project_name }}.input_bam": {{ input_bam | tojson }} |
String basename = basename(vcf,".vcf") | String basename = basename(vcf,".vcf") | ||||
String hg | String hg | ||||
File annovar_database | File annovar_database | ||||
Boolean only_pass | |||||
String docker | String docker | ||||
String cluster_config | String cluster_config | ||||
String disk_size | String disk_size | ||||
set -e | set -e | ||||
nt=$(nproc) | nt=$(nproc) | ||||
if [ only_pass ]; then | |||||
awk -F'\t' '{if(($1~"^#")||($1!~"^#" && $7=="PASS")){print $0}}' ${vcf} > INPUT.vcf | |||||
else | |||||
cp ${vcf} INPUT.vcf | |||||
fi | |||||
if [ ${hg} == "hg38" ]; then | if [ ${hg} == "hg38" ]; then | ||||
/installations/annovar/table_annovar.pl ${basename}.PASS.vcf \ | |||||
/installations/annovar/table_annovar.pl ${vcf} \ | |||||
${annovar_database} -buildver ${hg} \ | ${annovar_database} -buildver ${hg} \ | ||||
-out ${basename} -remove \ | -out ${basename} -remove \ | ||||
-protocol refGene,ensGene,knownGene,rmsk,cytoBand,genomicSuperDups,esp6500siv2_all,ALL.sites.2015_08,AFR.sites.2015_08,AMR.sites.2015_08,EAS.sites.2015_08,EUR.sites.2015_08,SAS.sites.2015_08,avsnp147,dbnsfp33a,clinvar_20210501,gnomad_genome,dbscsnv11,dbnsfp31a_interpro \ | -protocol refGene,ensGene,knownGene,rmsk,cytoBand,genomicSuperDups,esp6500siv2_all,ALL.sites.2015_08,AFR.sites.2015_08,AMR.sites.2015_08,EAS.sites.2015_08,EUR.sites.2015_08,SAS.sites.2015_08,avsnp147,dbnsfp33a,clinvar_20210501,gnomad_genome,dbscsnv11,dbnsfp31a_interpro \ | ||||
fi | fi | ||||
if [ ${hg} == "hg19" ]; then | if [ ${hg} == "hg19" ]; then | ||||
/installations/annovar/table_annovar.pl ${basename}.PASS.vcf \ | |||||
/installations/annovar/table_annovar.pl ${vcf} \ | |||||
${annovar_database} -buildver ${hg} \ | ${annovar_database} -buildver ${hg} \ | ||||
-out ${basename} -remove \ | -out ${basename} -remove \ | ||||
-protocol refGene,cytoBand,genomicSuperDups,ljb26_all,snp138,cosmic78,intervar_20170202,popfreq_all_20150413,clinvar_20190305 \ | -protocol refGene,cytoBand,genomicSuperDups,ljb26_all,snp138,cosmic78,intervar_20170202,popfreq_all_20150413,clinvar_20190305 \ |
--dbsnp ${dbsnp_dir}/${dbsnp} \ | --dbsnp ${dbsnp_dir}/${dbsnp} \ | ||||
$PON \ | $PON \ | ||||
${sample}.TNscope.vcf | ${sample}.TNscope.vcf | ||||
awk -F'\t' '{if(($1~"^#")||($1!~"^#" && $7=="PASS")){print $0}}' ${sample}.TNscope.vcf > ${sample}.TNscope.PASS.vcf | |||||
>>> | >>> | ||||
runtime { | runtime { | ||||
} | } | ||||
output { | output { | ||||
File TNscope_pass_vcf="${sample}.TNscope.PASS.vcf" | |||||
File TNscope_vcf= "${sample}.TNscope.vcf" | File TNscope_vcf= "${sample}.TNscope.vcf" | ||||
File TNscope_vcf_index = "${sample}.TNscope.vcf.idx" | File TNscope_vcf_index = "${sample}.TNscope.vcf.idx" | ||||
} | } |
--tumor_segments ${sample}.contamination.segments \ | --tumor_segments ${sample}.contamination.segments \ | ||||
--orientation_priors ${sample}.orientation \ | --orientation_priors ${sample}.orientation \ | ||||
${sample}.TNseq.filter.vcf | ${sample}.TNseq.filter.vcf | ||||
awk -F'\t' '{if(($1~"^#")||($1!~"^#" && $7=="PASS")){print $0}}' ${sample}.TNseq.filter.vcf > ${sample}.TNseq.filter.PASS.vcf | |||||
>>> | >>> | ||||
runtime { | runtime { | ||||
} | } | ||||
output { | output { | ||||
File TNseq_pass_vcf='${sample}.TNseq.filter.PASS.vcf' | |||||
File TNseq_filter_vcf='${sample}.TNseq.filter.vcf' | File TNseq_filter_vcf='${sample}.TNseq.filter.vcf' | ||||
File TNseq_filter_vcf_index = "${sample}.TNseq.filter.vcf.idx" | File TNseq_filter_vcf_index = "${sample}.TNseq.filter.vcf.idx" | ||||
File TNseq_vcf = "${sample}.TNseq.vcf" | File TNseq_vcf = "${sample}.TNseq.vcf" |
set -e | set -e | ||||
nt=$(nproc) | nt=$(nproc) | ||||
if [ only_pass ]; then | |||||
awk -F'\t' '{if(($1~"^#")||($1!~"^#" && $7=="PASS")){print $0}}' ${vcf} > ${sample_id}.INPUT.vcf | |||||
else | |||||
cp ${vcf} ${sample_id}.INPUT.vcf | |||||
fi | |||||
# Define ncbi_build | # Define ncbi_build | ||||
if [ hg == "hg19" ]; then | if [ hg == "hg19" ]; then | ||||
ncbi_build="GRCh37" | ncbi_build="GRCh37" | ||||
fi | fi | ||||
# Extract the BND variants from VCF | # Extract the BND variants from VCF | ||||
awk -F'\t' '{if(($1~"^#")||($8!~".*SVTYPE=BND.*")){print $0}}' ${sample_id}.INPUT.vcf > ${sample_id}.INPUT.vcf2maf.vcf | |||||
awk -F'\t' '{if(($1~"^#")||($8~".*SVTYPE=BND.*")){print $0}}' ${sample_id}.INPUT.vcf > ${sample_id}.INPUT.VEP.vcf | |||||
awk -F'\t' '{if(($1~"^#")||($8!~".*SVTYPE=BND.*")){print $0}}' ${vcf} > ${sample_id}.INPUT.vcf2maf.vcf | |||||
awk -F'\t' '{if(($1~"^#")||($8~".*SVTYPE=BND.*")){print $0}}' ${vcf} > ${sample_id}.INPUT.VEP.vcf | |||||
# vcf2maf | # vcf2maf | ||||
perl ${vcf2maf_path}/vcf2maf.pl \ | perl ${vcf2maf_path}/vcf2maf.pl \ | ||||
} | } | ||||
output { | output { | ||||
File input_vcf = "${sample_id}.INPUT.vcf" | |||||
File maf = "${basename}.${hg}.maf" | File maf = "${basename}.${hg}.maf" | ||||
File bnd_vep = "${basename}.BND.VEP.txt" | File bnd_vep = "${basename}.BND.VEP.txt" | ||||
} | } |
Boolean annovar | Boolean annovar | ||||
Boolean vep | Boolean vep | ||||
Boolean only_pass | |||||
if (input_fastq) { | if (input_fastq) { | ||||
if (tumor_fastq_1!= "") { | if (tumor_fastq_1!= "") { | ||||
if (annovar) { | if (annovar) { | ||||
call ANNOVAR.ANNOVAR as TNseq_annovar { | call ANNOVAR.ANNOVAR as TNseq_annovar { | ||||
input: | input: | ||||
vcf=TNseq.TNseq_filter_vcf, | |||||
vcf=TNseq.TNseq_pass_vcf, | |||||
hg=hg, | hg=hg, | ||||
only_pass=only_pass, | |||||
annovar_database=annovar_database, | annovar_database=annovar_database, | ||||
docker=annovar_docker, | docker=annovar_docker, | ||||
cluster_config=cluster_config, | cluster_config=cluster_config, | ||||
if (vep) { | if (vep) { | ||||
call VEP.VEP as TNseq_VEP { | call VEP.VEP as TNseq_VEP { | ||||
input: | input: | ||||
vcf=TNseq.TNseq_filter_vcf, | |||||
vcf=TNseq.TNseq_pass_vcf, | |||||
hg=hg, | hg=hg, | ||||
only_pass=only_pass, | |||||
sample_id=sample_id, | sample_id=sample_id, | ||||
tumor_id=sample_id + ".T", | tumor_id=sample_id + ".T", | ||||
normal_id=sample_id + ".N", | normal_id=sample_id + ".N", | ||||
if (annovar) { | if (annovar) { | ||||
call ANNOVAR.ANNOVAR as TNscope_annovar { | call ANNOVAR.ANNOVAR as TNscope_annovar { | ||||
input: | input: | ||||
vcf=TNscope.TNscope_vcf, | |||||
vcf=TNscope.TNscope_pass_vcf, | |||||
hg=hg, | hg=hg, | ||||
only_pass=only_pass, | |||||
annovar_database=annovar_database, | annovar_database=annovar_database, | ||||
docker=annovar_docker, | docker=annovar_docker, | ||||
cluster_config=cluster_config, | cluster_config=cluster_config, | ||||
if (vep) { | if (vep) { | ||||
call VEP.VEP as TNscope_VEP { | call VEP.VEP as TNscope_VEP { | ||||
input: | input: | ||||
vcf=TNscope.TNscope_vcf, | |||||
vcf=TNscope.TNscope_pass_vcf, | |||||
hg=hg, | hg=hg, | ||||
only_pass=only_pass, | |||||
sample_id=sample_id, | sample_id=sample_id, | ||||
tumor_id=sample_id + ".T", | tumor_id=sample_id + ".T", | ||||
normal_id=sample_id + ".N", | normal_id=sample_id + ".N", | ||||
input: | input: | ||||
vcf=somaticFilter.varscan_somatic_filter, | vcf=somaticFilter.varscan_somatic_filter, | ||||
hg=hg, | hg=hg, | ||||
only_pass=only_pass, | |||||
annovar_database=annovar_database, | annovar_database=annovar_database, | ||||
docker=annovar_docker, | docker=annovar_docker, | ||||
cluster_config=cluster_config, | cluster_config=cluster_config, | ||||
input: | input: | ||||
vcf=somaticFilter.varscan_somatic_filter, | vcf=somaticFilter.varscan_somatic_filter, | ||||
hg=hg, | hg=hg, | ||||
only_pass=only_pass, | |||||
sample_id=sample_id, | sample_id=sample_id, | ||||
tumor_id=sample_id + ".T", | tumor_id=sample_id + ".T", | ||||
normal_id=sample_id + ".N", | normal_id=sample_id + ".N", | ||||
if (annovar) { | if (annovar) { | ||||
call ANNOVAR.ANNOVAR as TNseq_annovar_fb { | call ANNOVAR.ANNOVAR as TNseq_annovar_fb { | ||||
input: | input: | ||||
vcf=TNseq_fb.TNseq_filter_vcf, | |||||
vcf=TNseq_fb.TNseq_pass_vcf, | |||||
hg=hg, | hg=hg, | ||||
only_pass=only_pass, | |||||
annovar_database=annovar_database, | annovar_database=annovar_database, | ||||
docker=annovar_docker, | docker=annovar_docker, | ||||
cluster_config=cluster_config, | cluster_config=cluster_config, | ||||
if (vep) { | if (vep) { | ||||
call VEP.VEP as TNseq_VEP_fb { | call VEP.VEP as TNseq_VEP_fb { | ||||
input: | input: | ||||
vcf=TNseq_fb.TNseq_filter_vcf, | |||||
vcf=TNseq_fb.TNseq_pass_vcf, | |||||
hg=hg, | hg=hg, | ||||
only_pass=only_pass, | |||||
sample_id=sample_id, | sample_id=sample_id, | ||||
tumor_id=sample_id + ".T", | tumor_id=sample_id + ".T", | ||||
normal_id=sample_id + ".N", | normal_id=sample_id + ".N", | ||||
if (annovar) { | if (annovar) { | ||||
call ANNOVAR.ANNOVAR as TNscope_annovar_fb { | call ANNOVAR.ANNOVAR as TNscope_annovar_fb { | ||||
input: | input: | ||||
vcf=TNscope_fb.TNscope_vcf, | |||||
vcf=TNscope_fb.TNscope_pass_vcf, | |||||
hg=hg, | hg=hg, | ||||
only_pass=only_pass, | |||||
annovar_database=annovar_database, | annovar_database=annovar_database, | ||||
docker=annovar_docker, | docker=annovar_docker, | ||||
cluster_config=cluster_config, | cluster_config=cluster_config, | ||||
if (vep) { | if (vep) { | ||||
call VEP.VEP as TNscope_VEP_fb { | call VEP.VEP as TNscope_VEP_fb { | ||||
input: | input: | ||||
vcf=TNscope_fb.TNscope_vcf, | |||||
vcf=TNscope_fb.TNscope_pass_vcf, | |||||
hg=hg, | hg=hg, | ||||
only_pass=only_pass, | |||||
sample_id=sample_id, | sample_id=sample_id, | ||||
tumor_id=sample_id + ".T", | tumor_id=sample_id + ".T", | ||||
normal_id=sample_id + ".N", | normal_id=sample_id + ".N", | ||||
input: | input: | ||||
vcf=somaticFilter_fb.varscan_somatic_filter, | vcf=somaticFilter_fb.varscan_somatic_filter, | ||||
hg=hg, | hg=hg, | ||||
only_pass=only_pass, | |||||
annovar_database=annovar_database, | annovar_database=annovar_database, | ||||
docker=annovar_docker, | docker=annovar_docker, | ||||
cluster_config=cluster_config, | cluster_config=cluster_config, | ||||
input: | input: | ||||
vcf=somaticFilter_fb.varscan_somatic_filter, | vcf=somaticFilter_fb.varscan_somatic_filter, | ||||
hg=hg, | hg=hg, | ||||
only_pass=only_pass, | |||||
sample_id=sample_id, | sample_id=sample_id, | ||||
tumor_id=sample_id + ".T", | tumor_id=sample_id + ".T", | ||||
normal_id=sample_id + ".N", | normal_id=sample_id + ".N", |