Skip to content

Commit

Permalink
Update PCS_usecase.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
tabbassidaloii committed Sep 18, 2024
1 parent da23cd1 commit 11d41ef
Showing 1 changed file with 14 additions and 21 deletions.
35 changes: 14 additions & 21 deletions examples/usecases/PCS/PCS_usecase.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2884,46 +2884,39 @@
"source": [
"- Add `.graphml` file in **import** subfolder of the DBMS folder\n",
"- Install apoc plugin\n",
"- Add `apoc.conf` file to **conf** subfolder of the DBMS folder\n",
"\n",
" `apoc.conf` file:\n",
"- Create `apoc.conf` file:\n",
" ```\n",
" apoc.trigger.enabled=true\n",
" apoc.import.file.enabled=true\n",
" apoc.export.file.enabled=true\n",
" apoc.import.file.use_neo4j_config=true\n",
" ```\n",
"\n",
"- Add `apoc.conf` file to **conf** subfolder of the DBMS folder\n",
"- Open Neo4j Browser\n",
"- (Optionl, only run if you have imported a graph before) Remove all the nodes before importing `.graphml` file\n",
"\n",
" ```\n",
" ```MATCH (n) DETACH DELETE n\n",
" MATCH (n) DETACH DELETE n\n",
" ```\n",
"\n",
"- Import `.graphml` file\n",
"\n",
" ```\n",
" ```call apoc.import.graphml('file:///pcs_networkx_graph.graphml',{readLabels:TRUE})\n",
" call apoc.import.graphml('file:///pcs_networkx_graph.graphml',{readLabels:TRUE})\n",
" ```\n",
"\n",
"- Add indexes after importing the graph for improving the performance of queries\n",
"\n",
" ```create index Gene for (n:Gene) on (n.node_type)```\n",
"\n",
" ```create index Pathway for (n:Pathway) on (n.node_type)```\n",
"\n",
" ```create index `Biological Process` for (n:`Biological Process`) on (n.node_type)```\n",
"\n",
" ```create index `Molecular Function` for (n:`Molecular Function`) on (n.node_type)```\n",
"\n",
" ```create index `Cellular Component` for (n:`Cellular Component`) on (n.node_type)```\n",
"\n",
" ```create index Disease for (n:Disease) on (n.node_type)```\n",
"\n",
" ```create index Compound for (n:Compound) on (n.node_type)```\n",
"\n",
" ```create index `Side Effect` for (n:`Side Effect`) on (n.node_type)```\n",
" ```\n",
" create index Gene for (n:Gene) on (n.node_type)\n",
" create index Pathway for (n:Pathway) on (n.node_type)\n",
" create index `Biological Process` for (n:`Biological Process`) on (n.node_type)\n",
" create index `Molecular Function` for (n:`Molecular Function`) on (n.node_type)\n",
" create index `Cellular Component` for (n:`Cellular Component`) on (n.node_type)\n",
" create index Disease for (n:Disease) on (n.node_type)\n",
" create index Compound for (n:Compound) on (n.node_type)\n",
" create index `Side Effect` for (n:`Side Effect`) on (n.node_type)\n",
" ```\n",
"\n",
"- Count the number of each node type\n",
" - total (```MATCH (n) RETURN count(n)```) = 19859\n",
Expand Down

0 comments on commit 11d41ef

Please sign in to comment.