
LPPH is an efficient program for solving the Perfect Phylogeny Haplotyping (PPH) Problem:
Given an n by m matrix S that holds n genotypes from m sites, find n pairs of haplotypes that 
generate S and fit a perfect phylogeny, or determine that no such n pairs of haplotypes exist.

This program is an implementation of the linear time algorithm described in the paper below.

This package was written by Zhihong Ding at U.C. Davis Department of Computer Science under the 
direction of Prof. Dan Gusfield.
Copyright (C) 2004 Z. Ding and D. Gusfield

We make no warranties or guarantees, assume no liability and grant no rights for commercial use. 

To cite the method, please use: 

Z. Ding, V. Filkov, and D. Gusfield. A Linear-Time Algorithm for the Perfect Phylogeny 
Haplotyping (PPH) Problem. To appear in Proceedings of RECOMB 2005.

This package contains these files:

lpph.exe - the main program
README.txt - this file
testcase.pph - an example of input file
output.pph - an example of output file

The program is written in C++, and compiled under Windows XP.


*************
Installation:
*************

1. Uncompress the zip file.
2. Enter the sub-directory "LPPH_Windows".
3. There should be an executable file "lpph.exe".


*********************************
Step by step use of this program:
*********************************

1. Double click "lpph.exe" to start the program.

2. Type in the command "pph testcase.pph" followed by <return>
   
3. Type in the command "exit" followed by <return> to quit the program.  

4. Use any text editor to open "output.pph", which contains the output of the program (PPH 
solutions for the genotype matrix in "testcase.pph").


************************
Notes about the program:
************************

1. You can create your own input file, using the same data format as shown in "testcase.pph". 
Then replace "testcase.pph" in the command line with your own file name.

2. The program uses all-0 sequence as the ancestral root sequence.
   
3. The program also checks for the consistency of the output. That is, it checks that each 
output haplotype pair does actually correspond to the correct input genotype vector. 


Please report any bug or suggestion to Zhihong Ding at dingz@cs.ucdavis.edu. 

Thank you.
