From 6bc66a0c7f48de85749b990472c5a883ad7c52b6 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Mon, 8 Jun 2009 13:32:51 +0000 Subject: [PATCH] a little bit code cleanup --- misc/samtools.pl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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 -- 2.39.2