code: def _milliBad(self, ismRNA=False):
          
          sizeMult = self._sizeMult
  
          qAlnSize, tAlnSize = self.qspan * sizeMult, self.tspan
          alnSize = min(qAlnSize, tAlnSize)
          if alnSize <= 0:
              return 0
  
          sizeDiff = qAlnSize - tAlnSize
          if sizeDiff < 0:
              sizeDiff = 0 if ismRNA else -sizeDiff
  
          insertFactor = self.qNumInsert
          if not ismRNA:
              insertFactor += self.tNumInsert
  
          total = (self.matches + self.repMatches + self.misMatches) * sizeMult
  
          return (1000 * (self.misMatches * sizeMult + insertFactor + \
                  round(3 * math.log(1 + sizeDiff)))) / total if total != 0 else 0
docs: calculate badness in parts per thousand
          i.e. number of non-identical matches