Add deterministic explicit morphology locations - #818
Open
ilkilic wants to merge 12 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
4 tasks
james-isbister
left a comment
Collaborator
There was a problem hiding this comment.
Looks good. Just one suggestion
| ) | ||
| segment_start = 0.0 if segment_id == 0 else float(cumulative_lengths[segment_id - 1]) | ||
|
|
||
| path_distance = distance_on_section |
Collaborator
There was a problem hiding this comment.
Probably we can reuse path_distance_all_segments_from in the library for calculating the path distance
Contributor
Author
There was a problem hiding this comment.
Good point, I reused path_distances directly since we only need the distance for one segment here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implement #769
Add deterministic morphology targeting through a new
ExplicitMorphologyLocationsblock.Locations are represented as a non-empty collection of:
The block supports both single and multiple explicit locations.
Implementation
MorphologyLocationPointas a nested model.ExplicitMorphologyLocationsas the only new user-facing block.section_idis a non-negative integer.offsetis between0.0and1.0.points_on()is called.Section ID convention
Locations use SONATA global section IDs:
0: soma1..N: neurite sections in MorphIOnrn_orderTherefore, SONATA neurite section ID
Nmaps to MorphIO sectionN - 1.The generated dataframe is compatible with existing random morphology locations and contains
section_idandnormalized_section_offsetfor compartment-set materialization.Additional fix
Fix normalized section-offset/path-distance calculations for random morphology locations
Tests
Added coverage for:
Compartment-set materialization is provided by the dependent infrastructure in PR #498.