Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants