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

Add queries for dataset by content #71

Open
dosumis opened this issue Jul 14, 2020 · 3 comments
Open

Add queries for dataset by content #71

dosumis opened this issue Jul 14, 2020 · 3 comments

Comments

@dosumis
Copy link
Member

dosumis commented Jul 14, 2020

  • should this be via tagging, or by query of content?
@dosumis
Copy link
Member Author

dosumis commented Jul 14, 2020

Query for dataset by content (using labels on individuals)

MATCH (ds:DataSet) where (ds)<-[:has_source]-(:Individual:Neuron) return distinct ds

Query dataset by technique:

MATCH (ds:DataSet) where (ds)<-[:has_source]-(:Individual)
<-[:depicts]-(:Individual)-[:is_specified_output_of]->(:Class { label: 'confocal microscopy'})
 RETURN distinct ds

@dosumis
Copy link
Member Author

dosumis commented Jul 14, 2020

Dataset return could usefully include label badges - although these need to be reduced to some minimal set.

MATCH (ds:DataSet) 
WHERE ds.short_form = 'Xu2020Neurons' 
WITH ds MATCH (ds)<-[:has_source]-(i:Individual)
RETURN ds.short_form, ds.label, 
REDUCE(s = [], tags IN COLLECT(distinct labels(i)) | s + tags)
ds.short_form ds.label REDUCE(s = [], tags IN COLLECT(distinct labels(i)) | s + tags)
Xu2020Neurons JRC_FlyEM_Hemibrain neurons Version 1.0.1 [Individual, VFB, _Individual, Neuron, Anatomy, Cell, Entity, Individual, VFB, _Individual, Neuron, Anatomy, Cell, Octopaminergic, Entity, Individual, VFB, _Individual, Neuron, Anatomy, Cell, Glutamatergic, Entity, Individual, VFB, _Individual, Neuron, Sensory_neuron, Peptidergic_neuron, Anatomy, Cell, Entity, Individual, VFB, _Individual, Neuron, Anatomy, Cell, GABAergic, Entity, Individual, VFB, _Individual, Neuron, Anatomy, Cell, Dopaminergic, Entity, Individual, VFB, _Individual, Neuron, Anatomy, Cell, Cholinergic, Entity, Individual, VFB, _Individual, Neuron, Anatomy, Cell, Serotonergic, Entity, Individual, VFB, _Individual, Neuron, Anatomy, Cell, GABAergic, Octopaminergic, Entity]
ds.short_form ds.label REDUCE(s = [], tags IN COLLECT(distinct labels(i)) | s + tags)
Xie2018 Split GAL4 lines for dopaminergic neurons, Xie2018 [Individual, VFB, _Individual, Anatomy, Expression_pattern, Split, Entity]

(can be made into non-redundant set with APOC - trickier to do without APOC).

@dosumis
Copy link
Member Author

dosumis commented Jul 14, 2020

With APOC

MATCH (ds:DataSet) 
WHERE ds.short_form = 'CarreiraRosario2018' 
WITH ds MATCH (ds)<-[:has_source]-(i:Individual)
RETURN ds.short_form, ds.label, 
apoc.coll.toSet(REDUCE(s = [], tags IN COLLECT(distinct labels(i)) | s + tags)) as ulabs
ds.short_form ds.label ulabs
"CarreiraRosario2018" "CarreiraRosario2018" ["Entity", "Cell", "Individual", "Anatomy", "Nervous_system", "Neuron", "Larva", "Cholinergic"]

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

No branches or pull requests

1 participant