code: public static int trim(SequenceQuality quality,
                             int leftmostPosition, int rightmostPosition, int scanIncrement,
                             boolean searchForRise,
                             QualityTrimmerParameters parameters) {
          return trim(quality, leftmostPosition, rightmostPosition, scanIncrement, searchForRise, parameters.getAverageQualityThreshold(), parameters.getWindowSize());
      }
docs: Core trimming method. Implements main algorithm that finds optimal trimming position.
  
  @param quality           sequence quality
  @param leftmostPosition  scanning region from, inclusive
  @param rightmostPosition scanning region to, exclusive
  @param scanIncrement     +1 to scan to the right (trim on the left side of the sequence);
  -1 to scan to the left (trim on the right side of the sequence)
  @param searchForRise     search mode; if true - searches for beginning of a "good quality region"
  (e.g. useful for trimming of sequencing reads from sides);
  if false - searches for the end of "good quality regions"
  (e.g. useful to trim-off low quality leftovers from assembled contig)
  @param parameters        trimming parameters
  @return trimming position if search was successful (last position of the region) or
  (-2 - trimming position) if search was unsuccessful