From: Heng Li Date: Mon, 8 Jun 2009 13:32:51 +0000 (+0000) Subject: a little bit code cleanup X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6bc66a0c7f48de85749b990472c5a883ad7c52b6;p=samtools.git a little bit code cleanup --- diff --git a/misc/samtools.pl b/misc/samtools.pl index c224616..497b128 100755 --- a/misc/samtools.pl +++ b/misc/samtools.pl @@ -67,11 +67,8 @@ Options: -Q INT minimum RMS mapping quality [$opts{Q}] next if ($t[2] eq $t[3] || $t[3] eq '*/*'); # skip non-var sites # clear the out-of-range elements while (@staging) { - if ($staging[0][2] ne $t[0] || $staging[0][3] + $max_dist < $t[1]) { - varFilter_aux(shift @staging, $opts{p}); - } else { - last; - } + last if ($staging[0][2] eq $t[0] && $staging[0][3] + $max_dist >= $t[1]); + varFilter_aux(shift(@staging), $opts{p}); # calling a function is a bit slower, not much } my ($flt, $score) = (0, -1); # first a simple filter