Fast and Efficient Trio Phasing Software
This package contains the Java implementation of the trio phasing algorithm Tree-Based Deterministic Sampling.

Click the link below to download version 1 for trio phasing (approximate download size is 1.3 MB):

Or click the link below to download the software for phasing families with multiple children(approximate download size is 1.2 MB):

Installation and Requirements
Java SE 5 or higher is required and available here. Unzip the files. The executable file is tds-1.0.jar.

File Formats
The input file format is the same as that used by Beagle. It is a tab-delimited plain-text format. The columns are individuals, with two columns per individual, and the rows are SNPs. The first row has the IDs of the individuals, and starts with the letter I. The second row has the phenotype indicator for the inviduals and starts with the letter A. It is required (for Beagle compatibility) but ignored. The remaining rows have SNP values and begin with the letter M. Each value is either a 0 or 1, indicating the two possible alleles for each SNP. For example:
I id 1001 1001 1002 1002 1003 1003
A phen 0 0 0 0 0 0
M rs2001 0 1 1 1 0 0
M rs2002 0 0 1 0 0 1
M rs2003 1 1 0 1 0 0
See exampleInput.txt for a complete example input file.

The output file is a list of space-delimited haplotypes, with each row corresponding to a haplotype. They are in the following order:

  1. Transmitted from Parent 1.
  2. Non-transmitted from Parent 1.
  3. Transmitted from Parent 2.
  4. Non-transmitted from Parent 2.
See examplePhased.txt for example phased output.

The software is run as follows:

    java -jar tds-1.0.jar -t inputFile.txt
Note that imputFile.txt should be the name of the file to be phased, in Beagle format. The output will be written to phased.txt in the directory from which the software was run.