Reconstructing the dendrogram shown in the transcriptomics explorer with R based on the .json file

Is there a way to easily reconstruct the dendrogram shown in the transcriptomics explorer of the “Whole Cortex and Hippocampus 10x” data set with R based on the information stored in the “Taxonomy of clusters” .json file?

Update: I succeeded to reconstruct the dendrogram based on the “Taxonomy of clusters” .json file. While the dendrogram looks correct with regard to labeling and grouping of clusters, the coordinates of the nodes seem to be slightly off (both x and y). I verified my code with another taxonomy .json file from you (http://htmlpreview.github.io/?https://github.com/AllenInstitute/nomenclature/blob/master/scripts/build_annotation_tables.nb.html) and using this .json file everything in the dendrogram seems fine. Is it possible that there are some mistakes in the “Taxonomy of clusters” .json file for the mouse whole cortex and hippocampus 10x data set?

Hi @Michael,

I’m glad to see that you were able to reconstruct the R dendrogram from the .json format. If this code is something you are willing to share, I think it would make an excellent addition to the nomenclature repo you linked above, as it complements the existing script for converting R formats to json.

Regarding the discrepancies in x and y coordinates, there are two possibilities that come to mind, after discussion with developers: (1) it could be because we don’t use the length of the nodes from the .json in the web browser, for readability reasons (impacting the heights) and (2) dendrograms are robust to rotation about a node and there might have been some changes at in the ordering of the types. #1 is for sure and I don’t think #2 is a concern, but it is possible.

Best,
Jeremy