-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexampleMain.m
153 lines (130 loc) · 5.16 KB
/
exampleMain.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
%% ----------------- Developing Human ---------------------------
target_region_acronym = { 'FroL', 'ParL','TemL','OccL','CgG','PHG','HiF','M','CbSS','PnSS','MOSS'};
target_region_colors = { 'ff0000','f00000','030000','000900','00c000','00ff00','00ff0f','00ffc0','00ffff','0fffff','c0ffff'};
colorRegions(target_region_acronym, target_region_colors, 'ontology/developing_human.csv', 'human_output.csv');
! python2.7 colorize.py --inputfile human_output.csv --outputfolder output_folder --svgdirectory developing_human_atlas_svg
%% ----------------- Human ---------------------------
target_region_acronym = { 'FroL', 'ParL','TemL','OccL','CgG','PHG','HiF','M','CbSS','PnSS','MOSS'};
target_region_colors = { 'ff0000','f00000','030000','000900','00c000','00ff00','00ff0f','00ffc0','00ffff','0fffff','c0ffff'};
colorRegions(target_region_acronym, target_region_colors, 'ontology/brodmann_human.csv', 'brodmann_human_output.csv');
! python2.7 colorize.py --inputfile brodmann_human_output.csv --outputfolder output_folder --svgdirectory brodmann_human_atlas_svg
%% ----------------- Mouse ---------------------------
target_region_acronym = {'Isocortex','OLF','HIP','RHP','STR','PAL','HY','TH','MB','CB','P','MY'};
% target_region_colors = { 'ff0000','f00000','030000','000900','00c000','00ff00','00ff0f','00ffc0','00ffff','0fffff','c0ffff','0f0f0f'};
expressionLevel = 1:length(target_region_acronym);
hot_scale = hot;
hot_scale = hot_scale(10:end-2,:);
target_region_colors = mapValuesToColorScale(expressionLevel, hot_scale);
target_region_colors = colorTripletToHex(target_region_colors);
colorRegions(target_region_acronym, target_region_colors, 'ontology/mouse.csv','mouse_output.csv');
! python2.7 colorize.py --inputfile mouse_output.csv --svgfile mouse_atlas_svg/mouseSagittal.svg > Mouseoutput.svg
! python2.7 colorize.py --inputfile mouse_output.csv --svgdirectory mouse_atlas_svg --outputfolder output_folder
imagesc(expressionLevel);
colormap(hot_scale);
colorbar();
%% -------------------------------- Human regions ------------------------------------
% copy paste the ontology tree from: http://atlas.brain-map.org/atlas?atlas=138322605
% -----------------------------------------------------------------------------------
%
% NT neural tube
% Br brain
% F forebrain (prosencephalon)
% FGM gray matter of forebrain
% FWM white matter of forebrain
% FV ventricles of forebrain
% FSS surface structures of forebrain
% CeS cerebral sulci
% HaTr habenular triangle
% InF infundibular stalk
% CeG cerebral gyri and lobules
% FroL frontal lobe
% ParL parietal lobe
% TemL temporal lobe
% OccL occipital lobe
% InL insular lobe
% LimL limbic lobe
% CgG cingulate gyrus
% IsCPH cingulo-parahippocampal isthmus
% SCG subcallosal gyrus (parolfactory gyrus)
% PTG paraterminal gyrus
% PHG parahippocampal gyrus
% HiF hippocampal gyrus (formation)
% MB mammillary body
% APS anterior perforated substance
% TPUJ temporopolar uncal junction
% TN tentorial notch
% TC tuber cinereum
% LI limen insula
% ASFV adjoining structures of forebrain ventricles
% PrN preoccipital notch
% M midbrain (mesencephalon)
% MGM gray matter of midbrain
% MWM white matter of midbrain
% MV ventricle of midbrain
% MSS surface structures of midbrain
% H hindbrain (rhombencephalon)
% HGM gray matter of the hindbrain
% HWM white matter of hindbrain
% HV ventricles of hindbrain
% HSS surface structures of hindbrain
% CbSS surface structures of cerebellum
% PnSS surface structures of pons
% MOSS surface structures of medulla
% SpC spinal cord
%% -------------------------------- Mouse regions ------------------------------------
% copy paste the ontology tree from: http://atlas.brain-map.org/atlas#atlas=2&plate=100883921
% -----------------------------------------------------------------------------------
% grey Basic cell groups and regions
% CH Cerebrum
% CTX Cerebral cortex
% CTXpl Cortical plate
% Isocortex Isocortex
% FRP Frontal pole, cerebral cortex
% AI Agranular insular area
% PTLp Posterior parietal association areas
% VISC Visceral area
% PL Prelimbic area
% SS Somatosensory areas
% TEa Temporal association areas
% VIS Visual areas
% ACA Anterior cingulate area
% ORB Orbital area
% RSP Retrosplenial area
% PERI Perirhinal area
% GU Gustatory areas
% MO Somatomotor areas
% ILA Infralimbic area
% ECT Ectorhinal area
% AUD Auditory areas
% OLF Olfactory areas
% HPF Hippocampal formation
% CTXsp Cortical subplate
% 6b Layer 6b, isocortex
% CLA Claustrum
% EP Endopiriform nucleus
% LA Lateral amygdalar nucleus
% BLA Basolateral amygdalar nucleus
% BMA Basomedial amygdalar nucleus
% PA Posterior amygdalar nucleus
% CNU Cerebral nuclei
% STR Striatum
% PAL Pallidum
% BS Brain stem
% IB Interbrain
% TH Thalamus
% HY Hypothalamus
% MB Midbrain
% HB Hindbrain
% P Pons
% MY Medulla
% CB Cerebellum
% CBX Cerebellar cortex
% VERM Vermal regions
% HEM Hemispheric regions
% CBXmo Cerebellar cortex, molecular layer
% CBXpu Cerebellar cortex, Purkinje layer
% CBXgr Cerebellar cortex, granular layer
% CBN Cerebellar nuclei
% FN Fastigial nucleus
% IP Interposed nucleus
% DN Dentate nucleus