Updates `self.pathways` and `self.n_pathways.`

        Parameters
        -----------
        pathway : str
          the pathway to add to the network.
511714
def add_pathway(self, pathway):
        
        if pathway not in self.pathways:
            self.pathways[pathway] = self.n_pathways
            self.n_pathways += 1
        return self.pathways[pathway]
1042664
def update_network(self, network, body=None):
        """"""
        return self.put(self.network_path % (network), body=body)
1154375
def add_routes(self, routes: Iterable[AbstractRouteDef]) -> None:
        
        for route_def in routes:
            route_def.register(self)
205937
def update(self, path, node):
        ''''''
        assert(type(path) == type(self.name))
        assert(type(node) == type(self.name) or type(node) == type(predefined))

        d = self.color_scheme
        tokens = path.split('.')
        for t in tokens[:-1]:
            d = d.get(t)
            if d == None:
                raise Exception("Path '%s' not found.")
        d[tokens[-1]] = node
354854
def add_put(self, path: str, handler: _WebHandler,
                **kwargs: Any) -> AbstractRoute:
        
        return self.add_route(hdrs.METH_PUT, path, handler, **kwargs)
608824
def patch(self, path, data, **options):
        
        data, options = self._update_request(data, options)
        return self.request('patch', path, data=data, **options)
721219
def add_put(self, *args, **kwargs):
        
        return self.add_route(hdrs.METH_PUT, *args, **kwargs)
336697
def add(self, routeID, edges):
        
        self._connection._beginMessage(tc.CMD_SET_ROUTE_VARIABLE, tc.ADD, routeID,
                                       1 + 4 + sum(map(len, edges)) + 4 * len(edges))
        self._connection._packStringList(edges)
        self._connection._sendExact()
1051785
def propagate_paths_and_modules(self, context, paths, modules):
        
        for path in paths:
            self.propagate_to(context, mitogen.core.to_text(path))
        self.router.responder.forward_modules(context, modules)
353939
def update(self, path, verbose=False):
        
        if path in self._by_path:
            self.remove(path)
        else:
            self.add(path, verbose)
300029
def _process_pathway_pathway(self, limit):
        
        LOG.info("Processing KEGG pathways to other ids")
        if self.test_mode:
            graph = self.testgraph
        else:
            graph = self.graph
        line_counter = 0

        model = Model(graph)
        raw = '/'.join((self.rawdir, self.files['pathway_pathway']['file']))
        with open(raw, 'r', encoding="iso-8859-1") as csvfile:
            filereader = csv.reader(csvfile, delimiter='\t', quotechar='\"')
            for row in filereader:
                line_counter += 1
                (pathway_id_1, pathway_id_2) = row

                if self.test_mode and pathway_id_1 not in self.test_ids['pathway']:
                    continue

                pathway_id_1 = 'KEGG-' + pathway_id_1
                # will look like KEGG-path:map04130 or KEGG-path:ko04130
                pathway_id_2 = 'KEGG-' + pathway_id_2

                if pathway_id_1 != pathway_id_2:
                    model.addEquivalentClass(pathway_id_1, pathway_id_2)

                if not self.test_mode and limit is not None and line_counter > limit:
                    break
        return
1267696
def update(self, path):
        
        self._reset()
        self.path = path
        self._refresh_synced()
        if self.is_synced:
            self._refresh_path()
            self._refresh_signed()
            self._refresh_nvr()
257385
def add3(self, target, path_settings=None, method='GET'):
        
        if path_settings is None:
            path_settings = []
        return self.add(method, path_settings, target)
714483
def add_paths(self, paths):
        
        if paths:
            # Use new paths in priority
            self._paths = list(paths) + self._paths
390387
def _update(self, layer=None):
        
        meta = getattr(self, ModelBase._meta_attr)
        if not layer:
            layers = self.layers
        else:
            # convert non-sequence to tuple
            layers = _listify(layer)
        for layer in layers:
            # relative path to layer files from model file
            path = os.path.abspath(os.path.join(meta.modelpath, layer))
            getattr(self, layer).load(path)
680662
def bulk_add(self, named_graph, add, size=DEFAULT_CHUNK_SIZE):
        
        return self.bulk_update(named_graph, add, size)
1271378
def update(self, **kwargs):
        
        data = self._generate_input_dict(**kwargs)
        self.load(self.client.put('/'.join(self.url.split('/')[:-1]) + 's', data=data))
        return self