Skip to content

Commit

Permalink
Added a more intelligeble class name in the memoization loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
chiffa committed Feb 3, 2016
1 parent 0cca811 commit 0bc156a
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 28 deletions.
4 changes: 2 additions & 2 deletions bioflow/analysis_pipeline_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@


# first, let's clear logs:
# clear_logs()
clear_logs()

# # setting static folders and urls for the databases
# set_folders('/home/andrei/support')
set_folders('/home/andrei/support')
# # pulling the online databases
# StructureGenerator.pull_online_dbs()
# # setting the organism to yeast
Expand Down
2 changes: 1 addition & 1 deletion bioflow/configs/sources.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ load = HumanBinaryHQ.txt
location = /home/andrei/support/HiNT

[BIOGRID]
load = Homo_Sapiens
load = Homo_sapiens
location = /home/andrei/support/BioGRID

[INTERNAL]
Expand Down
6 changes: 3 additions & 3 deletions bioflow/configs_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class StructureGenerator(object):
'shortname': 'human',
'tax_id': '9606',
'Reactome_name': 'Homo_sapiens.owl',
'Biogrid_name': 'Homo_Sapiens',
'Biogrid_name': 'Homo_sapiens',
'HINT_name': 'HumanBinaryHQ.txt'}

# default configuration elements for mice proteins analysis
Expand Down Expand Up @@ -243,8 +243,8 @@ def set_folders(file_directory, neo4jserver='http://localhost:7474',


if __name__ == "__main__":
set_folders('/home/ank/datastore')
StructureGenerator.build_source_config('yeast')
set_folders('/home/andrei/support')
StructureGenerator.build_source_config('human')
# pp = PrettyPrinter(indent=4)
# pp.pprint(parse_configs())
# StructureGenerator.pull_online_dbs()
30 changes: 15 additions & 15 deletions bioflow/db_importers/import_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@ def destroy_db():
if __name__ == "__main__":
# clear_all(bulbs_names_dict)
run_diagnostics(full_list)
# insert_reactome()
# run_diagnostics(full_list)
#
# # clear_all({'GO Term': (DatabaseGraph.GOTerm, "GOTerm")})
#
# go_terms, go_terms_structure = GOTermsParser().parse_go_terms(main_configs.GeneOntology)
# import_gene_ontology(go_terms, go_terms_structure)
#
# # memoize_go_terms()
#
# # clear_all({'UNIPROT': (DatabaseGraph.UNIPORT, "UNIPROT")})
#
# uniprot = UniProtParser(main_configs.up_tax_ids).parse_uniprot(main_configs.UNIPROT_source)
# reactome_acnum_bindings = pull_up_acc_nums_from_reactome()
# import_uniprots(uniprot, reactome_acnum_bindings)
insert_reactome()
run_diagnostics(full_list)

# clear_all({'GO Term': (DatabaseGraph.GOTerm, "GOTerm")})

go_terms, go_terms_structure = GOTermsParser().parse_go_terms(main_configs.GeneOntology)
import_gene_ontology(go_terms, go_terms_structure)

# memoize_go_terms()

# clear_all({'UNIPROT': (DatabaseGraph.UNIPORT, "UNIPROT")})

uniprot = UniProtParser(main_configs.up_tax_ids).parse_uniprot(main_configs.UNIPROT_source)
reactome_acnum_bindings = pull_up_acc_nums_from_reactome()
import_uniprots(uniprot, reactome_acnum_bindings)

cross_ref_hint()
cross_ref_bio_grid()
Expand Down
15 changes: 8 additions & 7 deletions bioflow/neo4j_db/db_io_routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,14 @@ def annotations_2_node_chars(node_generator):
log.warning("%s is floating alone in the wild. He feels lonely. %s",
str(node), 'The database is most likely broken.')

for object_node in annotates_backlink_generator:
node_bulbs_id = get_bulbs_id(object_node)
node_legacy_id = object_node.ID
node_type = object_node.element_type
node_display_name = object_node.displayName
referenced_nodes.append((node_type, node_display_name,
node_bulbs_id, node_legacy_id))
else:
for object_node in annotates_backlink_generator:
node_bulbs_id = get_bulbs_id(object_node)
node_legacy_id = object_node.ID
node_type = object_node.element_type
node_display_name = object_node.displayName
referenced_nodes.append((node_type, node_display_name,
node_bulbs_id, node_legacy_id))

return referenced_nodes

Expand Down

0 comments on commit 0bc156a

Please sign in to comment.