tag:blogger.com,1999:blog-41840249554631782612024-03-13T10:32:40.849-05:00Daofeng LiDaofeng's personal blog!Daofenghttp://www.blogger.com/profile/12963673186399060285noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-4184024955463178261.post-71269589137885473482013-06-27T15:05:00.000-05:002013-07-14T14:25:24.511-05:00Install WashU Epigenome Browser mirror at a fresh Ubuntu server<div>
<br />
The official blog for WashU Epigenome Browser: <a href="http://washugb.blogspot.com/">http://washugb.blogspot.com/</a><br />
The official release for source code of WashU Epigenome Browser: <a href="http://epigenomegateway.wustl.edu/info/source" target="_blank">here</a><br />
The main site for WashU Epigenome Browser: <a href="http://epigenomegateway.wustl.edu/">http://epigenomegateway.wustl.edu/</a><br />
Please also see <a href="https://sites.google.com/site/xzhou82/Home/bioinformatics-computational-biology/wash-u-epigenome-browser/installation-procedures" target="_blank">this post</a> from the author of WashU Epigenome Browser for installation instructions.<br />
<br />
<br />
Assume we have a fresh Ubuntu system and want to install the WashU Epigenome Browser mirror, here comes the steps. (It was pretty straightforward, and it's a minimal installation for human hg19 with default tracks, occupy ~10Gb disk space, full installation requires at least 3Tb space)</div>
<br />
Note: the default tracks come from the <a href="http://www.roadmapepigenomics.org/" target="_blank">Roadmap Epigenomics Project</a>.<br />
the annotation tracks come from public database <a href="http://genome.ucsc.edu/" target="_blank">UCSC Genome Browser</a> and <a href="http://www.ensembl.org/index.html" target="_blank">Ensemble</a>.<br />
<br />
<div>
<h4>
0, before start</h4>
<br />
assume we put the browser source file at <span style="font-family: Courier New, Courier, monospace;">/opt/washugb</span><br />
assume we put the tracks files at <span style="font-family: Courier New, Courier, monospace;">/opt/washugb_data</span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">also need to make some temporary folder:</span><br />
<span style="font-family: Courier New, Courier, monospace;">sudo mkdir /var/www/trash</span><br />
<span style="font-family: Courier New, Courier, monospace;">sudo ln -s /var/www/trash/ /usr/lib/</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">sudo mkdir /var/www/browser/t</span><br />
<span style="font-family: Courier New, Courier, monospace;">sudo chown www-data /var/www/trash/ </span><span style="font-family: 'Courier New', Courier, monospace;">/var/www/browser/t</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: inherit;">and we have a IP address of</span><span style="font-family: 'Courier New', Courier, monospace;"> </span><span style="font-family: Courier New, Courier, monospace;">192.168.253.178</span><span style="font-family: inherit;">, as shown below</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">$ ifconfig</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">em1 Link encap:Ethernet HWaddr d4:ae:52:7e:46:56</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> inet addr:192.168.253.178 Bcast:192.168.253.255 Mask:255.255.255.0</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> inet6 addr: fe80::d6ae:52ff:fe7e:4656/64 Scope:Link</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> RX packets:33938042 errors:0 dropped:0 overruns:0 frame:0</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> TX packets:31788428 errors:0 dropped:0 overruns:0 carrier:0</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> collisions:0 txqueuelen:1000</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"></span><br />
<br /></div>
<h4>
</h4>
<h4>
1, get web, database module and R installed</h4>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">sudo apt-get install apache2 </span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">sudo apt-get install </span><span style="font-family: Courier New, Courier, monospace;">mysql-server mysql-client libmysqlclient-dev</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"># will prompt for typing for root password for mysql</span><br />
<span style="font-family: Courier New, Courier, monospace;">sudo apt-get install </span><span style="background-color: white;"><span style="font-family: Courier New, Courier, monospace;">r-base</span></span></div>
<div>
<br /></div>
<h4>
</h4>
<h4>
2, get the source code for WashU Epigenome Browser and decompress</h4>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">cd /opt/washugb</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget http://epgg-test.wustl.edu/mirror_support/subtleKnife.v20.mirror.tar.gz</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">tar zxvf </span><span style="font-family: Courier New, Courier, monospace;">subtleKnife.v20.mirror.tar.gz</span></div>
<div>
<br />
<b><br /></b>
<b>Note: this version of source code was modified from the official release v20, the version included customized <a href="http://genome.ucsc.edu/" target="_blank">UCSC Kent source</a> code, <a href="http://samtools.sourceforge.net/" target="_blank">samtools and tabix source</a> code, re-distributed under their own licenses. The WashU Epigenome Browser C source code, JavaScript html and css files should be used free only for personal or academic use, commercial users should contact the <a href="http://wang.wustl.edu/" target="_blank">Epigenome Browser Team</a> at WashU.</b></div>
<h4>
</h4>
<h4>
3, compile the source</h4>
<div>
<br />
edit the file <span style="font-family: Courier New, Courier, monospace;">subtleKnife.c</span> before compile, </div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#define Mysqluser "root"</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#define Mysqlpswd "password"</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
replace your right username and password</div>
<div>
then type:</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">make</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: inherit;">three binary file </span><span style="font-family: Courier New, Courier, monospace;">subtleKnife svg bwquery</span> will generated in current folder, copy them to the cgi-bin folder of your webserver Apache as below</div>
<div>
<br /></div>
<h4>
4, move/copy the cgi binary programs and html, javascript, style sheet to corresponding locations</h4>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">sudo cp subtleKnife svg bwquery /usr/lib/cgi-bin/</span><br />
<span style="font-family: Courier New, Courier, monospace;">sudo mkdir /var/www/browser</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">sudo cp *.js *.html *.css /var/www/browser</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">sudo cp -r images/ /var/www/browser/</span></div>
<div>
<br />
<h4>
5, get the track files for a minimal installation for hg19</h4>
<div>
<br /></div>
<div>
go to <span style="font-family: Courier New, Courier, monospace;">/opt/washugb_data</span> folder, make a<span style="font-family: Courier New, Courier, monospace;"> hg19</span> and <span style="font-family: Courier New, Courier, monospace;">seq</span> directory</div>
<div>
<span style="font-family: Courier New, Courier, monospace;">cd /opt/washugb_data</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">mkdir hg19 seq</span></div>
<div>
<br /></div>
open url <span style="font-family: Courier New, Courier, monospace;">http://epgg-test.wustl.edu/mirror_support/</span><br />
<span style="font-family: inherit;">download all the files under</span><span style="font-family: Courier New, Courier, monospace;"> hg19 </span><span style="font-family: inherit;">to the </span><span style="font-family: Courier New, Courier, monospace;">hg19</span><span style="font-family: inherit;"> foler</span><span style="font-family: Courier New, Courier, monospace;">, </span><span style="font-family: inherit;">all the files under </span><span style="font-family: Courier New, Courier, monospace;">seq</span><span style="font-family: inherit;"> to </span><span style="font-family: Courier New, Courier, monospace;">seq</span><span style="font-family: inherit;"> folder</span><br />
<br /></div>
<h4>
6, manipulate the database</h4>
<br />
Go to the <span style="font-family: Courier New, Courier, monospace;">config</span> directory of the source, create a database called <span style="font-family: Courier New, Courier, monospace;">WashUGb</span>, and load the sql file <span style="font-family: Courier New, Courier, monospace;">dbTable.sql</span> to the database: (you need type the password for mysql root, defined in step1 when you install database modules)<br />
<br />
add <span style="font-family: Courier New, Courier, monospace;">WashUGb </span>and <span style="font-family: Courier New, Courier, monospace;">hg19</span> database<br />
<span style="font-family: Courier New, Courier, monospace;">cd /opt/washugb/config</span><br />
<span style="font-family: Courier New, Courier, monospace;">mysql -u root -p -e "create database WashUGb;"</span><br />
<span style="font-family: Courier New, Courier, monospace;">cat dbTable.sql | mysql -u root -p WashUGb</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">mysql -u root -p -e "create database hg19;"</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">cat sessionUtils.sql | mysql -u root -p hg19</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: inherit;">go to </span><span style="font-family: Courier New, Courier, monospace;">hg19 </span><span style="font-family: inherit;">folder, download tracks files and load track configuration</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd /opt/washugb/config/hg19</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">wget </span><span style="font-family: Courier New, Courier, monospace;">http://epgg-test.wustl.edu/mirror_support/hg19_epgg_anno.sql.gz</span><br />
<span style="font-family: Courier New, Courier, monospace;">gunzip -c hg19_epgg_anno.sql.gz | mysql -u root -p hg19</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">cat makeDb.minimal.sql | mysql -u root -p hg19 --local-infile=1</span><br />
<h4>
</h4>
<h4>
Note: you need to edit the makeDb.minimal.sql file if you didn't put your tracks files at the <span style="font-family: Courier New, Courier, monospace;">/opt/washugb_data</span> folder. (those two lines):</h4>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;">"/opt/washugb_data/hg19/",</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">"/opt/washugb_data/seq/hg19.gz",</span></div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<h4>
7, the browser should be accessed now</h4>
<br />
Open any web browser (Google Chrome, FireFox, Safari, Opera, IE >=10), point to the http://192.168.253.178/browser, the browser should work now.<br />
<br />
(below was a screenshot using IE10 visiting the new installed mirror)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHHUocV2tzwOzfTglaL9vE-5Jolf8xj_CQ_V1KPnC3lho3Dv2AxmUOF8v7FrNWhtKfbVT43Axozyr9kFARpUBVpSkbHxh5E-hG9VIcqEl-FP1bjLUJO_VFbILbFl0weRJuS4uHAIgkLTes/s1600/epgg-mirror-example.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="345" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHHUocV2tzwOzfTglaL9vE-5Jolf8xj_CQ_V1KPnC3lho3Dv2AxmUOF8v7FrNWhtKfbVT43Axozyr9kFARpUBVpSkbHxh5E-hG9VIcqEl-FP1bjLUJO_VFbILbFl0weRJuS4uHAIgkLTes/s640/epgg-mirror-example.png" width="640" /></a></div>
<br />
<br />
<br />
<br /></div>
Daofenghttp://www.blogger.com/profile/12963673186399060285noreply@blogger.com0