Public Repository

Last pushed: 2 years ago
Short Description
Neo4j container for I0U19A course
Full Description

To run, type docker run -d -p 7474:7474 jandot/neo4j-i0u19a, and then go to

Example queries:

  • Simple query: MATCH (n:Gene {name:"ACTN2"})-[]->(m) RETURN n,m;
  • Distinct types of relationships: MATCH (n:Gene)-[r]->(m:Gene) RETURN DISTINCT r.proof;
  • Shortest Path:
    MATCH (n:Gene {name:"4EHP"}), (m:Gene {name:"Zzz3"}),
    p = shortestPath((n)-[*..15]-(m))
    RETURN p;
  • Shortest path using one type of relationship. We need to add the WHERE ALL here because r matches the whole path, not a single relationship:
    MATCH (n:Gene {name:"TNNI1"}), (m:Gene {name:"PDLIM1"}),
    p = shortestPath((n)-[r *..15]-(m))
    WHERE ALL(rel in r WHERE rel.proof = "Two-hybrid")
    RETURN p;
  • Degree: MATCH (n:Gene)-[r]-(m:Gene) RETURN, count(r) as DegreeScore ORDER BY DegreeScore desc LIMIT 100;
Docker Pull Command