Exemplo n.º 1
0
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
Exemplo n.º 2
0
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
Exemplo n.º 3
0
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
Exemplo n.º 4
0
 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
Exemplo n.º 5
0
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
Exemplo n.º 6
0
def _v9(data: dict) -> dict:
    modifyclasses(
        data, ".*cleaning.datacleaning.*",
        dict(__name__=lambda x: x.replace("cleaning.datacleaning",
                                          "cleaning._core")))
    return data
Exemplo n.º 7
0
def _v7(data: dict) -> dict:
    modifyclasses(
        data, 'peakfinding.processor.singlestrand.SingleStrandTask',
        dict(__name__='peakfinding.processor.peakfiltering.SingleStrandTask'))
    return data
Exemplo n.º 8
0
def _v6(data: dict) -> dict:
    modifyclasses(data, 'cleaning.beadsubtraction.BeadSubtractionTask',
                  dict(__name__='cleaning.processor.BeadSubtractionTask'))
    return data
Exemplo n.º 9
0
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
Exemplo n.º 10
0
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
Exemplo n.º 11
0
def _v11(data: dict) -> dict:
    modifyclasses(data, "peakcalling.view._model.*",
                  dict(__name__=lambda x: x.replace('view._model', 'model')))
    return data
Exemplo n.º 12
0
def _v10(data: dict) -> dict:
    modifyclasses(data, "data.Track",
                  dict(_rawprecisions=DELETE, rawprecisions=DELETE))
    return data