def prepare_ec(self, scaffolds, tour, weights):
        scaffolds_ii = dict((s, i) for i, s in enumerate(scaffolds))
        scfs = []
        ww = []
        for mlg in self.linkage_groups:
            w = float(weights[mlg.mapname])
            scf = {}
            for s, o in tour:
                si = scaffolds_ii[s]
                scf[si] = self.get_series(mlg.lg, s, orientation=o)
            scfs.append(scf)
            ww.append(w)
        tour = [scaffolds_ii[x] for x, o in tour]

        return scfs, tour, ww
Prepare Evolutionary Computation. This converts scaffold names into
dataset/ETHPy150Open tanghaibao/jcvi/assembly/allmaps.py/ScaffoldOO.prepare_ec