]> git.donarmstrong.com Git - biopieces.git/blobdiff - code_perl/Maasha/BGB/Track.pm
fixed speed issue with track_ruler in BGB
[biopieces.git] / code_perl / Maasha / BGB / Track.pm
index 15e2ba554d73f29d76abd59e2d4aa6f2e8f732e9..a21fa4e416b3d090936b57ac9dc24861a7491fc3 100644 (file)
@@ -116,8 +116,10 @@ sub track_ruler
         $step *= 5;
     }
 
-    for ( $i = $beg; $i < $end; $i++ ) {   # TODO: this loop is slow!
-        last if ( ( $i % $step ) == 0 );
+    $i = 0;
+
+    while ( $i <= $beg ) {
+        $i += $step;
     }
 
     while ( $i < $end )