From: ftp-bimas.cit.nih.gov                       Last mod: June 27, 1999

                  FASTLINK, version 4.0P and beyond


This file describes an issue that will affect all users:
how to set certain constants, that vary from run to run depending
on the data set and chosen loci. See the file README for a roadmap
to all the FASTLINK documentation.

The definitions for most of the constants that a user wants to change
have now been set up in such a way that they can be modified in the
Makefile without ever having to edit the code. An important consequence
is that it is now possible to edit just the Makefile and be able
to compile different versions of the programs with different values of
of the constants. If you are not an experienced user of the Make utility,
consult your system administrator for help in editing the Makefile.


The following .h files contain declarations of constants and data:

commondefs.h             stuff that is common to all 4 main programs
checkpointdefs.h         stuff for checkpointing
gemdefs.h                stuff for GEMINI, common to LODSCORE and ILINK
moddefs.h                stuff specific to fast versions of programs
slowmoddefs.h            stuff specific to slow versions of programs
ildefs.h                 stuff specific to ILINK
lidefs.h                 stuff specific to LINKMAP
lodefs.h                 stuff specific to LODSCORE
mldefs.h                 stuff specific to MLINK
compar.h                 stuff specific to parallel FASTLINK
unknown.h                stuff specific to UNKNOWN


|*| Constant definitions - VERY IMPORTANT!!!
    --------------------

There are at least 2 constants that are defined in moddefs.h that you
will want to set before compiling.  This means that you can edit the
files to put in the appropriate numbers and then compile. The next
section explains how to change the constants by editing only the
Makefile. 

The constants in moddefs.h are

        AUTOSOMAL_RUN
        SEXDIF_RUN

The user gets a severe warning if either of these constants is set to 0 and
should be 1. The program will probably crash after the warning is printed.

AUTOSOMAL_RUN must be 1 if your data is autosomal. It can be 0 if
your data is sexlinked. It may be worth it to change it to 0 for a
sexlinked run because this will drastically reduce the memory requirements
and may make it possible to use the faster versions. In terms of correctness,
it always safe to set AUTOSOMAL_RUN to 1.

SEXDIF_RUN must be 1 if your data is autosomal AND you want to allow
the male theta and female theta to be DIFFERENT. From our experience,
such runs are rare in practice, so we are distributing the code
with SEXDIF_RUN set to 0. It is always safe to have SEXDIF_RUN set to 1,
but again you can save a lot of memory by setting SEXDIF_RUN to 0.
It is safe to set SEXDIF_RUN to 0 if:

a) your data is sexlinked or
b) your data is autosomal and you assume male theta = female theta


Here are some other constants that you might need to change occasionally.
There is relatively little harm caused by boostong these constants
higher.

maxsys:  maximum number of loci used in the run; this is most relevant for
         LODSCORE where one may do 2-point analysis on many different
         pairs of loci.


maxlocus: maximum number of loci in one run of one program.

maxall: maximum number of alleles at a numbered-allele or 
        binary-factors locus

maxfact: maximum number of binary factors; should be at least as large
         as maxall

maxind: maximum number of people in all pedigrees combined

maxped: maximum number of pedigrees

maxchild: maximum number of children of one parent

maxloop: maximum number of loops

fitmodel: is false unless you are estimating some parameter other
          than theta

ALLLE_SPEED: Is 1 if you want allele renumbering to be used; you should
             keep it at 1, except when estimating allele frequencies.

|*| Setting Constants by Editing only the Makefile
    ----------------------------------------------

It is now possible to use the -D feature supported by cc, gcc, and most
C compilers to change constants during compilation.
For example, the default declaration of maxloop  now looks like:

   #ifndef maxloop 
   #define maxloop  6
   #endif

This tells the C preprocessor that reads the hashed lines:
"If maxloop is not already defined, then set maxloop to be 6".

The way you can make maxloop already defined is to include the
string  -Dmaxloop=<number> in all the compilation commands.
For example, if you wanted maxloop to be 8, you would include the
flag 
     -Dmaxloop=8
in your compilation. This overrides the setting of 6 that is in commondefs.h

See README.Makefile for detailed instructions on how to edit the
Makefile to set maxloop and other constants.


|*| Checking how constants are set for a given executable
    -----------------------------------------------------

FASTLINK now includes a -i option (for infor) for ILINK, MLINK, LINKMAP,
and LODSCORE that summarizes how the various compilation options/variables
are set for a given executable.  For example, if you run:

  linkmap -i

you get a description of how the program is configured, but nothing
interesting is computed.  A sample output might be:

  Program LINKMAP version  5.10 (1-Feb-1991)


  FASTLINK (slow) version 3.0P (29-Sep-1995)


  LINKMAP has been compiled with the following options:

         CHECKPOINTING is enabled (DOS not defined)
         SLOW version (LESSMEMORY defined)

  Program constants are set to the following maxima:

       8 maximum number of loci (maxlocus)
      15 maximum number of alleles at a single locus (maxall)
    1000 maximum number of individuals in a pedigree (maxind)
       6 maximum number of loops (maxloop)
      16 maximum number of children of a parent (maxchild)

This option works for both sequential and parallel versions of FASTLINK.

Flagless runs now also print out "(slow)" with the version number if the
given executable is a "slow" version (as seen in the example above).
