code: public static List<Range<Integer>> getCDSRegions(List<Integer> origExonStarts, List<Integer> origExonEnds, int cdsStart, int cdsEnd) {
  
  		// remove exons that are fully landed in UTRs
  		List<Integer> exonStarts = new ArrayList<Integer>(origExonStarts);
  		List<Integer> exonEnds = new ArrayList<Integer>(origExonEnds);
  
  		int j=0;
  		for (int i = 0; i < origExonStarts.size(); i++) {
  			if ( ( origExonEnds.get(i) < cdsStart) || ( origExonStarts.get(i) > cdsEnd) ) {
  				exonStarts.remove(j);
  				exonEnds.remove(j);
  			}
  			else {
  				j++;
  			}
  		}
  
  		// remove untranslated regions from exons
  		int nExons = exonStarts.size();
  		exonStarts.remove(0);
  		exonStarts.add(0, cdsStart);
  		exonEnds.remove(nExons-1);
  		exonEnds.add(cdsEnd);
  
  		List<Range<Integer>> cdsRegion = new ArrayList<Range<Integer>>();
  		for ( int i=0; i<nExons; i++ ) {
  			Range<Integer> r = Range.closed(exonStarts.get(i), exonEnds.get(i));
  			cdsRegion.add(r);
  		}
  		return cdsRegion;
  	}
docs: Extracts the exons boundaries in CDS coordinates corresponding to the forward DNA strand.
  
  @param origExonStarts The list holding the genetic coordinates pointing to the start positions of the exons (including UTR regions)
  @param origExonEnds The list holding the genetic coordinates pointing to the end positions of the exons (including UTR regions)
  @param cdsStart The start position of a coding region
  @param cdsEnd The end position of a coding region
  
  @return the list of genetic positions corresponding to the exons boundaries in CDS coordinates