code: public static String getTrimmedNucleotideSequence(PolymerNotation polymer)
  			throws RNAUtilsException, HELM2HandledException, ChemistryException {
  		checkRNA(polymer);
  		List<Nucleotide> list = getNucleotideList(polymer);
  
  		int start = 0;
  		Nucleotide na = list.get(start);
  		while (null == na.getBaseMonomer()) {
  			start++;
  			na = list.get(start);
  		}
  
  		int end = list.size() - 1;
  		na = list.get(end);
  		while (null == na.getBaseMonomer()) {
  			end--;
  			na = list.get(end);
  		}
  
  		StringBuffer sb = new StringBuffer();
  		for (int i = start; i <= end; i++) {
  			sb.append(list.get(i).getNaturalAnalog());
  		}
  		return sb.toString();
  	}
docs: method to get the trimmed nucleotide sequence
  
  @param polymer given rna/dna polymer
  @return trimmed nucleotide sequence
  @throws RNAUtilsException if the polymer is not a RNA/DNA
  @throws HELM2HandledException if it contains HELM2 specific features, so that it can not be casted to HELM1 Format
  @throws ChemistryException  if chemistry engine can not be initialized