No warranty, blah blah. You break it you buy it.
(CC) Max Shron, BSD License
http://creativecommons.org/licenses/BSD/

To start:
You should have OCaml installed to make the toolkit,
though it's not necessary for the evolutionary algorithm.

Run 'make discretize' to compile the discretizer,

'make consistency' to create the consistency checker,

'make roc_curve' to create the roc curve checker,

and of course 'make doc' to make the documentation
(though a copy of it has already been provided).


Change directories to EA-SOURCE and run
./configure followed by make.

Congradulations, you are now ready to analyze gene networks.



To use:

You should either be running some kind of Unix machine or else
be decent with a spreadsheet program like Excel. At the start
of the process, you have:
	
	o One comma separated value file of blocks of data
		of the form:
			Time,G1,G2,G3,G4
				
			timestamp,data,data,data,data
			timestamp,data,data,data,data

			timestamp,data,data,data,data
			timestamp,data,data,data,data
		coresponding to one silently ignored informative
		first row, and blocks of time course data separated
		between experiments.

Step 1: Run the discretizer on the .csv file. ./discretize --help will
	be of use here. The output will be blocks of discretized data
	stripped of the informative time steps.

	The default algorithm is a method of least squares linear
	regression fitting the gene trajectories across all of the
	time trials against the various means attained by splitting
	the list in two at each point of a sorted list.

Step 2:	Run the consistency checker on the output. It will chop the
	data at the appropriate points to remove all of the inconsistencies.

	The primary issue at hand is that we can have one state which
	leads to two different outcomes, for example
			1,0,0,0
			1,1,1,1

			1,0,0,0
			1,1,1,0
	or the even more problematic
			1,1,0,0
			1,1,0,0
			1,0,0,1
	where the question arises, should 1,1,0,0 lead to itself (indicating


	The solution implemented in this program is to weight the various
	choices by how often they are chosen, averaged with their centrality
	(which is weighted by 1 - a normal distribution properly scaled to
	account for length; in other words, in the middle is the worst place
	to cut, and the edges are more favorable).

Step 3: Remove the doubled lines and commas with ea_prepare.sh (or some fancy
	Excel trickery if you're somehow doing this on a Windows machine).
	
	Removing the single blank lines would be smart too. Either edit it by
	hand or write a little script yourself. Sorry about that, but time
	constraints and all. Shouldn't be too hard.

Step 4: Split the file into separate files with split-files. Again, --help
	will be of use.

Step 5: Follow the instructions for the evolutionary algorithm in EA-SOURCE.
	Keep in mind this takes a long time to run-- on a 2.4GHZ Intel Core II
	Duo, it takes between six and 48 hours for a 50 gene dataset, depnding
	on how many lines it is. Keep in mind also that it doesn't multithread
	or really do anything useful with the second processor at all.

Step 6:	You now have data! Specifically, you've got a BestModels.txt file which
	the EA has spit out. The next step is to check it against a Gold Standard.
	This software package comes with a way to check against a gold standard which
	is listed in the form
		G1	G2	1
		G1	G3	0
	etc, indicating that gene _2_ effects gene _1_, the reverse of how it
	might look. roc_curve --help will, naturally, be of help here. Look up
	ROC curves for more details. This gives the results as {x,y} where x and y
	are the points in [0,1]x[0,1] mapped the usual way rather than the opposite way
	sometimes favored for ROC curves. Basically, {0,1} is the best and
	{foo,foo} is as good as chance.
