After successfully phasing with fastPHASE, I wanted to view the resulting haplotypes in Haploview. Since I couldn't find any scripts online to convert the hapguess_switch.out file from fastPHASE into the .haps file that Haploview requires, I wrote a brief Python script to do the heavy lifting.
This script is run from the command line by typing python make_haploview_input.py hapguess_switch.out and will produce a hapguess_switch.haps file. Because of the use of generators, this will only work on Python 2.6 or higher. You will also need to create a .info file to match the .haps file. The .info file has the marker loci in the same order as the .haps file and consists of two columns; the first being the marker name and the second being the marker position.
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.