-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathPieColors.m
101 lines (97 loc) · 3.44 KB
/
PieColors.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
function [PieColors, NickNames] = PieColors(ClassNames)
non_neuron = hsv2rgb([0 0 1]);
pc_or_in = hsv2rgb([.4 .5 .5]);
pc = hsv2rgb([1/3 1 1]);
pc2 = hsv2rgb([1/4 1 .9]);
in_general = hsv2rgb([2/3 1 1]);
sst = hsv2rgb([.55 1 1]);
pvalb = hsv2rgb([.7 .8 1]);
ngf = hsv2rgb([.85 1 1]);
cnr1 = hsv2rgb([ 1 1 1]);
vip = hsv2rgb([ .15 1 1]);
cxcl14= hsv2rgb([.1 1 .6]);
proj = hsv2rgb([1/12 1 1]);
NickNamesColors = {...
'Astro.1', 'Non Neuron', non_neuron; ...
'Astro.2', 'Non Neuron', non_neuron; ...
'Astro.3', 'Non Neuron', non_neuron; ...
'Astro.4', 'Non Neuron', non_neuron; ...
'Astro.5', 'Non Neuron', non_neuron; ...
'Cacna2d1.Lhx6.Reln', 'MGE NGF', ngf; ...
'Cacna2d1.Lhx6.Vwa5a', 'Ivy', ngf; ...
'Cacna2d1.Ndnf.Cxcl14', 'CGE NGF', ngf; ...
'Cacna2d1.Ndnf.Npy', 'CGE NGF', ngf; ...
'Cacna2d1.Ndnf.Rgs10', 'CGE NGF', ngf; ...
'Calb2.Cntnap5a.Igfbp6', 'IS1', vip; ...
'Calb2.Cntnap5a.Rspo3', 'IS1', vip; ...
'Calb2.Cntnap5a.Vip', 'IS1', vip; ...
'Calb2.Cryab', 'IS1', vip; ...
'Calb2.Vip.Gpd1', 'IS3', vip; ...
'Calb2.Vip.Igfbp4', 'IS3', vip; ...
'Calb2.Vip.Nos1', 'IS3', vip; ...
'Cck.Calca', 'Cck', cnr1; ...
'Cck.Cxcl14.Calb1.Igfbp5', 'Cck Cxcl14', cnr1; ...
'Cck.Cxcl14.Calb1.Kctd12', 'Cck Cxcl14', cnr1; ...
'Cck.Cxcl14.Calb1.Tac2', 'Cck Cxcl14', cnr1; ...
'Cck.Cxcl14.Calb1.Tnfaip8l3', 'Cck Cxcl14', cnr1; ...
'Cck.Cxcl14.Slc17a8', 'Cck Cxcl14 Slc17a8', cnr1; ...
'Cck.Cxcl14.Vip', 'Cck Cxcl14 Vip', cnr1; ...
'Cck.Lmo1.Npy', 'Cck Vip', cnr1; ...
'Cck.Lmo1.Vip.Crh', 'Cck Vip', cnr1; ...
'Cck.Lmo1.Vip.Fam19a2', 'Cck Vip', cnr1; ...
'Cck.Lmo1.Vip.Tac2', 'Cck Vip', cnr1; ...
'Cck.Lypd1', 'Cck', cnr1; ...
'Cck.Sema5a', 'Cck', cnr1; ...
'Choroid', 'Non Neuron', non_neuron; ...
'Endo', 'Non Neuron', non_neuron; ...
'Eryth.1', 'Non Neuron', non_neuron; ...
'Eryth.2', 'Non Neuron', non_neuron; ...
'Microglia.1', 'Non Neuron', non_neuron; ...
'Microglia.2', 'Non Neuron', non_neuron; ...
'Ntng1.Chrm2', 'Trilaminar', proj; ...
'Ntng1.Rgs10', 'Rad retrohip', proj; ...
'Ntng1.Synpr', 'Proj', proj; ...
'Oligo.1', 'Non Neuron', non_neuron; ...
'Oligo.2', 'Non Neuron', non_neuron; ...
'Oligo.3', 'Non Neuron', non_neuron; ...
'Oligo.4', 'Non Neuron', non_neuron; ...
'Oligo.5', 'Non Neuron', non_neuron; ...
'PC.CA1.1', 'PC', pc; ...
'PC.CA1.2', 'PC', pc; ...
'PC.CA1.3', 'PC', pc; ...
'PC.CA2', 'PC CA2', pc2; ...
'PC.CA3', 'PC CA3', pc2; ...
'Pvalb.C1ql1.Cpne5', 'AAC', pvalb; ...
'Pvalb.C1ql1.Npy', 'AAC', pvalb; ...
'Pvalb.C1ql1.Pvalb', 'AAC', pvalb; ...
'Pvalb.Tac1.Akr1c18', 'BC', pvalb; ...
'Pvalb.Tac1.Nr4a2', 'BC', pvalb; ...
'Pvalb.Tac1.Sst', 'BC', pvalb; ...
'Pvalb.Tac1.Syt2', 'BC', pvalb; ...
'Sst.Cryab', 'Sst', sst; ...
'Sst.Erbb4.Crh', 'O-Bi', sst; ...
'Sst.Erbb4.Rgs10', 'O-Bi', sst; ...
'Sst.Erbb4.Th', 'O-Bi', sst; ...
'Sst.Nos1', 'Nos1', sst; ...
'Sst.Npy.Cort', 'HSept', sst; ...
'Sst.Npy.Mgat4c', 'HSept', sst; ...
'Sst.Npy.Serpine2', 'HSept', sst; ...
'Sst.Npy.Zbtb20', 'HSept', sst; ...
'Sst.Pnoc.Calb1.Igfbp5', 'OLM', sst; ...
'Sst.Pnoc.Calb1.Pvalb', 'OLM', sst; ...
'Sst.Pnoc.Pvalb', 'OLM', sst; ...
'Vip.Crh.C1ql1', 'IS2', vip; ...
'Vip.Crh.Pcp4', 'CckCxcl14Vip', vip; ...
'Vsmc', 'Non Neuron', non_neuron; ...
'Zero', 'Zero', [0 0 0]...
};
rand('state', 1);
Noise = .2;
for i=1:length(ClassNames)
MyPos = strmatch(ClassNames{i}, NickNamesColors(:,1));
NickNames{i}=NickNamesColors{MyPos,2};
PieColors(i,:) = NickNamesColors{MyPos,3}*.8 + Noise + (rand(1,3)-.5)*Noise*2;
end
PieColors(PieColors>1) = 1;
PieColors(PieColors<0) = 0;
PieColors(end,:) = 0;