Skip to content

Commit eeebfd7

Browse files
author
Cao
committed
add vcf check to see if a run is succesful for strelka, varscan, and pindel
1 parent 5517347 commit eeebfd7

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

somaticwrapper.pl

+14-2
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,8 @@ sub bsub_strelka{
478478
print STREKA "SG_DIR=".$sample_full_path."/strelka\n";
479479
print STREKA "RUNDIR=".$sample_full_path."\n";
480480
print STREKA "STRELKA_OUT=".$sample_full_path."/strelka/strelka_out"."\n";
481-
print STREKA "STRELKA_VCF=".$sample_full_path."/strelka/strelka_out/results/passed.somatic.snvs.vcf"."\n";
481+
print STREKA "STRELKA_VCF=".$sample_full_path."/strelka/strelka_out/results/somatic.snvs.vcf.gz"."\n";
482+
#print STREKA "STRELKA_VCF=".$sample_full_path."/strelka/strelka_out/results/passed.somatic.snvs.vcf"."\n";
482483
#print STREKA "CONFDIR="."/gscmnt/gc2521/dinglab/cptac_prospective_samples/exome/config\n";
483484
print STREKA "TASK_STATUS=".$sample_full_path."/strelka/strelka_out/task.complete"."\n";
484485
print STREKA "export SAMTOOLS_DIR=$samtools\n";
@@ -494,7 +495,7 @@ sub bsub_strelka{
494495
print STREKA " then\n";
495496
print STREKA "rm \${TASK_STATUS}\n";
496497
print STREKA "fi\n";
497-
498+
## if STRELKA_VCF not existed
498499
print STREKA "if [ ! -f \${STRELKA_VCF} ]\n";
499500
print STREKA " then\n";
500501
print STREKA "rm \${TASK_STATUS}\n";
@@ -624,6 +625,7 @@ sub bsub_varscan{
624625
print VARSCAN "del_local=\"rm -f\"\n";
625626
print VARSCAN "statfile=complete.vs_som_snvindels\n";
626627
print VARSCAN "localstatus=\${myRUNDIR}\/status\/\${statfile}\n";
628+
print VARSCAN "varscan_vcf=\${myRUNDIR}\/varscan.out.som_snv.vcf\n";
627629
print VARSCAN "if [ ! -d \${myRUNDIR}\/status ]\n";
628630
print VARSCAN "then\n";
629631
print VARSCAN "mkdir \${myRUNDIR}\/status\n";
@@ -633,6 +635,11 @@ sub bsub_varscan{
633635
print VARSCAN " then\n";
634636
print VARSCAN "rm \${localstatus}\n";
635637
print VARSCAN "fi\n";
638+
# check if vcf file exists
639+
print VARSCAN "if [ ! -f \${varscan_vcf} ]\n";
640+
print VARSCAN " then\n";
641+
print VARSCAN "rm \${localstatus}\n";
642+
print VARSCAN "fi\n";
636643
print VARSCAN "if [ ! -f \${localstatus} ]\n";
637644
print VARSCAN "then\n";
638645
print VARSCAN "cd \${RUNDIR}/varscan\n";
@@ -974,6 +981,7 @@ sub bsub_pindel{
974981
print PINDEL "CONFIG=\${myRUNDIR}"."/".$sample_name.".config\n";
975982
print PINDEL "statfile=complete.pindel\n";
976983
print PINDEL "localstatus=\${myRUNDIR}\/status\/\${statfile}\n";
984+
print PINDEL "pindel_vcf=\${myRUNDIR}\/".$sample_name."_D\n";
977985
print PINDEL "if [ ! -d \${myRUNDIR} ]\n";
978986
print PINDEL "then\n";
979987
print PINDEL "mkdir \${myRUNDIR}\n";
@@ -986,6 +994,10 @@ sub bsub_pindel{
986994
print PINDEL " then\n";
987995
print PINDEL "rm \${localstatus}\n";
988996
print PINDEL "fi\n";
997+
print PINDEL "if [ ! -f \${pindel_vcf} ]\n";
998+
print PINDEL " then\n";
999+
print PINDEL "rm \${localstatus}\n";
1000+
print PINDEL "fi\n";
9891001
print PINDEL "if [ ! -f \${localstatus} ]\n";
9901002
print PINDEL "then\n";
9911003
print PINDEL "echo \"$IN_bam_T\t500\t$sample_name.T\" > \${CONFIG}\n";

0 commit comments

Comments
 (0)