GBrowse Cygwin HOWTO

From GMOD
Revision as of 02:21, 5 October 2007 by Scott (Talk | contribs)

Jump to: navigation, search

Abstract

Installing GBrowse on Cygwin running on Windows.

Installing Cygwin

Cygwin is a Linux-like environment for Windows. It does not partition your drive or require a dual boot. It does however provide a shell and GNU tools.

To install Cygwin, go to the Cygwin homepage and click the "install or update now" link and save the file to your hard drive. Now double click the setup installer for Cygwin; this will start the installation process. When presented with the "Choose a Download Source" option, select "Install from Internet". Accept the defaults until presented with the "Select you internet connection" option and choose the appropriate option for you. Then you need to pick a download mirror to get Cygwin from; it's best to chose one near you.

This part is important: you are then presented with a "Select Packages" option. In order for GBrowse to work properly, you should get the full Cygwin install. To do that, click on the word "All" until the word Install appears next to it, then press next until the install starts downloading packages from the mirror you selected. This step will take a long time. (Note that the full install is certainly more than is necessary, however, identifying exactly what is needed is somewhat difficult, so it is easier just to get the full install. X11 can be left out to save some space.)

Preparing the environment

Cygwin created a home directory for you using your full name associated with your Windows account. Unfortunately, if there are any spaces in this name (like the space in "Scott Cain"), then this will cause problems with some of the tools in Cygwin. To fix this, you need to rename the home directory and fix the passwd file. In this example, assume the home directory is originally called "/home/Scott Cain" and I want to change it to "/home/scott". First, change every occurrence of "Scott Cain" in the file /etc/passwd to scott. Do this by executing this perl command on the Cygwin shell command line:

 perl -pi.bak -e 's/Scott Cain/scott/g' /etc/passwd

Then you need to rename the home directory like this:

 mv "/home/Scott Cain" /home/scott

Then you need to quit Cygwin and restart so that the changes take effect.

rebaseall

Installing GBrowse

Download the net install script:

 wget http://gmod.cvs.sourceforge.net/*checkout*/gmod/Generic-Genome-Browser/bin/gbrowse_netinstall.pl

and run it:

 perl gbrowse_netinstall.pl

This will set up cpan if you haven't already done that before. It is generally safe to accept the defaults when asked questions.

Rebaseall

If during the installation, you see messages like

 ... *** fatal error - unable to remap C:/gywin/bin/cygz.dd to same address as parent ...

you need to execute the rebaseall application. In order to run this, you need to execute the ash shell from OUTSIDE Cygwin. To do this, quit Cygwin and open a Windows cmd shell (select Run... from the Start menu and type 'cmd'). In the cmd shell, change directories to the Cygwin bin directory:

 cd C:\cygwin\bin

and start the ash shell:

 ash.exe

and then rebaseall:

 /usr/bin/rebaseall

This will take a few minutes to run. When you are done, you can exit out of the ash shell and restart Cygwin.

Configuring and Running Apache