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

WIP Convert query to nodesets #223

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GianlucaFicarelli
Copy link
Contributor

WIP

This is an initial experiment to convert a query to node_sets, to be able to use libsonata to get the ids.

Possible benefits:

  • it seems faster than using multiple masks on a Pandas DataFrame, even when reading from hdf5 files
  • it doesn't need to load in memory properties that are needed only for filtering

Limitations:

  • some complex queries containing $and cannot be easily expressed using node_sets, unless converted to some longer and probably inefficient form.

Example:

{
    "$and": [
        {"node_id": [1, 2, 3]},
        {"$or": [{"mtype": "L6_Y"}, {"morphology": "morph-B"}]},
        {"$or": [{"region": "AAA"}, {"synapse_class": "EXC"}]},
    ]
}

@GianlucaFicarelli GianlucaFicarelli marked this pull request as draft June 14, 2023 14:10
@GianlucaFicarelli GianlucaFicarelli force-pushed the convert_query_to_nodesets branch from 1fd44cf to 3262bbd Compare June 14, 2023 14:16
@codecov-commenter
Copy link

Codecov Report

Merging #223 (3262bbd) into master (2da1c6d) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #223   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           29        29           
  Lines         2163      2191   +28     
=========================================
+ Hits          2163      2191   +28     
Flag Coverage Δ
pytest 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
bluepysnap/query.py 100.00% <100.00%> (ø)

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

Successfully merging this pull request may close these issues.

2 participants