Download the CIDO ontology from the BioPortal: https://bioportal.bioontology.org/ontologies/CIDO
In a terminal, after unpacking the owl2lpg-translation-cli package:
./run.sh translate -f csv /path/to/ontology/cido.owl > cido.csv
In Neo4j Browser:
Load the CSV files using the APOC library
CALL apoc.import.csv(
[{fileName: 'file:/path/to/csv/project-node.csv', labels: []},
{fileName: 'file:/path/to/csv/branch-node.csv', labels: []},
{fileName: 'file:/path/to/csv/ontology-document-node.csv', labels: []},
{fileName: 'file:/path/to/csv/entity-node.csv', labels: []},
{fileName: 'file:/path/to/csv/iri-node.csv', labels: []},
{fileName: 'file:/path/to/csv/literal-node.csv', labels: []},
{fileName: 'file:/path/to/csv/anonymous-individual-node.csv', labels: []},
{fileName: 'file:/path/to/csv/language-tag-node.csv', labels: []},
{fileName: 'file:/path/to/csv/propertyless-node.csv', labels: []}],
[{fileName: 'file:/path/to/csv/propertyless-edge.csv', type: ''}],
{});
In Neo4j Browser:
a. Remove the residual __csv_id
property created by the apoc.import.csv
method
MATCH (n) WHERE EXISTS(n.__csv_id) REMOVE n.__csv_id
b. Remove the residual __csv_type
property created by the apoc.import.csv
method
MATCH ()-[r]->() WHERE EXISTS(r.__csv_type) REMOVE r.__csv_type
In Neo4j Browser:
a. Add the augmented edges for class expression parents (later it will be automatic)
MATCH (sub)<-[:SUB_CLASS_EXPRESSION]-(:SubClassOf)-[:SUPER_CLASS_EXPRESSION]->(super:ClassExpression)-[:CLASS_EXPRESSION]->(filler)
MATCH (super)-[:OBJECT_PROPERTY_EXPRESSION]->(property)
MERGE (sub)-[:RELATED_TO {iri:property.iri, type:'ObjectProperty'}]->(filler)
b. Add the augmented edges for annotation assertions (later it will be automatic)
MATCH (axiom:AnnotationAssertion)-[:ANNOTATION_PROPERTY]->(prop:AnnotationProperty)
MATCH (axiom)-[:ANNOTATION_SUBJECT]->(subject)
MATCH (axiom)-[:ANNOTATION_VALUE]->(literal)
MERGE (subject)-[:RELATED_TO {iri:prop.iri, type:'AnnotationProperty'}]->(literal)
MERGE (subject)-[:IS_SUBJECT_OF]->(axiom)
In Neo4j Browser:
a. Create an index on the Class
.iri
property
CREATE INDEX FOR (n:Class) ON (n.iri)
b. Create an index on the IRI
.iri
property
CREATE INDEX FOR (n:IRI) ON (n.iri)