AllenInstitute / neuron_morphology

Tools for working with single-neuron morphological reconstructions
https://neuron-morphology.readthedocs.io/en/latest/
Other
19 stars 8 forks source link

Compute features outside visual areas #194

Open wbwakeman opened 3 years ago

wbwakeman commented 3 years ago

For some cortical regions outside of VIS the neuron_morphology package can not properly generate layer aligned histograms, features and thumbnails due to the lack of layer 4 (agranular cortex) in these regions. Additionally as we move to generating morphologies for subcortical regions we will need to alter the package further to handle morphologies from nuclei rather than cortex.

https://app.zenhub.com/files/131210670/b556bc9b-67f1-4855-b04d-8989c68a8925/download

Q1. Will there be some way to identify the cells that are near agranular regions before they reach our pipeline, or will we need to automatically detect if it is? (e.g. tags, etc) A1. Each cell has a structure call in LIMS which could be used to indicate agranular cortex or not, alternatively one could look for the lack of a layer 4 polygon in the layer drawings on the 20x image.

Q2. Likewise, will there be a way to identify non-cortical cells before they reach our pipeline? A2. Same as above, the structure column in LIMS is how we indicate region.

Q3. For plotting and creating thumbnails, what is the plot for the agranular cells? Plot them un-normalized? Remove layer 4 and rescale the horizontal portion of the plot where layer 4 doesn't exist? (e.g. remove layer 4 and rescale the left half of the plot on slide 2) A3. Agranular cortex cells should be plotted in a normalized space for agranular cortex using the same layer alignment that we do for VISp cells but using the average agranular layer template instead. I believe Nathan initially calculated the average template for granular/VIS cortex and might be able to provide insight on how he did it.

Q4. How should the non-cortex cells be plotted? A4. Rachel's group to discuss further

Q5. For creating the histogram for agranular cells, what is the desired behavior? Just make sure layer 4 has zero nodes? (I think this is how it is currently done, but will double check) A5. Histograms for agranular cortex should not have L4 and be plotted on the average layer template.

Q6. How should we create the plots and bins for the histogram for cells that are partially in the agranular region and partially not (e.g. the cell in your powerpoint example, where layer 4 disappears halfway through it)? Some options I'm thinking of:

  1. Split plot into two, with one part being agranular template and other VISp (the horizontal lines would change partway through the plot), transition corresponds to vertical edge of layer 4.
  2. Figure out which portion has the most volume (most nodes), and treat the entire cell that way, extrapolating layer boundaries past their polygons (seems difficult to implement, not sure if scientifically valid)
  3. Something else... 1 seems easier for plotting than 2 because 2 would require boundary extrapolation, but might introduce weirdness into the feature calculations (but then again, maybe that's desired...)

    For feature calculations, if we go with option 2 all nodes would be binned on the same template, so no weirdness or changes.

    If we go with option 1, then the nodes in the agranular region would just not be binned in the layer 4 bins. That'd mean cells on the boundary of the regions would have unusual layer features, even if they looked the same as cortical or agranular cells (e.g. same dimensions, spatial node distribution, etc)

A6. We are leaning towards option 2. While figuring out how to extrapolate the drawn layers might be annoying after that things should be smooth sailing/require no changes.