public static String generateScaleMarkers(int proteinLength,int maxNumScaleMarkers){
  if (maxNumScaleMarkers < 2) {
    maxNumScaleMarkers=2;
  }
  int scale=calcScale(proteinLength,maxNumScaleMarkers);
  StringBuilder sb=new StringBuilder("0");
  int index=0;
  int numRemaining=proteinLength;
  while (index <= proteinLength) {
    index+=scale;
    numRemaining-=scale;
    sb.append(",");
    if ((numRemaining > 0) && (numRemaining < scale)) {
      if (numRemaining < (scale / 2)) {
        sb.append(proteinLength);
        break;
      }
    }
    if (index >= proteinLength) {
      sb.append(proteinLength);
    }
 else {
      sb.append(index);
    }
  }
  return sb.toString();
}

public static String generateScaleMarkers ( int proteinLength , int maxNumScaleMarkers ) { if ( maxNumScaleMarkers < 2 ) { maxNumScaleMarkers = 2 ; } int scale = calcScale ( proteinLength , maxNumScaleMarkers ) ; StringBuilder sb = new StringBuilder ( "0" ) ; int index = 0 ; int numRemaining = proteinLength ; while ( index <= proteinLength ) { index += scale ; numRemaining -= scale ; sb . append ( "," ) ; if ( ( numRemaining > 0 ) && ( numRemaining < scale ) ) { if ( numRemaining < ( scale / 2 ) ) { sb . append ( proteinLength ) ; break ; } } if ( index >= proteinLength ) { sb . append ( proteinLength ) ; } else { sb . append ( index ) ; } } return sb . toString ( ) ; }
generate a string of comma - separated numbers that will be used to mark the scale of the match diagram .
