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()
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()
def shouldPreProcessGESource(trackName, geSource, allowOverlaps): genome = geSource.getGenome() storedInfo = TrackInfo(genome, trackName) validFilesExist = PreProcessUtils.preProcFilesExist(genome, trackName, allowOverlaps) and \ storedInfo.isValid() if not geSource.hasOrigFile(): return False if validFilesExist or geSource.isExternal() else True storedAsAccordingToGeSource = \ (PreProcessUtils.constructId(geSource) == storedInfo.id and \ geSource.getVersion() == storedInfo.preProcVersion) #from gtrackcore.application.LogSetup import logMessage #logMessage(geSource.getGenome()) #logMessage(':'.join(trackName)) #logMessage('%s %s %s %s %s' % (PreProcessUtils.preProcFilesExist(genome, trackName, allowOverlaps), \ # storedInfo.isValid(), \ # geSource.hasOrigFile(), \ # PreProcessUtils.constructId(geSource) == storedInfo.id, \ # geSource.getVersion() == storedInfo.preProcVersion)) return not (validFilesExist and storedAsAccordingToGeSource)
def _calcAndStoreSubTrackCount(self, trackName): ti = TrackInfo(self._genome, trackName) if ti.isValid(): ti.subTrackCount = 1 ti.store()