def _v1(data: dict) -> dict: mods = dict(symmetry=lambda val: 'both' if val else RESET) modifyclasses(data, "peakcalling.processor.fittohairpin.FitToHairpinTask", mods, "peakcalling.processor.fittoreference.FitToReferenceTask", mods) return data
def _v0task(data: dict) -> dict: modifyclasses( data, "eventdetection.processor.ExtremumAlignmentTask", dict(edge=lambda val: 'right' if val else RESET, phase=RESET, factor=RESET)) return data
def _v8(data: dict) -> dict: modifyclasses( data, r'.*model.task.*', dict(__name__=lambda x: x.replace('model.task', 'taskmodel')), r'.*model.level.*', dict(__name__=lambda x: x.replace('model.', 'taskmodel.')), r'.*model.__scripting__.*', dict(__name__=lambda x: x.replace('model.', 'taskmodel.'))) return data
def _modify(self, data:dict) -> dict: mods = tuple(self.modifications) if self.path is not None: # type: ignore def _pathpatch(val): # pylint: disable=not-callable val[CNT] = self.path(cast(Sequence[str], val[CNT])) # type: ignore return val mods += "taskmodel.track.TrackReaderTask", dict(path = _pathpatch) modifyclasses(data, *mods) return data
def _v5(data: dict) -> dict: mdl = 'eventdetection.merging.' args = zip( ('HeteroscedasticEventMerger', 'PopulationMerger', 'RangeMerger'), ('stats', 'pop', 'range')) def _multi(itm): itm.update({ k: i for i, (j, k) in product(itm.pop('merges', ()), args) if i[TPE] == mdl + j }) modifyclasses(data, mdl + "MultiMerger", dict(__call__=_multi)) return data
def _v9(data: dict) -> dict: modifyclasses( data, ".*cleaning.datacleaning.*", dict(__name__=lambda x: x.replace("cleaning.datacleaning", "cleaning._core"))) return data
def _v7(data: dict) -> dict: modifyclasses( data, 'peakfinding.processor.singlestrand.SingleStrandTask', dict(__name__='peakfinding.processor.peakfiltering.SingleStrandTask')) return data
def _v6(data: dict) -> dict: modifyclasses(data, 'cleaning.beadsubtraction.BeadSubtractionTask', dict(__name__='cleaning.processor.BeadSubtractionTask')) return data
def _v3(data: dict) -> dict: repl = lambda x: x.replace('Min', '') modifyclasses(data, "peakfinding.selector.PeakSelector", dict(align=DELETE), r"cleaning.datacleaning.Min(\w+)", dict(__name__=repl)) return data
def _v2(data: dict) -> dict: repl = lambda x: (x.replace('.histogram.', '.groupby.histogramfitter.'). replace('.ByZeroCrossing', '.ByHistogram')) modifyclasses(data, r"peakfinding.histogram.(\w+)", dict(__name__=repl)) return data
def _v11(data: dict) -> dict: modifyclasses(data, "peakcalling.view._model.*", dict(__name__=lambda x: x.replace('view._model', 'model'))) return data
def _v10(data: dict) -> dict: modifyclasses(data, "data.Track", dict(_rawprecisions=DELETE, rawprecisions=DELETE)) return data