예제 #1
0
파일: Api.py 프로젝트: henrikgs/gtrackcore
def _trackNameExists(genome, trackName):
    from gtrackcore_memmap.track.hierarchy.ProcTrackOptions import ProcTrackOptions

    if not ProcTrackOptions.isValidTrack(genome, trackName):
        print 'Track "%s" of genome "%s" is not valid.' % (":".join(trackName), genome)
        return False
    return True
예제 #2
0
    def yielder(self, curTn):
        #if self._avoidLiterature and curTn == GenomeInfo.getPropertyTrackName(self._genome, 'literature'):
        #    return
        
        for subtype in ProcTrackOptions.getSubtypes(self._genome, curTn, self._fullAccess):
            #if self._avoidLiterature and subtype == 'Literature':
            
            if subtype[0] in ['.','_']:
                continue

            newTn = curTn + [subtype]

            doBreak = False
            for subTn in self.yielder(newTn):
                yield subTn

        if ProcTrackOptions.isValidTrack(self._genome, curTn, self._fullAccess):
            yield curTn
예제 #3
0
 def _calcAndStoreSubTrackCount(self, trackName):
     ti = TrackInfo(self._genome, trackName)
     trackCount = 0
     for subTrackName in ProcTrackOptions.getSubtypes(self._genome, trackName, True):
         subTrackCount = TrackInfo(self._genome, trackName + [subTrackName]).subTrackCount
         if subTrackCount:
             trackCount += subTrackCount
     if ti.isValid():
         trackCount += 1
     ti.subTrackCount = trackCount
     ti.store()