@@ -19,24 +19,87 @@ AlzKB is designed and developed by the following authors (in alphabetical order)
1919
2020## Installation
2121
22- (Note: Implementation not yet complete)
22+ To build a copy of AlzKB's graph database, you can either:
23+
24+ - Download a dump of the Neo4j database and import it into Neo4j
25+
26+ - Build the knowledge base from its original third-party sources and populate
27+ an empty Neo4j graph database
28+
29+ ### Install from database dump (easy)
30+
31+ - Before doing anything else, make sure you have an up-to-date version of Neo4j
32+ installed on the new database server. This can be Neo4j Desktop or Neo4j
33+ Server, depending on your intended use.
34+
35+ - Visit the [ Releases page] ( https://github.com/EpistasisLab/AlzKB/releases ) and
36+ find the version of AlzKB you want to install. Unless you have a particular
37+ reason to do otherwise, this should probably be the most recent release.
38+ Follow the link in the release notes to the corresponding database dump (it
39+ will redirect to an external page).
40+
41+ - Once you have downloaded the dump, extract the archive.
42+
43+ - If you haven't already done so, create an empty database in Neo4j.
44+
45+ - Stop any running Neo4j database instances (you can only import the dump when
46+ the destination database is shut down).
47+
48+ - Use the ` neo4j-admin ` utility (included with Neo4j) to import the database
49+ from the dump. You may need to add the program to your ` PATH ` variable or
50+ similar; if using Neo4j Desktop you can open a terminal window from within the
51+ application and use ` cd bin ` to access the directory where the ` neo4j-admin `
52+ program is located. ** (If you are installing on Neo4j Server the following
53+ command needs to be run by the appropriate user; this is often ` neo4j ` )**
54+ Assuming that ` neo4j-admin ` is accessible in your current directory, an
55+ example import command for UNIX-based operating systems could look like this
56+ (substitute database name and dump location as needed):
57+
58+ ` $ neo4j-admin load --verbose --force --database=neo4j --from=~/Downloads/alzkb.dump `
59+
60+ - Start the Neo4j database and open it to verify everything looks good.
61+
62+ ### Build from scratch (less easy)
63+
64+ Start by installing the Python package, which includes the necessary scripts:
2365
24- Install AlzKB:
2566``` {bash}
67+ $ git clone https://github.com/EpistasisLab/AlzKB
68+ $ cd AlzKB
2669$ pip install .
2770```
2871
29- Download public data sources:
72+ #### Download the third-party database sources
73+
74+ First, install MySQL and make sure it is running, as some of the source
75+ databases are only available as MySQL dumps.
76+
77+ We've created a script that will fetch all of the source files and put them into
78+ the expected directory structure. We will try to keep this script as updated as
79+ possible, but if you encounter any issues we suggest looking at the script and
80+ making sure it points to entities that still exist.
81+
3082``` {bash}
3183$ alzkb bootstrap
3284```
3385
34- Build the RDF/XML knowledge base
86+ #### Populate the ontology
87+
88+ We use the external ` ista ` library to populate the OWL ontology. This should
89+ be pretty much entirely automated:
90+
3591``` {bash}
3692$ alzkb build
3793```
3894
39- Install knowledge base to an instance of Neo4j
95+ #### Load the ontology contents into Neo4j
96+
97+ This script will import the OWL 2 ontology contents into an empty Neo4j database
98+ and clean up unnecessary artifacts left over by the OWL 2 standard:
99+
40100``` {bash}
41101$ alzkb install
42- ```
102+ ```
103+
104+ After this, check the Neo4j database (which will now be turned on) and make sure
105+ everything looks alright.
0 commit comments