COMPILING

Type:

make

The Makefile specifies gcc, change to a different compiler if necessary.

INPUT FORMAT

The data should be in phylip format.  Number of taxa and number of gene families on the first row.  Taxon names should be 10 characters (padded with spaces if less: it would be better if it didn't care about length but I used the code from fastDNAml by Gary Olsen for reading phylip files).  0 (gene family absent) and 1 (gene family present) are the only acceptable symbols in the data matrix.

OUTPUT FORMAT

[outfile]_cgsizes is a space-separated ASCII file of conditioning genome sizes.  [outfile]_data is an ASCII file containing conditioned logdet distance matrices for each choice of conditioning genome.  Each distance matrix is in phylip format: number of taxa in first row, then alternating rows of taxon name and distances to each other taxon.  The row and column corresponding to the conditioning genome are NaN.  Conditioning genomes are ordered in the same way as rows of the distance matrices.  If bootstrapping, each bootstrap replicate generates a separate pair of files: [outfile]_rep#_cgsizes, [outfile]_rep#_data.  Output files can be used as input to BIONJ_cond to get a supertree that combines information from all choices of conditioning genome.

OPTIONS

-h	help
-r#	number of bootstrap replicates.  If 0 or not specified, analyzes the observed data only.  If any pairwise distances are NaN we throw away the bootstrap rep and draw again.
-q	quiet operation (default)
-n	noisy operation: copyright notice, settings, progress, warnings, etc. Setting -n and redirecting the output to a text file is useful because it will include a list of any distances that could not be estimated using the current method (or that were estimated by a method other than ML, for -eB and -eI options).
-e ESTIMATION METHOD	estimation method for pairwise pattern probabilities.  Options are:

M=maximum likelihood (default), 
P=add-one pseudocounts (might sometimes help with cases where the ML estimate is infinite or complex, but in practice doesn't usually seem to)
C=constrained maximum likelihood (returns Inf if the ML estimate of the pattern probability matrix has zero or negative determinant, otherwise behaves the same as ML), 
D=return determinant of pattern prob matrix instead of logdet distance (sometimes useful for debugging or learning more about the distribution of determinants)
I=ML estimate if the determinant of the pattern probability matrix is positive, otherwise use the constrained ML estimate of the pattern probability matrix with a determinant of zero, and add a pseudocount equivalent to 1/2 an observation to each of the 0,0 and 1,1 patterns to move the estimate a little way away from the boundary. In practice this is the most useful option if there are distances that cannot be estimated by ML.

[there used to be an empirical Bayes option too. Now disabled because we decided it's not doing the right thing.]

PSEUDORANDOM NUMBER GENERATOR

Uses the Mersenne Twister algorithm implemented in mt19937ar.c, downloaded 27/09/06 from http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html, with an initialization function from twister.c in Seq-Gen v1.3.2 (http://evolve.zoo.ox.ac.uk/software.html?id=seqgen).  Initialized with current system time at the start of the run (so take care with multiple calls from a script with no wait between them).

