Example #1
0
def get_uniprot_to_entrez_map(all_pws_map=None):
    if all_pws_map is None:
        all_pws_map = cx_pathway_reader.read_pathways()

    all_alias = get_alias_set(all_pws_map)

    mapped, missing = fetch_uniprot_to_entrez(all_alias)

    json_data = {
        'mapped': mapped,
        'missing': missing,
    }

    path = os.path.join(config.data_dir, 'gene-map-uniprot-entrez.json')
    with open(path, 'w') as f:
        json.dump(json_data, f)
def read_pathways():
    # get all pathways
    return cx_pw.read_pathways()