code: public static Range[] scoresToRanges(float[] scores, float probability)  {
  		assert scores!=null && scores.length>0;
  		assert probability>0 && probability<1;
  
  		int count=0;
  		int regionLen=0;
  		List<Range> ranges = new ArrayList<Range>();
  		for(float score: scores) {
  			count++;
  			// Round to 2 decimal points before comparison
  			score = (float) (Math.round(score*100.0)/100.0);
  			if(score>probability) {
  				regionLen++;
  			} else {
  				if(regionLen>0) {
  					ranges.add(new Range(count-regionLen, count-1,score));
  				}
  				regionLen=0;
  			}
  		}
  		// In case of the range to boundary runs to the very end of the sequence
  		if(regionLen>1) {
  			ranges.add(new Range(count-regionLen+1, count,scores[scores.length-1]));
  		}
  		return ranges.toArray(new Range[ranges.size()]);
  
  	}
docs: Convert raw scores to ranges. Gives ranges for given probability of disorder value
  @param scores the raw probability of disorder scores for each residue in the sequence.
  @param probability the cut off threshold. Include all residues with the probability of disorder greater then this value
  @return the array of ranges if there are any residues predicted to have the
  probability of disorder greater then {@code probability}, null otherwise.