Skip to content

REF: Remove celltype hardcoding from viz.py #1149

@asoplata

Description

@asoplata

Chetan's addition of metadata fields for different celltypes in #1099 has offered a great solution for the inconsistent customization in viz.py across celltypes. Different plotting functions can differ wildly, including reading or not reading a network's celltypes, assigning colors to celltypes explicitly or differently or using different colorschemes, allowing or not allowing support for subsets of celltypes (including with or without color-matching), etc. Therefore, I think the following work should be done:

  1. Our default cell metadata (located here
    cell_types = {
    ) should be refactored to outside of jones_2009_model() for use elsewhere such as in [MRG] fix: enable backwards-compatible hier JSON #1119 .
  2. Each celltype should have one color to be used consistently, and the same for its "marker" in some uses of viz.py
  3. viz.py's plotting functions should be updated so that they never make assumptions about celltypes (as much as possible, e.g. sorting alphabetically by celltype name), and they only ever read a celltype's colors instead of setting them inside the function itself.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions