def add_node_if_not_drawn(element_set, element, flux): if element.id not in element_set: n = element.name[4:] name = met_name_by_kegg_id[n] if n in met_name_by_kegg_id else None Kegg._add_node(data, element, int(flux), name=name, show_compound_img=None) element_set.add(element.id)
def add_node(elements): for e in elements: e_name = e.name if e_name in UNDESIRABLES: continue e_id = e.id if e_name not in added_node: added_node.add(e_name) id_by_name[e_name] = e_id Kegg._add_node(data, e_id, 'metabolites', e.name, None, '#000000')