def main():
    import networkx

    filepaths = yield_model_paths()

    # Extracted using get_all_go_compartments("curated")
    all_compartments = {
        'vesicle', 'glycosome', 'Golgi apparatus', 'endoplasmic reticulum',
        'sarcoplasmic reticulum', 'hepatocyte homeostasis', 'cytoplasm',
        'early phagosome', 'smooth endoplasmic reticulum', 'endosome lumen',
        'extracellular region', 'autophagosome', 'nucleus',
        'mitochondrial matrix', 'obsolete intracellular part', 'cell',
        'extraorganismal space', 'extracellular membrane-bounded organelle',
        'endosome membrane', 'membrane', 'lysosome', 'endosome',
        'proteasome complex', 'intracellular',
        'cytoplasmic side of plasma membrane',
        'endoplasmic reticulum membrane', 'DNA binding', 'cell surface',
        'mitochondrion', 'spindle pole body', 'plasma membrane',
        'chloroplast stroma', 'Golgi membrane',
        'mitochondrial intermembrane space', 'extracellular space',
        'nuclear membrane', 'mitochondrial inner membrane', 'cytosol'
    }

    data = extract_data(filepaths,
                        parser=CompartmentParser(),
                        all_go_compartments=all_compartments,
                        skip_single_cmp_models=True)
    graph = build_graph(data)
    networkx.write_graphml(graph, "graphs/multicompartment_models.graphml")
def main():
    filepaths = yield_model_paths()
    data = extract_data(filepaths, parser=ReactionsParser())
    data = flatten_reaction_data(data)
    headers = ("Model Name", "Provider", "URI", "Created", "Reaction Name",
               "KEGG Identifiers", "Other Identifiers")
    to_csv("../kegg_reactions.csv", data, headers=headers)
Esempio n. 3
0
def main():
    import networkx

    filepaths = yield_model_paths()

    data = extract_data(filepaths, parser=SpeciesParser())
    graph = build_graph(data)
    networkx.write_graphml(graph, "graphs/species.graphml")
Esempio n. 4
0
def main():
    import networkx

    filepaths = yield_model_paths()

    data = extract_data(filepaths, parser=DerivedModelParser())
    graph = build_graph(data)
    networkx.write_graphml(graph, "graphs/derived_models.graphml")
Esempio n. 5
0
def main():
    import networkx

    filepaths = yield_model_paths()
    reaction_metadata = {
        "numReactions": 0,
        "numAnnotatedReactions": 0,
        "numUnannotatedReactions": 0,
        "numMultipleURIReactions": 0
    }
    data = extract_data(filepaths,
                        parser=ReactionsParser(),
                        counter=reaction_metadata)
    graph = build_graph(data)

    print(reaction_metadata)
    networkx.write_graphml(graph, "graphs/reactions.graphml")
def main():
    filepaths = yield_model_paths()

    data = extract_data(filepaths, parser=BTOParser())
    graph = build_graph(data)
    networkx.write_graphml(graph, "graphs/bto.graphml")