def _handleEndOfFile(self):
     GtrackGenomeElementSource._handleEndOfFile(self)
     
     #To fix an issue where value dimension is "list" if the value type was wrongly
     #guessed for early elements.
     
     newIter = self.__iter__()
     newIter._valTypeIndexDict = self._valTypeIndexDict
     newIter._handleEndOfFile = newIter._basicHandleEndOfFile
     
     try:
         while True:
             newIter.next()
     except StopIteration:
         pass
     
     self._valLenDict = newIter._valLenDict
     if len(self._uniqueEdgeIds) == 0:
         self._headerDict['undirected edges'] = False
     
     for valueOrEdgeWeight in ['value', 'edge weight']:
         if valueOrEdgeWeight in newIter._allMissingDict and newIter._allMissingDict[valueOrEdgeWeight] == True:
             self._headerDict['%s type' % valueOrEdgeWeight] = 'number'
Пример #2
0
    def _handleEndOfFile(self):
        GtrackGenomeElementSource._handleEndOfFile(self)

        #To fix an issue where value dimension is "list" if the value type was wrongly
        #guessed for early elements.

        newIter = self.__iter__()
        newIter._valTypeIndexDict = self._valTypeIndexDict
        newIter._handleEndOfFile = newIter._basicHandleEndOfFile

        try:
            while True:
                newIter.next()
        except StopIteration:
            pass

        self._valLenDict = newIter._valLenDict
        if len(self._uniqueEdgeIds) == 0:
            self._headerDict['undirected edges'] = False

        for valueOrEdgeWeight in ['value', 'edge weight']:
            if valueOrEdgeWeight in newIter._allMissingDict and newIter._allMissingDict[
                    valueOrEdgeWeight] == True:
                self._headerDict['%s type' % valueOrEdgeWeight] = 'number'
 def _basicHandleEndOfFile(self):
     GtrackGenomeElementSource._handleEndOfFile(self)
Пример #4
0
 def _basicHandleEndOfFile(self):
     GtrackGenomeElementSource._handleEndOfFile(self)