docs: def constructFMIndex(self, logger):
          '''
          This function iterates through the BWT and counts the letters as it goes to create the FM index.  For example, the string 'ACC$' would have BWT
          'C$CA'.  The FM index would iterate over this and count the occurence of the letter it found so you'd end up with this:
          BWT    FM-index
          C    0    0    0
          $    0    0    1
          C    1    0    1
          A    1    0    2
               1    1    2
          This is necessary for finding the occurrence of a letter using the getOccurrenceOfCharAtIndex(...) function.
          In reality, this function creates a sampled FM-index so only one index every 2048 bases is filled in.
          This file is always stored in '<DIR>/fmIndex.npy'
          '''
          #sampling method
          self.searchCache = {}
          self.bitPower = 11
          self.binSize = 2**self.bitPower
          self.fmIndexFN = self.dirName+'/fmIndex.npy'
          
          if os.path.exists(self.fmIndexFN):
              self.partialFM = np.load(self.fmIndexFN, 'r')
          else:
              if logger != None:
                  logger.info('First time calculation of \'%s\'' % self.fmIndexFN)
              
              #pre-allocate space
              self.partialFM = np.lib.format.open_memmap(self.fmIndexFN, 'w+', '<u8', (self.bwt.shape[0]/self.binSize+1, self.vcLen))
              
              #now perform each count and store it to disk
              counts = np.zeros(dtype='<u8', shape=(self.vcLen,))
              counts[:] = self.startIndex
              self.partialFM[0] = self.startIndex
              for j in xrange(1, self.partialFM.shape[0]):
                  counts += np.bincount(self.bwt[self.binSize*(j-1):self.binSize*j], minlength=self.vcLen)
                  self.partialFM[j] = counts