]> git.donarmstrong.com Git - samtools.git/commitdiff
a little bit code cleanup
authorHeng Li <lh3@live.co.uk>
Mon, 8 Jun 2009 13:32:51 +0000 (13:32 +0000)
committerHeng Li <lh3@live.co.uk>
Mon, 8 Jun 2009 13:32:51 +0000 (13:32 +0000)
misc/samtools.pl

index c224616f7f2725ca3887e88c80a718ea63b541b1..497b128d7fc3fd55edfe4f9c8335c94d83e5dd29 100755 (executable)
@@ -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