Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypher query to find all images with an associated neuronal class fails #22

Open
jefferis opened this issue Sep 1, 2024 · 1 comment

Comments

@jefferis
Copy link
Owner

jefferis commented Sep 1, 2024

This cypher example no longer works:

# Find all images with an associated neuronal class
q=paste0("MATCH (n:Class:VFB { label : 'neuron' })",
  "<-[:SUBCLASSOF*]-(p)<-[:INSTANCEOF]-(i:Individual) ",
  "RETURN distinct i.label, p.label;")
nclasses_image=vfb_neo4j_query(q)
nrow(nclasses_image)
head(nclasses_image)

@Robbie1977 @dosumis can you advise why? How should one do it now? Here is the formatted cypher query:

MATCH (n:Class:VFB { label : 'neuron' })<-[:SUBCLASSOF*]-(p)<-[:INSTANCEOF]-(i:Individual)
RETURN distinct i.label, p.label;
@dosumis
Copy link

dosumis commented Sep 1, 2024

Hi Greg,

It seems that the VFB semantic tag is no longer present. This works:

MATCH (n:Class { label : 'neuron' })<-[:SUBCLASSOF*]-(p)<-[:INSTANCEOF]-(i:Individual)
RETURN distinct i.label, p.label;

But you could also run

MATCH (p:Class:Neuron)<-[:INSTANCEOF]-(i:Individual:has_image)
RETURN distinct i.label, p.label

The :Neuron tag avoids having to query across the graph and :has_image avoids other data types.

For neurons with connectomics only

MATCH (p:Class:Neuron)<-[:INSTANCEOF]-(i:Individual:has_neuron_connectivity)
RETURN distinct i.label, p.label limit 5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants