-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
executable file
·172 lines (139 loc) · 8.49 KB
/
index.html
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="description" content="Easy visualization of brain data as a heatmap">
<title>Brain heatmap by LiorKirsch</title>
<link rel="stylesheet" href="gh-pages_site/stylesheets/styles.css">
<link rel="stylesheet" href="gh-pages_site/stylesheets/pygment_trac.css">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript">
function getURLParameter(name, url) {
return decodeURI(
(RegExp(name + '=' + '(.+?)(&|$)').exec(url)||[,null])[1]
);
}
function redirectToPage(location, spreadsheetkey,ontology, minValue, maxValue) {
window.location.href = "brainmapSingle.html?location=" +location + "&ontology=" + ontology +"&min=" + minValue +"&max=" + maxValue + "&spreadsheetkey=" + spreadsheetkey;
}
function generateHeatmap()
{
var spreadsheet = $('#spreadsheet').val();
var minValue = $('#minValue').val();
var maxValue = $('#maxValue').val();
var ontology = $('#ontology').val();
// Google changed their spreadsheet url it no longer has a "key" parameter
//var spreadsheetkey = getURLParameter("key", spreadsheet);
var spreadsheetkey = spreadsheet.split("spreadsheets/d/")[1].split("/")[0];
if (minValue == "") {minValue = "null"}
if (maxValue == "") {maxValue = "null"}
redirectToPage("20", spreadsheetkey,ontology, minValue, maxValue);
}
</script>
</head>
<body>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> </script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-45735305-1', 'liorkirsch.github.io');
ga('send', 'pageview');
</script>
<div class="wrapper">
<header>
<h1>Brain heatmap</h1>
<p>Easy visualization of brain data as a heatmap</p>
<p class="view"><a href="https://github.com/LiorKirsch/brain-heatmap-web">View the Project on GitHub <small>LiorKirsch/brain-heatmap-web</small></a></p>
<!--
<ul>
<li><a href="https://github.com/LiorKirsch/brain-heatmap-web/zipball/master">Download <strong>ZIP File</strong></a></li>
<li><a href="https://github.com/LiorKirsch/brain-heatmap-web/tarball/master">Download <strong>TAR Ball</strong></a></li>
<li><a href="https://github.com/LiorKirsch/brain-heatmap-web">View On <strong>GitHub</strong></a></li>
</ul>
-->
<p>
<a href="http://dx.doi.org/10.1371/journal.pcbi.1005064"> <img src="gh-pages_site/images/img_for_paper.png" > </a>
</p>
</header>
<section>
<h3>
<a name="welcome-to-github-pages" class="anchor" href="#welcome-to-github-pages"><span class="octicon octicon-link"></span></a> Create custom brain heatmaps</h3>
<p>Use this page to generate brain heatmaps ontop of the <a href="http://www.brain-map.org/" > Allen Brain </a> Atlas. You can generate heatmaps for the human brain (such as <a href="brainmapSingle.html?location=36&ontology=human&min=5&max=9&spreadsheetkey=0AiPUAyOtb4cHdHo2X2JSNHFqbnVtdDJLNHVyZG9fM0E" >this </a>) or for the mouse brain (such as <a href="brainmapSingle.html?location=18&ontology=mouse&spreadsheetkey=0AiPUAyOtb4cHdGlldzdIdnd3d0Z5c1Z4TF9nMVJ1TWc&min=0&max=60" > this</a>). This is done by editing a google spreadsheet template and publishing it to the web.</p>
<p> * If you are more comfortable using matlab you can find the source code on my <a href="https://github.com/LiorKirsch/brain-heatmap">github page </a>. </p>
<p>
<img src="gh-pages_site/images/humanBrain2.png" > <img src="gh-pages_site/images/mouseBrain2.png" >
</p>
<h3><a name="designer-templates" class="anchor" href="#designer-templates"><span class="octicon octicon-link"></span></a>Customize the brain heatmaps in four steps</h3>
<p> <ol>
<li> <b> Make your own copy of the spreadsheet template: </b> From google spreadsheet menu press <code>
File -> make a copy
</code>
<ul>
<li>For the mouse brain use <a href="https://docs.google.com/spreadsheet/ccc?key=0AiPUAyOtb4cHdFN5d2VrMC15VTdHakl3VkNleWNacXc&usp=sharing" target=newtab> this template </a>. </li>
<li> For the human brain use <a href="https://docs.google.com/spreadsheet/ccc?key=0AiPUAyOtb4cHdDlrT0x6bDVHUmJfNmxrLXJfelYxRUE&usp=sharing" target=newtab> this template </a>.
</li>
<li> For the compact human brain use <a href="https://docs.google.com/spreadsheet/ccc?key=1IAUCYklGlTZsbSBsOD6kCBB58Y5AZZj0Ft8srWSdM1I&usp=sharing" target=newtab> this template </a>.
</li>
</ul>
</li>
<li> <b> Edit your new spreadsheet: </b> For each brain region that interest you provide a numeric value. It is possible to remove the unused regions (rows).
The region names follow the ontology used in the <a href="http://atlas.brain-map.org/atlas?atlas=2" > Allen Mouse Reference Atlas </a> and in the <a href="http://atlas.brain-map.org/atlas?atlas=138322605#atlas=138322605" > Human Brain Reference Atlas </a>.<br>
Here is an example of spreadsheet <a href="https://docs.google.com/spreadsheet/pub?key=0AiPUAyOtb4cHdGlldzdIdnd3d0Z5c1Z4TF9nMVJ1TWc&output=html" target=newtab> for the mouse </a> and <a href="https://docs.google.com/spreadsheet/pub?key=0AiPUAyOtb4cHdHo2X2JSNHFqbnVtdDJLNHVyZG9fM0E&output=html" target=newtab> for the human</a>.
</li>
<li>
<b> Publish your google spreadsheet to the web: </b>
From google spreadsheet menu press
<code>
File -> publish to the web -> start publishing
</code> then copy the link.
</li>
<li> <b>Fill the rest of this form: </b>
<ul>
<li> Place the link to your google docs here: <br> <input id="spreadsheet" size="60" placeholder="https://docs.google.com/spreadsheet/pub?key=0AiPUAyOtb4cHdHNtMzN2MDJ6VFNHTlI4RmRxRkkxVmc&output=html"> </input>. </li>
<li> choose the atlas:
<select id="ontology">
<option value="human" selected="selected">human</option>
<option value="human_compact">human (compact display)</option>
<option value="mouse" >mouse</option>
</select>
</li>
<li> (optional) provide a minimum <input id="minValue" size="2"> </input> and a maximum <input id="maxValue" size="2"> </input> values for the color scale. </li>
<li> <button onclick="generateHeatmap();"> Generate heatmap ⇒ </button>
</li>
</ul>
</li>
</ol>
</p>
<p>
</p>
<h3>
<a name="examples" class="anchor" href="#examples"><span class="octicon octicon-link"></span></a>Examples</h3>
<p><ul>
<li>
The expression of the gene <a href="./brainmapSingle.html?location=36&ontology=human&min=5&max=9&spreadsheetkey=0AiPUAyOtb4cHdHo2X2JSNHFqbnVtdDJLNHVyZG9fM0E" > HTR1B in the adult human brain </a> (the <a href="https://docs.google.com/spreadsheet/pub?key=0AiPUAyOtb4cHdHo2X2JSNHFqbnVtdDJLNHVyZG9fM0E&output=html" > spreadsheet </a> used).
</li>
<li>
The expression of the gene <a href="./brainmapSingle.html?location=1&ontology=human_compact&spreadsheetkey=1hyxYWnd-cQLZkL4Dm-p3ykGY6RNhBc_sq_w56r0MNjU" > HTR1B in the adult human brain <b> compact display</b> </a> (the <a href="https://docs.google.com/spreadsheet/pub?key=1hyxYWnd-cQLZkL4Dm-p3ykGY6RNhBc_sq_w56r0MNjU&output=html" > spreadsheet </a> used).
</li>
<li>
Example of usage in <a href="./brainmapSingle.html?location=19&spreadsheetkey=1cPaHhWJCmc2y6Xcixir0Q8uo2hKLC12zd76vYd3BxSo&ontology=mouse" > the mouse brain </a> (the <a href="https://docs.google.com/spreadsheet/pub?key=1cPaHhWJCmc2y6Xcixir0Q8uo2hKLC12zd76vYd3BxSo&output=html" > spreadsheet </a> used).
</li>
</ul></p>
<h3>
<a name="authors-and-contributors" class="anchor" href="#authors-and-contributors"><span class="octicon octicon-link"></span></a>Special thanks</h3>
<p> I would like the thanks <a href="http://www.brain-map.org/"> The Allen Institute </a> for the hard work they put in creating the reference atlases and for making them publicly available online.</p>
</section>
<footer>
<p>This project is maintained by <a href="https://github.com/LiorKirsch">LiorKirsch</a></p>
<p><small>Hosted on GitHub Pages — Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
</footer>
</div>
<script src="javascripts/scale.fix.js"></script>
</body>
</html>