PAP comprises eight programs with test data which double as examples; Appendix A lists all the distributed files. PAP source code conforms to the recommendations for Fortran 77 of Metcalf [1987]. See section F.2 for changes from Revision 3 in the programs. Directions for modifying the computer-dependent features follow:
(1) Set ZMIN (specified in a PARAMETER statement in include file c45.inc) to equal - 10n where n + 5 equals the largest available exponent. Reduce n if overflow occurs when executing papdr.
(2) Set SIGDT (specified in a PARAMETER statement in included file const.inc) to equal the number of significant digits in a double precision number.
(3) If using GEMINI, set IPRCIS (specified in a PARAMETER statement in included file gemini.inc) to equal the number of binary digits in the mantissa of the floating point representation of a real number (2IPRCIS = PRECIS as defined in the GEMINI manual, page 48).
(4) If using NPSOL, set function precision and the optimality tolerance to the desired values in papmxn, referring to the manual for a definition.
(5) If unacceptable, modify the input and output file assignments (specified in a PARAMETER statement in include file papch.inc) of numbers from 1 to 10 with 5 for interactive input and 6 for interactive output.
(6) If unacceptable, modify the file names in OPEN statements.
(7) If unacceptable, modify the status upon opening files from 'UNKNOWN' to 'NEW'.
(8) If your compiler requires a different form for the INCLUDE statement, modify each file of source code. If your compiler does not allow INCLUDE statements, insert the contents of each included file into the source code where indicated.
(9) If your compiler will not compile two subroutines in the same file, separate each block data from its subroutine. Then compile and link each separately.
(10) The distributed software includes a C routine designated DRAND which calls the random number generator random(3). If you have a good Fortan random number generator available, remove reference to drand in Makefile and replace the calls to DRAND in papsg.f with the appropriate calling sequence. If you never intend to use the simulation option, remove reference to drand in Makefile, and put an * in column 1 on each line of a call to DRAND.
(11) If the time cannot be obtained using "JSEED = TIME()", modify papsg.f to provide another way to obtain a starting seed. If you never intend to use the simulation option, put an * in column 1 on the line which call TIME.
(12) For operating systems other than UNIX, modify each command file (section A.1) to perform the listed function.
(13) A compiler error on the DecStation 5000 initiates an infinite loop upon input of a character when a number is expected.
Sections III.1 through III.6 list, for each of the six programs, the constituent subroutines and the input and output files. If a copy of the output file exists, the program will overwrite it when executed.
Each program can be linked by using the command "make" followed by the name of the program. For example, the executable for preped is produced by the command "make preped". The executable for papdr using GEMINI and incorporating subroutines papfqhw, paptcms, dmlpr0, qmlpr0, papen, papcr is produced by the command "make papdrg a=hw b=ms c=0 d=0". For more information, use the command "make".
Source: preped, pselec, phenin, popin, pedgen, pedot, filerr, daterr, inmin, yesno
Input: console, trip.dat (section II.1), order.dat (optional, section II.2), header.dat (section II.3), phen.dat (section II.4), ascer.dat (optional, section II.4)
Output: console, papin.dat (section B.6)
Program preped combines the phenotype data and pedigree structure information into a single file for input to descstat (section III.2), prepap (section III.3), simul (section III.4), and papdr (section III.5). Program preped must be executed whenever any of the input files change.
Program preped asks six questions: (1) Ascertainment correction? Respond with "y" if you would like to make an ascertainment correction and have prepared file ascer.dat (section II.4). Respond with "n" otherwise. (2) Assortative mating? Respond with "y" if you intend to assume assortative mating in your genetic model. Respond with "n" otherwise. (3) Minium pedigree size? Respond with "1" unless you would like to eliminate any pedigrees in your sample with fewer than some number measured. (4) Eliminate parents without offspring? Respond with "y" to eliminate measured parents without measured children. Respond with "n" otherwise. (5) Add gender for parents with missing values? Respond with "y" if you plan to use an X-linked model; a request for the variable representing gender follows. Respond with "n" otherwise. (6) Insert "1" for each unexamined individual? Respond with "y" if you plan to use a category-specific model; a request for the variable representing the category follows. Respond with "n" otherwise. When using an X-linked or category-specific model, even unstudied individuals must have gender or category specified; positive responses to questions (5) and (6) insert them for unstudied individuals.
If header.dat so specifies, preped will subtract a specified value from each phenotype, divide each phenotype by a specified value, and/or transform each phenotype using the power function r/P[(x/r + 1)P - 1] [MacLean et al 1976], where x represents the standardized phenotype, r equals 6, and P represents the power.
Program preped (section III.1) includes in papin.dat only those unmeasured individuals needed to connect measured individuals. Therefore, to limit your analysis to adults (for example) you need only delete the records for youths from phen.dat; trip.dat need not be altered and papin.dat will not include any unnecessary individuals to slow the computation.
Upon detecting an error in the pedigree structure or determining that the storage is insufficient, preped outputs an error message to the console and terminates execution.
Source: descstat, pselec, pedin, filerr, daterr, moderr, rnmin, yesno, inmin
Input: console, papin.dat (produced by preped, section III.1)
Output: console
Program descstat computes the mean, standard deviation, skew, kurtosis, minimum, and maximum of any variable in papin.dat. Ranges on any of the variables may be specified. Program descstat allows you to check that your sample size is correct and check that scaling, standardization, or transformation have had the desired effect.
Source: prepap, modnew, pselec, parin, parnew, genot, modin, popin, modot, papgn, filerr, daterr, moderr, sbrlib, iallel, igtrat, inmin, rnmin, yesno
Input: console, papin.dat (produced by preped, section III.1), popln.dat (optional, section II.5), freq.dat, tran.dat, dmlp.dat, qmlp.dat, wgen.dat, model.dat (optional)
Output: console, model.dat (section B.7)
Program prepap writes model.dat for use by simul (section III.4) and papdr (section III.5). Program prepap determines the genetic model and the associations between loci and variables either interactively or by reading model.dat; then prepap interactively requests parameter values and maximization or grid designations and writes model.dat. Files freq.dat, tran.dat, dmlp.dat, qmlp.dat, and wgen.dat inform prepap about the available frequency, transmission, discrete major locus, quantitative major locus, and within genotype subroutines; papin.dat and popln.dat inform prepap about the data. File model.dat optionally informs prepap about the genetic model if the user is changing only the parameter values. Please note that the input model.dat will be overwritten by prepap. If insufficient storage has been allotted, prepap outputs an error message to the console and terminates execution.
Six default models may be selected in place of user input of the model information. These models include: (1) univariate segregation analysis (discrete or quantitative trait), (2) bivariate segregation analysis (two discrete traits, two quantitative traits or one discrete and one quantitative trait), (3) measured genotypes analysis (one marker and either one discrete or one quantitative trait), (4) 2-point linkage analysis (two traits/markers), (5) expected lod score estimation (one discrete or one quantitative trait), (6) multi-point linkage analysis (at least three traits/markers). Options (1) through (3) use subroutine dmlprsv and options (3) through (6) use subroutine dmlprpn for a discrete trait; all options use qmlprmv for a quantitative trait (see sections C.3 and C.4).
Source: simul, datin, paptr, papsf, modin, pedin, papgn, sbrlib, popin, simph, papsg, papcsg0, papfq, paptc, dmlpr, qmlpr, papwg, pappo, filerr, daterr, moderr, paperr, modot, papro0, iallel, igenlc, igtrat, yesno, inmin, devia, integ, domdis, thresh, papmv0
Input: console, popln.dat (section II.5), papin.dat (produced by preped, section III.1), model.dat (produced by prepap, section III.3), freq.dat, tran.dat, dmlp.dat, qmlp.dat, wgen.dat (supplied with source code)
Output: console, pap.out, pap.log, header.dat, phen.01, phen.02, ...
Program simul simulates phenotypes for output to data files. File papin.dat specifies the fixed pedigree structure; file model.dat defines the genetic model and parameter values. The simulated phenotypes are output in the format of phen.dat (section B.4) in files phen.01, phen.02,..., phen.nn for nn replicates. The corresponding data descriptions are output as header.dat (section B.3).
When linking simul you select from libraries of subroutines named papfq, paptc, dmlpr, qmlpr, and papwg with 1-3 additional characters in each name. Line 2 of model.dat lists the subroutines selected for your application.
If you fix any phenotype for any individual, you must instead use program papdr (section III.5) option 3.
See section VI.9 for more information about simulation.
Source(G): papdr, datin, modin, sbrlib, pedin, papmv, pappg, alloff, repeat, popin, papgn, papgp, pappr, papel, papes, papsf, simph, papsg, papcsg, pappn, papgd, papse, paplk, paptr, pappl, papnf, assort, pappd, papcl, papsm, pappo, papro, papfq, paptc, dmlpr, qmlpr, papwg, papen, papcr, inmin, yesno, filerr, daterr, moderr, paperr, modot, iallel, igenlc, igtrat, integ, devia, domdis, thresh, papmxg, chkbnd, inib, step, update
Source(N): papdr, datin, modin, sbrlib, pedin, papmv, pappg, alloff, repeat, popin, papgn, papgp, pappr, papel, papes, papsf, simph, papsg, papcsg, pappn, papgd, papse, paplk, paptr, pappl, papnf, assort, pappd, papcl, papsm, pappo, papro, papfq, paptc, dmlpr, qmlpr, papwg, papen, papcr, inmin, yesno, filerr, daterr, moderr, paperr, modot, iallel, igenlc, igtrat, integ, devia, domdis, thresh, objfun, confun, blas1 (NPSOL), blas2 (NPSOL), chsubs (NPSOL), cmsubs (NPSOL), f06subs (NPSOL), lssubs (NPSOL), mcsubs (NPSOL), npsubs (NPSOL), opsubs (NPSOL), qrsubs (NPSOL), srsubs (NPSOL)
Input: console, popln.dat (section II.5), papin.dat (produced by preped, section III.1), model.dat (produced by prepap, section III.3), freq.dat, tran.dat, dmlp.dat, qmlp.dat, wgen.dat (supplied with source code)
Output: console, pap.out, pap.log (option 3, 6, 7), model.dat (option 4), header,dat, phen.01, phen.02, ... (option 3)
Program papdr performs one of eight execution options (see section IV.1) and outputs the parameter values and results to the console and pap.out. If a simulation option (3, 6, 7) is selected, output from each replicate is recorded in pap.log. If option 3 is selected, the simulated phenotype data are output into header.dat and phen.01, phen.02, ..., phen.nn for nn replicates. If option 4 is selected, the final parameter values are output in model.dat. Note that the input model.dat will be overwritten upon termination of the program.
The source code included upon linking papdr differs depending on whether maximization will be performed with GEMINI (designated (G) above) or NPSOL (designated (N) above). The source for GEMINI is included with the PAP source code. The source for NPSOL is available from Stanford Business Software, Inc., 2680 Bayshore Parkway, Suite 304, Mountain View, CA 94043 [(415) 962-8719, (415) 962-1869 (fax)].
When linking papdr you select from libraries of subroutines named papfq, paptc, dmlpr, qmlpr, papwg, papen, and papcr with 1-3 additional characters in each name. Line 2 of model.dat lists the subroutines selected for your application.
Source: gpe, phenin, popin, pselec, rnmin, yesno, inmin, filerr, daterr
Input: console, prob.dat (sorted pap.out from papdr, option 2), header.dat (section II.3), phen.dat (section II.4)
Output: console
Program gpe estimates genotypic frequencies, means, and standard deviations using genotypic probability estimators [Hasstedt & Moll 1989]. Estimates may be obtained for specified ranges of other variables contained in phen.dat. The estimation procedure uses the genotypic probabilities to partially assign an individual to a particular genotype.
File prob.dat contains the sorted pap.out produced by option 2 of papdr (section III.5). File phen.dat need not be the file for which prob.dat was computed, but also must be sorted. File header.dat corresponds to phen.dat.