public static int modulateCircularIndex ( int index , int seqLength ) { // Dummy case if ( seqLength == 0 ) { return index ; } // Modulate while ( index > seqLength ) { index -= seqLength ; } return index ; }
Takes a point on a circular location and moves it left until it falls at the earliest possible point that represents the same base .