From 9e26c165501ced20e62cb46c1a432b1e73822a38 Mon Sep 17 00:00:00 2001 From: fa8sanger Date: Tue, 2 Apr 2024 12:04:59 +0100 Subject: [PATCH] Update indelCaller_step2.pl - minor fix for mitochondrial genome (circular chr). If start <= 0 set it to 1 --- perl/indelCaller_step2.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/perl/indelCaller_step2.pl b/perl/indelCaller_step2.pl index 377df21..c317ffb 100755 --- a/perl/indelCaller_step2.pl +++ b/perl/indelCaller_step2.pl @@ -212,6 +212,9 @@ sub runCmd { print STDOUT "Step 3...\n"; #`samtools mpileup --no-BAQ -d 250 -m 2 -F 0.5 -r $chr:$start-$end --BCF --output-tags DP,DV,DP4,SP -f $ref_genome -o $tempdir/$out_name.bcf $tempdir/$out_name.tmp.bam`; + if($start <= 0) { + $start = 1; + } &runCmd("bcftools mpileup --no-BAQ -L 250 -m 2 -F 0.5 -r \"$chr:$start-$end\" -O b -a DP,DV,DP4,SP -f $ref_genome -o $tempdir/$out_name.bcf $tempdir/$out_name.tmp.bam"); print STDOUT "Step 4...\n";