In the source code for the main programs, in the file commondefs.h, there is a definition for maxhap, which is currently set to 180. This value is used to statically allocate space for data and computation. If maxhap is larger than necessary, then the program will perform inefficiently. maxhap's lowest allowable value is the allele product.
OFM will analyze the FASTLINK user's lcp-produced script and the locus description file. Then OFM modifies the Makefile used to compile the desired program. Finally, it will remake the target supplied. The newly made target will be optimized for the allele product of the data supplied.
OFM assumes that the programs are run with a script produced by lcp, and that the locus file (often called datafile.dat) is prepared using makeped/preplink. In particular, the first line for each locus should include the string "no. of alleles" in either upper or lower case. If you have a different string there, the program (ofm.c) can be modified to handle it, by changing the constant INFO_LINE_KEY near the beginning of ofm.c. OFM does not require that the locus file be called datafile.dat.
If the lcp-produced script includes multiple runs, OFM assumes that they are all runs of the same program, but the alleles used in each run may vary. If the alleles vary from run to run, then OFM figures out the allele product for each run and uses the largest product as the "optimized" value of maxhap.
For now, OFM is specific to UNIX. To compile on AIX (IBM's version of UNIX) add the flags
-D_POSIX_SOURCE -D_XOPEN_SOURCE
to EXTRAFLAGS in Makefile.
ofm target script [source-dir [Makefile]]The arguments to this program are:
NOTE: ofm will have to be run again when the data is changed.
make ofm
The code itself should work fine as given, but the supplied
defaults near the beginning of ofm.c may not match your system.
In the file ofm.c, near the top, there is a section called constants, which should include the lines:
#define DEFAULT_DATAFILE_DIRECTORY "./" #define DEFAULT_SOURCE_DIRECTORY "./" #define DEFAULT_MAKEFILE_NAME "Makefile"There are instructions in the file as to what these are to help you.
The first and last constant will probably not need to be changed, but the middle constant should name the source code directory. I suggest explicitly naming the source dir from "/", since different data directories might need different relative paths to the source directory.
The first constant need only be edited if ofm does not find the datafile. Possible reason for not finding the datafile are:
The third constant should not need to be edited, but it represents the default name of the Makefile. Possible changes should be to "makefile" or "GNUmakefile", but I think these are unlikely.