Comments (5)
think that it would be good not to have tons of duplicated methods to deal with this; we could probably have a decorator that parses the input, check if value is a string, an int, a list of strings, or a list of ints, prepend a conversion if required, iterates if required, but then applies always a single method.
In the backend method we should always use either acronyms or regions ids - I would go for ids.
I like this. Definitively don't duplicate for list vs single items, methods should be flexible enough to deal with both.
I don't have any experience with decorators though so not sure how best to implement this.
If the region is the returned value (eg, get_region_name_from_coords(coords)), I would not duplicate methods for ids and names, but make it a possible keyword argument (get_region_from_coords(coords, as_name=True)).
Also good, as long as we have a coherent default behaviour. e.g if nothing is specified always return name.
Another thing: consistency with name
and acronym
, and with structure
and region
. I don't think we ever use the name it's usually id or acronym, so I'd avoid using name
in methods and kwargs. And yeah let's decide to always call brain region regions or structures, I know I'm guilty of using both in brainrneder and it can be a bit confusing.
from brainglobe-atlasapi.
Also good, as long as we have a coherent default behaviour. e.g if nothing is specified always return name.
Absolutely - default should be the default that we use internally. I would say id
.
Another thing: consistency with name and acronym, and with structure and region. I don't think we ever use the name it's usually id or acronym, so I'd avoid using name in methods and kwargs.
I agree. name
is shorter and at closer mental reach, but we generally mean acronym
. So either always acronym
or we replace acronym
->name
and name
->full_name
.
And yeah let's decide to always call brain region regions or structures, I know I'm guilty of using both in brainrneder and it can be a bit confusing.
Fully agreed! We went some length down the structure
way in the atlas generation, but if you guys like it I would move to region
before it's too late, so there's a more clear anatomical connotation - and less of an IT semantic field.
from brainglobe-atlasapi.
I agree with this stuff generally, sorry I'm not adding much, I'm pretty busy with other work.
use either acronyms or regions ids - I would go for ids.
I would also go for ids
We went some length down the structure way in the atlas generation, but if you guys like it I would move to region
I also vote structure. In cellfinder etc., I've vaguely tried to enforce:
- structure = specific brain structure (e.g. V1)
- region = vaguer concept (e.g. a segmented injection site, or some other volume defined within the brain, usually user defined)
from brainglobe-atlasapi.
I agree. name is shorter and at closer mental reach, but we generally mean acronym. So either always acronym or we replace acronym->name and name->full_name.
I'd prefer not because most atlases, and certainly the allen atlas, use acronym/id/name so I think we should do the same.
I don't mind between structure and region, but we should enforce it asap before we build up more code
from brainglobe-atlasapi.
Ok, I guess we have a consensus.
Let's keep acronym
/name
and consolidate structure
, I think @adamltyson point was valid here.
from brainglobe-atlasapi.
Related Issues (20)
- [Feature] Add Ambystoma mexicanum (axolotl) atlas
- Decide what to do with `atlas_generation/main_script` HOT 1
- deal with local and remote atlas versions in validate_atlases.py HOT 9
- validate_atlases.py additional_references error HOT 5
- Add updated version of the kim atlas HOT 1
- [Feature] flexibly generate atlases with different resolutions
- perens_atlas alignment trouble with new version [BUG] HOT 4
- perens_lsfm_mouse_20um_v1.1 is oriented incorrectly HOT 1
- Use pooch to download data
- User is informed (twice) that the atlas is not the latest when they're updating it
- The warning that an atlas is not the latest is missing a space
- Standardise the axial resolution of the allen spinal cord atlas HOT 1
- Save atlases to `.brainglobe/atlases`
- Atlases should be returned by `brainglobe list` in alphabetical order
- Enforce standardised orientation
- Atlas resolution as an attribute, not a name.
- Move atlas generation code out of the `brainglobe-atlasapi` package
- Ensure all tests are run
- Ensure tests do not affect local system when run locally.
- [BUG] Kim developmental atlases fail validation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brainglobe-atlasapi.