ChristophKirst / ClearMap

ClearMap is a python toolbox for the analysis and registration of volumetric data from cleared tissues.
http://christophkirst.github.io/ClearMap/build/html/index.html
GNU General Public License v3.0
49 stars 41 forks source link

Anyone tried using the ABA Mouse CCF v3 as Atlas and Annotation files? #26

Open auesro opened 5 years ago

auesro commented 5 years ago

It can be found here in format .nrrd:

http://download.alleninstitute.org/informatics-archive/current-release/mouse_ccf/annotation/ccf_2017/

So far the resampling and aligning works well, but the heatmaps are empty...

auesro commented 5 years ago

Apparently, it is not going to work because the new CCF has a different annotation structure thn the annotation file provided by Renier et al. ClearMap functions expect a specific format...now...anyone has an idea on how to read/modify the annotation files or, conversely, modify the code?

vzickus commented 5 years ago

Can you give examples of differences? They are both .nrrd files, correct?

auesro commented 5 years ago

Hi Vytas,

Yes, they are both .nrrd files. The differences are in the way they have been annotated. From what I can gather, CCF v3 (the one from 2017, with more structures and finer divisions) used a different structure tree: -Go to the Clearmap resources folder (https://idiscodotinfo.files.wordpress.com/2016/05/clearmap_ressources_mouse_brain.zip). -Open the Regions IDs file. -Lets have a look at the columns and their order: "id, name, acronym, red, green, blue, structure_order, parent_id, parent_acronym" -Now lets have a look at the structure of the new atlas (accessing it through the allensdk): "acronym, rgb_triplet, graph_id, graph_order, id, name, structure_id_path, structure_set_ids"

As an example, lets compare what the region Cerebrum shows in each annotation file: -Clearmap provided: "567, Cerebrum, CH, 176, 240, 255, 200, 8, grey" -CCF v3: "CH, [176, 240, 255], 1, 2, 567, Cerebrum, [997, 8, 567], [112905828, 691663206, 12, 184527634, 112905813, 114512891, 114512892]"

So clearly the structure of the annotation files have changed and Clearmap is not prepared to understand it, I guess thats why I dont get any cell at all in the heatmaps using the provided test files (saline, haloperidol) while it works perfectly using the provided annotation.

Of course, the idea of being able to use other annotation files in Clearmap (apart from the fact of gaining precision with the newer, more refined atlases) would open the possibility use it for other animal models.

vzickus commented 5 years ago

Thanks for the summary. I'm just speculating at this point, as without trying it's hard to say how involved it would be, but I think in principle you should be able to modify Label.py to use the structure of the new atlas. The fact that the new version has finer "resolution" should not matter.

auesro commented 5 years ago

Thanks for the input. With finer resolution, I didnt mean the atlas resolution, but the finer subdivisions between brain areas made possible by the updated allen brain atlas. I will give it a try.

vzickus commented 5 years ago

Just for clarity - yes that's what I meant by "resolution" (hence the quotation marks), so I don't think it should matter and the collapse function should still work with more regions.

auesro commented 5 years ago

I had a look at the Label.py and the ARA2_annotation files provided in the Data folder of Clearmap. I assume that apart from modifying the Label.py code to take in the new annotation.nrrd file structure, I will also need to create the equivalents to ARA2_annotation_info.csv, ARA2_annotation_info_collapse.csv and ARA2_annotation_statistics.csv, right?