Welcome to the Genome Toolbox! I am glad you navigated to the blog and hope you find the contents useful and insightful for your genomic needs. If you find any of the entries particularly helpful, be sure to click the +1 button on the bottom of the post and share with your colleagues. Your input is encouraged, so if you have comments or are aware of more efficient tools not included in a post, I would love to hear from you. Enjoy your time browsing through the Toolbox.
Showing posts with label Windows 7. Show all posts
Showing posts with label Windows 7. Show all posts

Wednesday, May 15, 2013

Install Haploview on Vista / Windows 7 / Windows 8

I wanted to use Haploview to visualize the haplotype structure around a genomic area of interest.  Thinking it would be a quick, simple task I downloaded the Windows installer and installed it on my computer.  When I tried to open the program, I kept getting the error: Cannot run program "c:\program": CreateProcess error=2, The system cannot find the file specified.  After tinkering with things myself and getting some assistance from the IT staff, here is the workaround we developed to install Haploview on newer Windows operating systems.

1) Download the newest Haploview.jar file and save it to a location where you want to permanently keep it, for example: "C:\Haploview\".  This .jar file contains all the Java code needed to run Haploview.

2) For most 64-bit Windows operating systems, the newest version of Java will usually run Haploview.  The most current version is available for download here.  For 32-bit versions of Windows operating systems, Haploview seems to be a bit pickier about what version of Java will run Haploview.  I have had the best luck with Java version 6 update 43 and earlier.  They can be downloaded from the Oracle Java archive.  Click the radio button to accept the license agreement and select the Windows x86 Offline version for download.  The next page will ask you to sign in or sign up for a free account.  Just complete the form and the download will begin after you log in.

3) Use Notepad (or Notepad++) to create a Haploview.bat file in the same directory you placed the Haploview.jar file with the following code in it.  The Haploview.bat file is simply created by pasting the below code into Notepad and then saving it as Haploview.bat. This is just a quick and easy way to open a command prompt in the background and run the Haploview.jar file in Java.

For 64-bit Windows operating systems use the code:

For 32-bit Windows operating systems use the code:
(Note: The code for the 32-bit Windows operating system explicitly states the version of java to run, i.e. "C:\Program Files\Java\jre1.6.0_43\bin\java.exe". This allows us to avoid having to set up a path variable in Windows (which I have found buggy and difficult to set up).  The "jre1.6.0_43" portion in the path is an example of where your version 6 Java is located.  Lower versions of Java 6 will be "jre1.6.0_##", where ## is the version number.  If you only have one version 6 of Java on your computer, the folder will named "jre6".)

4) Right click on the Haploview.bat file you just created and choose create a shortcut.  This shortcut is now what you can use to open Haploview.  Cut and paste this shortcut into a location that is easy to access.  I put it in my Start Menu under All Programs, but pasting it on the Desktop works well too.

Hope this was helpful and saves those interested in using Haploview on newer 32- and 64-bit Windows operating systems a lot of time.  While these tips should be useful for getting Haploview to run on a majority of newer Windows operating systems, it may still take a bit of trial and error to get Haploview up and running.  If you are still having difficulty getting Haploview to work with newer versions of Java, try older versions from the Oracle Java archive and follow the above instructions for 32-bit Windows operating systems.  Also, check out the comments section below to see what has worked for others.  If something has worked for you and its not posted below, please share!