Cell density as a function of cortical depth

Hello,

I am new to the community so please forgive any faux pas.

I am looking to perform an automated cell count of in-situ hybridization labelled cells in the human cortex. More specifically, I would like to produce a density plot that communicates the pattern of labeling across the 6 cortical layers. Please find attached one of my ISH images and an example of the plot I would like to produce.

I would appreciate any information regarding what programs to use and process.

Thank you,
Keon

Good day Keon!

The attachments are apparently missing.

Please post typical unprocessed images in the original TIF- or PNG-format.
No JPG-format though, because JPG introduces artifacts!
(Converting a JPG-compressed image to TIFF- or PNG-format doesn’t make sense.)
You may also post images as Zip-archives or make them accessible via a dropbox-like service.

Regards

Herbie

Ah, forgive my omission!

In the google drive link below I’ve included one of the full cortical slices we’re looking at, a cropped sample of the laminar surface, and an example of the type of plot I’m trying to make (minus the automated detection of laminar boundaries, although that would be nice).

https://drive.google.com/open?id=1xyL_cxYzUtgfn8kVhrbx2YyPzIWU5XOU

We obtains our ISH images from the Allen Human Brain Atlas, which only allows images to be downloaded in the JPG format. I have contacted them regarding alternative file types, but in the meantime I will be working with these images.

Thank you,
Keon

Keon,

tomorrow I shall have a look at your data.

Regards

Herbie

PS:
For the time being you may just do a horizontal projection of the slice onto the vertical axis (look for “Plot Profile”). You can additionally either smooth the image (look for “Guassian Blur…”) or the resulting 1D-projection curve.
Please study the ImageJ User Guide where both operations are described.

1 Like

Hello Herbie,

Thank you very much for your suggestion! It has helped immensely. Beyond using a Gaussian blur on my image, I was wondering how you would suggest smoothing the plot profile.

Additionally, rather than using the grey value, is there a more quantitative way to go about this?

You help is much appreciated,
Keon

Not bad Keon!

In principle there is little difference whether you smooth the image or the plot.
However, there are various kinds of low-pass filters that can be applied in both scenarios. Lowpass-filtering the 1D-signal requires a macro. The easiest way of filtering it is by a running window which however is far from a Gauss-filter …

I had problems with dowloading the “ISH_ERBB3_M_28_2_80354361.jpg”. It was or became corrupted. Perhaps you could simply give us the link, if the image stems from a generally accessible atlas.

Additionally, rather than using the grey value, is there a more quantitative way to go about this?

This I don’t understand.
I fear you need to be more specific and perhaps tell us why you think that projections are not quantitative (enough).
I’m pretty sure the plots shown in the schematic image “Capture.PNG” have been obtained in this way.

Regards

Herbie

Hello again,

I’m sorry to hear that you are having trouble downloading my images. Please follow this link to find the full-sized cortical slices we’re looking at (on the left hand viewer), and I also will attach the cropped sample I’m using above: http://human.brain-map.org/ish/specimen/show/79947031?gene=2050

The reason I mentioned wanting “something more quantitative” is because the schematic image I uploaded earlier went about this process differently. It was taken from a figure in the following paper: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5113791/

They used the following methods: “Neuronal somata were automatically identified using Surface Module of IMARIS software (IMARIS 7.71; Bitplane) and extracted to a table of [x,y,z] coordinates. Laminar boundaries were automatically identified based on density of cell bodies with custom routines written in Matlab. For this calculation, soma locations from two to three consecutive 50‐μm sections were aligned and collapsed across the z‐plane (coronal) using the pial surface as a reference. The local density in a sliding 25‐μm window was computed to generate a density image. The stereotypical changes in density, alternating low–high from layers 1–6 were identified by finding the peaks in the derivative of the density in 25‐μm sliding windows, corresponding to the transitions from high‐to‐low or low‐to‐high density.”

While I don’t have access to IMARIS and I’m not using z-stacks (at the moment), I had initially hoped to use a sliding window to generate a cell density plot, as described above. I am, however, nescient as to whether this method is better than using projections. Please forgive me if I have misunderstood anything.

Best regards,
Keon

The local density in a sliding 25‐μm window was computed to generate a density image.

This is essentially the same as the projection if your selection* or image windown is 25‐μm wide. The horizontal projection is nothing else than summing all values along parallel horizontal straight lines. The projections ImageJ produces are means, i.e. the sums are divided by the length of the lines, i.e. by the selection width.

*Please note that you need to make a selection to get the projection and the selection need not be as wide as the image. This means that you could move a (slim) selection from left to right and produce projections for every position of the selection. This is tedious to perform manually but easy to achieve by an ImageJ-macro.

Regards

Herbie

PS:
I can confirm the result you’ve obtained after Gauss-filtering of the above sample image. I think this is the way to go. Actually, I’ve first converted the Nissl-kind stained section to 32 bit gray-scale, and you may experiment with using certain color channels only (e.g. Magenta), but it won’t make a great difference …

CellProfiler doesn’t make line plots of the kind you describe, so if that’s the exact graph you need I’m afraid it wouldn’t help. If you want to segment the cells and then graph the Y centers, probably a 3 module pipeline is simple enough- UnmixColors, IdentifyPrimaryObjects, ExportToSpreadsheet. Good luck!