Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create the loading script and visualization query, references #2
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Neo4J ADCY5 | ||
This directory in the repository explains how to setup and create the Neo4J database. | ||
|
||
## Quickstart | ||
|
||
1. Run the command `python main.py` to create the JSON file which performs data collection accross the internet. | ||
2. Run the command `python ParseJson.py` creates the CSV. | ||
3. Open the `load.cql` file to create the query from the `output.csv` to run on the cloud Neo4J. | ||
|
||
## Cloud Storage | ||
The data is located on https://console.neo4j.io/ and you can find the authentication, urls, and secrets in `keys.txt`. | ||
|
||
## Install | ||
- Run `./install.sh` | ||
- Run the command `./neo4j-community-5.17.0/bin/neo4j status` to see the status of the Neo4J database. | ||
|
||
## Visualize | ||
|
||
Run this query to produce a visualization. | ||
|
||
```cypher | ||
MATCH (v:Variant)-[:CONTRIBUTED_BY]->(c:Contributor) | ||
RETURN v, c | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
LOAD CSV WITH HEADERS FROM 'file:///output.csv' AS row | ||
WITH row WHERE row.Contributors IS NOT NULL | ||
MERGE (v:Variant {name: row.`Allelic variant list`}) | ||
MERGE (r:Reference {citation: row.`Reference list`}) | ||
MERGE (l:Link {url: row.`External links`}) | ||
MERGE (c:Contributor {name: row.Contributors}) | ||
MERGE (v)-[:HAS_REFERENCE]->(r) | ||
MERGE (r)-[:HAS_LINK]->(l) | ||
MERGE (v)-[:CONTRIBUTED_BY]->(c); |