How can I import .OWL file into Neo4J? - neo4j

I have been playing with Neo4J to get a feel on how easy it is to work with related data. so far I have work with the Neo4J community browser to create nodes and build relationship between them.
I have developed an ontology using protege a link!. Now, that I have a huge ontology file(.owl file). I would like to upload it to Neo4J to perform queries and find potential relationships between nodes.
I would be glad if I get any help on this.
Thanks.

Have you seen the blog post by Stefanie Wiegand?
http://blog.neo4j.org/2013/08/and-now-for-something-completely.html
There are also some other users on the Neo4j Google Group who work in ontologies / OWL, perhaps good to cross post there?
There are some more approaches:
http://michaelbloggs.blogspot.de/2013/05/importing-ttl-turtle-ontologies-in-neo4j.html
http://sujitpal.blogspot.de/2009/05/using-neo4j-to-load-and-query-owl.html

Related

How to import .rdf file in Neo4j database?

I have a .rdf file which I was used for Dgraph in order to import the data and the subsequently queries in order to get the relations in the Dgraph Ratel UI.
Now I need to include in my web application for which Dgraph doesn't have support (link). Hence I started looking for Neo4j.
Can anyone please help out how to import .rdf file in Neo4j if not what's the workaround.
Thanks.
Labeled property graph (LPG) and RDF graph are different graph data models, see:
RDF Triple Stores vs. Labeled Property Graphs: What's the Difference? by Jesus Barrasa
Reification is red herring by Bob DuCharme
Neo4j supports LPG data model only. However, there is the neosemantics Neo4j plugin.
After installation, say:
CALL semantics.importRDF(<RDF_file_path>, <RDF_serialization_format>)
The mapping from RDF to LPG is described here.
I'd suggest you to use a proper triplestore for RDF data.

Importing SNOMED CT into Neo4J

I need to import SNOMED CT ontology into a graph database, in this case Neo4J but it could be another choice eventually.
However, I could not find a clear depiction of SNOMED CT underlying relational data model, in order to achieve this. Or at least, simplified SQL views that expose entity relantionship in a way that can be mapped to a graph database.
I would greatly appreciate any guidance or previous experiencies with this matter.
Directly trying to serialise the relational data model is probably going to be quite difficult and will take you further away from your goal.
It is worth noting that SNOMED data is actually available in RDF format already. So you get a graph structure for "free".
For example this project provides the data in a RDF format and putting RDF data into a graph is quite simple regardless of your choice of Titan or Neo4j.
Side Note:
A colleague of mine has actually worked on importing SNOMED data into a Grakn Graph, a semantic graph system we both work on. If you interested you can check out his work here. Grakn is a semantic graph solution which runs on top of Titan.
If you are looking for a sample on how to model the Concepts, Descriptions and Relationships into a Graph database. I have a sample project in Github that can upload the Snomed data into a Neo4j database.
https://github.com/pradeepvemulakonda/Snomed
Before you go into the implementation detail, I would suggest trying out the following Snomed data browser at
http://ontoserver.csiro.au/shrimp/
Once you get a feel of the concepts and relationships you can go through the implementation. You can use the following gist to understand how you can query the uploaded concepts and relationships in Neo4j.
https://neo4j.com/graphgist/95f4f165-0172-4b3d-981b-edcbab2e0a4b#listing_category=health-care-and-science
SNOMED can be loaded into MySQL using the UMLS (unified medical language system) released by NIH. Once loaded the table MRREL contains all the relations between SNOMED nodes. If you want load it right away in Neo4j you can totally skip the MySQL step and work directly with the UMLS RRF files. The RRF documentation format is not great but the files are easy to parse tabular text.
There are in fact three tables, Concepts, Descriptions and Relationships
You'll find them described here:
https://confluence.ihtsdotools.org/display/DOCTIG/3.1.+Components
Most important are the relations between Relationships and Concepts and Descriptions and Concepts.

Can I use this case in Neo4j database?

Hello I am going to make a project for the faculty I am trying to make web app like twoodo.com
so can I use Neo4j database in it? Can I save all conversations, dates, files, videos, photos, tasks, etc. or should I use another database? Can anyone guide me or help me. I am working with spring boot, angular too. Thanks in advance.
Neo4j can store different kinds of documents, but you would choose a graph database because of how the documents are related. Other databases might be better for storing certain kinds of data; for example, neo4j does not handle nested documents as well as mongo or couchdb. But neo4j is really good at linking and retrieving documents based on relationships. For example, here's Michael Hunger modeling the entire database of 10M stackoverflow questions: http://neo4j.com/blog/import-10m-stack-overflow-questions/ Check some of his queries at the bottom showing off what you can do with relationship queries. This kind of thing might be pretty solid in a twoodo app.

"Resultset too large (over 1000 rows)" in neo4j browser

I'm using neo4j 2.1.2 community edition. I have loaded the CSV file which is having 2500 rows and i have created nodes and relationships among the columns. When i run the below cypher query
match (n) return count(*);
I'll get the nodes count as 17275. So when i match the nodes like match (n) return n and try to get the corresponding graph in a neo4j browser, it says
Resultset too large (over 1000 rows)
I know it's due to the nodes requested is more than 1000. So if i want to see the complete graph in neo4j browser, how can i do it?
The same query i tried in the neo4j web-admin, i wan able to get the data in tabular format but i wanted to see the data as a graph.
Also I'm not able to find neo4j-Shell in my neo4j installation bin directory. Why is that?
Thanks
Update 1
The Neo4J Web UI is built on top of D3.js using SVG: due to SVG performances in a browser when you have more than 500 nodes in a network, the user experience starts to degrade quite quickly.
Handling more than 1000 nodes adds to the technical challenge: in fact with so many nodes what happens most of the time is the "hairball" effect.
This is a blog post that might be useful (disclaimer: I am a developer for KeyLines) about visualizing big network with some design hints.
As you can imagine visualizing more than 1000 nodes is not that easy and that's why some companies such Cambridge Intelligence (KeyLines), Tom Sawyer (Perspective) or Linkourius came up with specific products for that.
You can of course build the visualization yourself for fun with open source libraries but keep in mind that it can take a very long time.
If your Neo4J project is not commercial I can suggest to have a look to Gephi to visualize it: it is a Desktop Application and it has a Neo4J adapter plugin. It can easily handle huge datasets but of course it lacks the same portability of a webapp.
In case you need ONLY a storage for your graph/data than a visualization is not required, you're right.
Original Answer
I think you might have to implement a custom visualization too see such graph in the browser, using one option of those in this page: http://www.neo4j.org/develop/visualize .
Alternatively have a look to this most extensive list here: Big data visualization using "search, show context, and expand on demand" concept
Or maybe have a different visualization approach with one of the following: Data Visualization libraries
Look at settings in neo4j browser. You can change Graph Visualization how you like. But browser can work much slower if you wanna see the complete graph.

Visualizing graph database

Assuming i am working with neo4j, the only way i can think of that would visualize my mock up data is to generate cypher code and paste it into neo4j's data browser
Is there another (better, simplier?) way one can use to create visualization without using cypher? Generating cypher code seems like a complex enough task by itself.
Writing tests is of course another way of making sure relationships are set up right, but as i am learning the system, i'd like to visually see things to make sure they are set up as expected.
This gist contains an example on how to use the Neo4J Graphviz component to generate output in Graphviz DOT notation, which is supported by a range of graph visualizing software. (And of course Graphviz itself)
(Link to the original blog post where I found the example: http://blog.neo4j.org/2012/05/graph-this-rendering-your-graph-with.html)
There is a new solution to explore the content of a Neo4j graph database using a web browser: http://linkurio.us/
It allows you to search nodes by properties, inspect nodes, expand neighborhood...
Disclamer: I'm co-founder of Linkurious and Gephi.
There are some options listed on http://www.neo4j.org/develop/visualize also.

Resources