-
Notifications
You must be signed in to change notification settings - Fork 3
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
Limit thalamus region dirvecs to specific regions #27
Limit thalamus region dirvecs to specific regions #27
Conversation
This replaces the region selection of what region direction-vectors are made for in thalamus with a regular expression. This was scientifically necessary for exclusion of the habenular and peripeduncular regions, and code-wise so that the thalamus region selection regex can be harmonized across all uses. For information on which regions were chosen and how this list was created, see the internal BBP Confluence page located at "Circuits > Mouse Thalamus > Atlas-based Whole-thalamus subregion selection". This regex has been built from the region list of the desired and present thalamus regions as of the "final" version of the hierarchy and annotation built by the Atlas pipeline, which is the output of the rule `split_barrel_ccfv3_l23split`.
This updates the regular expression used for thalamus placement-hints to be in a different format that has been tested successfully, excludes habenular and peripeduncular subregions, and to be valid for the hierarchy/annotation used at its appropriate step in the Atlas pipeline. For information on which regions were chosen and this list was created, see the internal BBP Confluence page located at "Circuits > Mouse Thalamus > Atlas-based Whole-thalamus subregion selection". This regex has been built from the region list of the desired and present thalamus regions as of the "final" version of the hierarchy and annotation built by the Atlas pipeline, which is the output of the rule `split_barrel_ccfv3_l23split`. This change is meant to go in tandem with BlueBrain/atlas-direction-vectors#27 .
I don't know why some of the tests are failing, but this is a small change, and should be able to be integrated with no problems. This should not interfere with any tests specifically. |
|
@asoplata , to understand the long list of subregions, you just don't want three of them, right? PP, LH and MH? I could be simpler to not have these, instead of the entire list of the ones you want, no? |
It seems LH and MH are under EPI, with also has PIN, but this one you don't have in the list, and you don't mention as you don't want in the confluence page. I guess you don't want EPI, right? |
@arnaudon In theory, yes, it would be simpler to structure my query so that it gives me all of TH except for the subregions I do not want to include. However, as far as I can tell, I can't do this from using a simpler query. As a test case, if I pass the following query to
then I get back an If I add to this query that I want to exclude PP, like the following:
then I get back an However, if I want to get the ids of all TH subregions, except for some, then it seems that this exclusion method doesn't work. For example, if I use the same query as above, except change
then I get an I focus on the query in this case since the list of subregions is used in many different Atlas and circuit building steps, which are in the Confluence doc. Being able to use the same regex in different code places, all of which are ultimately using |
My addition broke the tests because the thalamus regions in the tests weren't included in my subregion query. This has been fixed. I also made the changes necessary to pass all the `tox` tests, including linting, formatting, and general tests.
Yes, I realised the same, so I wrote a little code to get the long regex to play with:
|
* Overhaul the thalamus into steps, and add docs Load thalamus meshes from CLI input, clean CLI * Improve Blender instructions * Change thalamus region list regex This updates the regular expression used for thalamus placement-hints to be in a different format that has been tested successfully, excludes habenular and peripeduncular subregions, and to be valid for the hierarchy/annotation used at its appropriate step in the Atlas pipeline. For information on which regions were chosen and this list was created, see the internal BBP Confluence page located at "Circuits > Mouse Thalamus > Atlas-based Whole-thalamus subregion selection". This regex has been built from the region list of the desired and present thalamus regions as of the "final" version of the hierarchy and annotation built by the Atlas pipeline, which is the output of the rule `split_barrel_ccfv3_l23split`. This change is meant to go in tandem with BlueBrain/atlas-direction-vectors#27 . * Update layer names to be Atlas-Pipeline-compatible * Fix formatting errors * Attempt to update tests for new thal workflow * Replace part of test anno with region in metadata * fix test + format * format * Fix final linting issues This does a lot of small things for passing the linting. For mypy, I had to add additional ignores for the Trimesh returned types, since the ignore on the module as a whole wasn't preventing mypy from expecting `load_mesh` to return a Geometry object, which is a grandparent of Trimesh objects. I don't know if Trimesh changed their API, I couldn't figure it out from the docs, and I don't know why mypy was raising this now. In all the cases I could test or see, a proper "Trimesh" object was returned instead of the more generic Geometry. I don't think we need to worry about this. For the pylint disable W0613 (unused-argument), I needed some polymorphism for the thalamus case, but I wasn't sure how to handle that alongside the linters' type-checking. I think this is the simplest solution and is harmless. Everything else is minor. * Make Alexis changes to CLI * Apply MG code review changes --------- Co-authored-by: Austin E. Soplata <[email protected]> Co-authored-by: arnaudon <[email protected]>
This replaces the region selection of what region direction-vectors are made for in thalamus with a regular expression. This was scientifically necessary for exclusion of the habenular and peripeduncular regions, and code-wise so that the thalamus region selection regex can be harmonized across all uses. For information on which regions were chosen and how this list was created, see the internal BBP Confluence page located at "Circuits > Mouse Thalamus > Atlas-based Whole-thalamus subregion selection". This regex has been built from the region list of the desired and present thalamus regions as of the "final" version of the hierarchy and annotation built by the Atlas pipeline, which is the output of the rule
split_barrel_ccfv3_l23split
.