Workshop #1 - My first graph in the cloud
Let's create a first graph in the cloud using a Neo4j Aura cloud database.
This database will be deleted after 14 days.
Create a free account in Neo4j for Aura (cloud)
1. login to Neo4j.com
2. On the upper right corner select "Get Started free"
3. Choose "Sign up"
4. Enter Email address and press "Continue"
5. Enter the CODE that was send to your email.
6. "Sign UP" - Set a strong password
7. "Let's get you set up" : Provide Name
8. "Define your goal"
9. "Select your role"
10. Press "create a free instance"
11. ...your instance is beein created...
Important copy your password or download your credentials

Change to "QUERY" and connect to new instance
1. On the right side choose "Query"
2. Press "Connect to instance"
3. In the Popup choose button "Connect"
4. A welcome screen appears.
5. You are now ready to create your first node

Create your first Node
This is the place for the Cypher code:
CREATE first NODE:
Please paste following code into this field and press run:
CREATE (:Compound {name: "Metformin", chembl: "CHEMBL1431"})
FETCH the FIRST NODE:
MATCH (c:Compound) RETURN c

Create your second Node and first relationship
This is the place for the Cypher code:
CREATE second NODE and the relationship to the first node
MATCH (c:Compound {name: "Metformin"})
CREATE (d:Disease {name: "Type 2 diabetes", umls: "C0011860"})
CREATE (c)-[:TREATS {since: 1998, evidence: "PMID 9742977"}]->(d)
FETCH both NODES: (result is a string)
MATCH (c:Compound)-[r:TREATS]->(d:Disease)
RETURN c.name + " treats " + d.name + " (since " + r.since + ")"

FETCH both NODES: (result is a graph)
MATCH (c:Compound)-[r:TREATS]->(d:Disease)
RETURN c,r,d

Create your third Node and second relationship
CREATE third NODE and the second relationship
MATCH (c:Compound {name: "Metformin"}) CREATE (t:Target {name: "Complex I", uniprot: "P03886"}) CREATE (c)-[:INHIBITS]->(t)
FETCH both NODES: (result is a graph)
MATCH p = (:Compound)-[]->() RETURN p

Lets find an answer to
Which targets are involved in treating which diseases?
MATCH (d:Disease)<-[:TREATS]-(c:Compound)-[:INHIBITS]->(t:Target) RETURN d.name AS disease, c.name AS drug, t.name AS target

Try yourself
add one node of your own choosing to the graph and connects it:
-
a second compound
(Glucophage → SAME_AS → Metformin – entity resolution!)
-
a side effect (Lactic acidosis ← CAUSES)
-
a pharmacological class (Biguanide ← IS_A)
Then run MATCH p=()-[]->() RETURN p and look at what the room built together.
Then verify the whole graph:
MATCH p=()-[]->() RETURN p
Helpful cypher statements
Delete all nodes
match (n) detach delete n
Settings
Theme:

