GithubHelp home page GithubHelp logo

Comments (5)

FedeClaudi avatar FedeClaudi commented on May 23, 2024

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.

vigji avatar vigji commented on May 23, 2024

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.

adamltyson avatar adamltyson commented on May 23, 2024

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.

FedeClaudi avatar FedeClaudi commented on May 23, 2024

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.

vigji avatar vigji commented on May 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.