extract the reference (genomic sequence match) coordinates of a repeat
  occurrence from a repeatmakser header line. An example header line is::

    239 29.42 1.92 0.97 chr1 11 17 (41) C XX#YY (74) 104 1 m_b1s502i1 4

  the genomic start and end are always at positions 5 and 6 resepctively. In
  the repeatmasker format, the end is inclusive, but in pyokit end coordinates
  are exclusive, so we adjust it when we parse here.

  :param parts: the header line, as a tokenized list.
  :return: tuple of (start, end)

def _rm_get_reference_coords_from_header(parts):
  """
  extract the reference (genomic sequence match) coordinates of a repeat
  occurrence from a repeatmakser header line. An example header line is::

    239 29.42 1.92 0.97 chr1 11 17 (41) C XX#YY (74) 104 1 m_b1s502i1 4

  the genomic start and end are always at positions 5 and 6 resepctively. In
  the repeatmasker format, the end is inclusive, but in pyokit end coordinates
  are exclusive, so we adjust it when we parse here.

  :param parts: the header line, as a tokenized list.
  :return: tuple of (start, end)
  """
  s = int(parts[5])
  e = int(parts[6]) + 1
  if (s >= e):
    raise AlignmentIteratorError("invalid repeatmakser header: " +
                                 " ".join(parts))
  return (s, e)