Unrooted REConciliation version 1.00 
(c) Copyright 2005-2006 by Pawel Gorecki
Written by P.Gorecki.
Permission is granted to copy and use this program provided no fee is
charged for it and provided that this copyright notice is not removed. 

Please send bug reports, comments etc. to: gorecki@mimuw.edu.pl

UREC is written in C++ with STL. 
This software was tested on PC with Linux under g++ compiler. 

To compile from sources just type: "make".

To run type: "urec". Without any options a short information on arguments will 
be shown. 

Options:

1. Defining gene and species trees.

-s TREE - defines a rooted species tree 
-S FILE - species tree(s) from file 

-g TREE - defines an unrooted gene tree 
-G FILE - gene tree(s) from file
-r LEAVES - create random gene/species tree(s); labels (single characters) 
       taken from LEAVES

Optional parameters (-r) must be set before -r:
-u - unique leaves (for species trees)
-E - number of leaves
-n - length of base tree
-i - prob. of choosing internal node
-e - parameter for decreasing prob. of internal node
-l - number of generated trees (default 10)

3. Printing 

-p - print gene tree on standard output
-P - print species tree on standard output

-R - print all rooted variants of the gene tree(s)

4. Voting algorithm

-v compute by voting

4. Computing costs 

-b compute costs 

4.1. For every species tree (summary of costs)

-c - print total mutation cost
-C - print total dl-cost, i.e., (dup,loss)
-d - print detailed total cost (distributions)
-x - print species tree with detailed total costs (nested parenthesis notation 
     with attributes)

4.2. For every reconciliation of an unrooted gene tree with a species tree (details).

-o - show optimal cost 
-O - print an optimal rooted gene tree 
-X - print species tree with detailed costs as attributes 
-a - show attributes and mappings
-A - show detailed attributes 

5. Other 

-D dupweight  - set weight of gene duplications
-L lossweight - set weight of gene losses

6. Examples.

> urec -s "(a,b)" -P

Print a species tree.

> urec -r "abc" -l 10 -p

Generate 10 random unrooted gene trees with labels of leaves: "a", "b" and
"c".

> urec -l 15 -r "abc"  -l 4 -r "xy" -p

Generate 15 random unrooted gene trees with labels of leaves: "a", "b" and "c"
and 4 random unrooted gene trees with labels of leaves: "x", "y".

> urec -b -s "(a,(b,c))"  -g "(a,a,b)" -oO

Compute optimal cost of reconciling a species tree with unrooted gene tree.
Print an optimal rooted gene tree (-O) and show costs summary (dup,loss).

> urec -b -G gtrees.txt -S strees.txt -cC 

Compute costs of reconciling a set of gene trees with a set of species trees. 

> urec -b -G gtrees.txt -S strees.txt -cC | sort -r -n -k2

Compute costs of reconciling a set of gene trees with a set of species trees
and sort results (Unix sort required). 

> urec -b -G gtrees.txt -S strees.txt -cd

Compute costs of reconciling a set of gene trees with a set of species trees
and the distributions of costs.

> urec -v -G gtrees.txt -S strees.txt 

Compute points by voting algorithm.

> urec -v -G gtrees.txt -S strees.txt | sort -r -n -k2

Generate 1000 random species trees with 8 leaves.

> urec -u -E 8 -l 1000 -r abcdefgh -p 

Generate 1000 random species trees with 6 leaves taken from 8 species.

> urec -u -E 6 -l 1000 -r abcdefgh -p 

Generate 1000 random gene trees with 6 leaves taken from 8 species.

> urec -E 6 -l 1000 -r abcdefgh -p 

