public static Map<Marker, Marker> collapseZeroGap(Markers markersOri) {
		Map<Marker, Marker> collapse = new HashMap<Marker, Marker>();

		// Sort markers by start 
		Markers sorted = new Markers();
		sorted.add(markersOri);
		sorted.sort(false, false);

		// Create new set of markers
		Marker markerPrev = null; // Previous marker in the list
		Marker markerToAdd = null;
		int countCollapsed = 0;
		for (Marker m : sorted) {
			if (markerToAdd == null) markerToAdd = m.clone();

			if (markerPrev != null) {
				// Find start, end and gap size
				int start = markerPrev.getEnd() + 1;
				int end = m.getStart() - 1;
				int gapSize = end - start + 1;

				if (gapSize <= 0) {
					countCollapsed++;
					if (markerToAdd.getEnd() < m.getEnd()) markerToAdd.setEnd(m.getEnd()); // Set new end for this marker (we are collapsing it with the previous one)

					// Do we need to correct frame information?
					if (markerToAdd.isStrandMinus() && (markerToAdd instanceof MarkerWithFrame) && (m instanceof MarkerWithFrame)) {
						MarkerWithFrame markerToAddWf = (MarkerWithFrame) markerToAdd;
						MarkerWithFrame mwf = (MarkerWithFrame) m;
						markerToAddWf.setFrame(mwf.getFrame());

					}
				} else markerToAdd = m.clone(); // Get ready for next iteration

			}
			collapse.put(m, markerToAdd);
			markerPrev = m;
		}

		// Sanity check
		HashSet<Marker> collapsed = new HashSet<Marker>();
		collapsed.addAll(collapse.values());
		if ((markersOri.size() - countCollapsed) != collapsed.size()) throw new RuntimeException("Sanitycheck failed. This should never happen!\n\tmarkers.size: " + markersOri.size() + "\n\tcountCollapsed: " + countCollapsed + "\n\treplaced.size : " + collapsed.size());

		return collapse;
	}