TUTORIAL FOR THE PROGRAM CHIASMA

M. Humberto Reyes-Valdés and David M. Stelly

Department of Soil and Crop Sciences

Texas A&M University

College Station, TX 77843-2474 USA

email: monosom@tamu.edu

Welcome to CHIASMA, the computer program for non-clinical analysis of meiotic configuration frequency data with disomic pairing.  This application runs in a Mathematica® for Windows platform and estimates the probability of being chiasmate for each chromosomal segment (A, B, C,...) delimited by a telomere, centromere or breakpoint(s). CHIASMA subsequently transforms those estimates into map distances, according to various mapping functions. The user should note that the map distances with which CHIASMA contends are often very long, i.e. greater than 30 cM, for which accuracy of various mapping functions remain ill-defined. Until the long-distance accuracy of mapping functions is extensively demonstrated, we suggest that presentation of results relays on either the raw probability estimates or their  (1/2)X transforms, which provide an estimate of the recombination frequency. For a nice discussion and a list of references about mapping functions the reader is referred to the article by James Crow (1990, Genetics 125:669-671).



In using CHIASMA , one must provide the following inputs: i) names of the segments to be analyzed, ii) all combinations of chiasmate segments that could give rise to each visually distinct meiotic configuration, or group of configurations (meiotic class), iii) number of cells in which each meiotic class was observed, and iv) “seeding values”  for the algorithm. We are going to illustrate the use of CHIASMA with data from a previously published  article (Reyes-Valdés and Stelly, 1995, Proc Natl Acad Sci USA 92:9824-9828), in which you can find the statistical basis of CHIASMA as well as the algorithm The following table (Reyes-Valdés and Stelly, 1995), summarize meiotic data from a monotelodisomic translocation heterozygote (TeNT) with the telosome in the same arm as the breakpoint.

To run CHIASMA , you must first load it. To load an application from the Mathematica® front end, one types:

<<path\filename	 Shift-Return

where "filename" is the name of the file.



The default file name for CHIASMA is "chiasma.m", however you can assign any file name to this program. If you have CHIASMA with the default file name “chiasma.m” in the drive a, to load this program type:

<<a:\chiasma.m		Shift-Return

Once the WELCOME greeting appears, CHIASMA has been loaded. To run it, type:

chiasma	Shift-Return

taking care to write “chiasma” with lower case letters. The program first asks you if the data to be analyzed are already in a file. If that is the case, you will be prompted for the data file name. If  not, the program will ask you to name the segments as a set denoted by curvy brackets. In our example the chromosome segments are B, C, D, E, and F, so the set is written as: {B,C,D,E,F}. You can use capital letters from A to F to designate the segment names. If you have more than six segments or wish to use any other letter(s), add the symbol $ to the end of each name. Then you will be prompted for the number of classes, which is the number of meiotic classifications that you have for your meiotic configurations. In our example the number is 20.



You will be asked to input the array of all possible sets of chiasmate segments from each configuration class, e.g. for the first configuration, M1, input the array: {{B,C,D,E,F},{B,C,E,F},{C,D,E,F}}. Note that the complete array is between brackets, as each segment set. The same is true for arrays consisting of  a single set, which define the "nonambiguous configurations" discussed by Reyes-Valdés and Stelly, 1995, e.g. the class M3: {{C,D,E}}. Do not forget the external brackets. The array for a class with no chiasmate segments includes a null set, e.g. the array for the class M20 is written as: {{}}. After you finish introducing the arrays, you will be prompted for the number of observations for each class. Finally you will be prompted for seeding information, i.e. to guess for each segment the probability of being chiasmate. The seeding values must be greater than zero and less than one, e.g. 0.27 for segment B, 0.76 for C, 0.89 for D, 0.01, and 0.01 for E. Reyes-Valdés and Stelly (1995) proposed a systematic method to generate seeding values, that can be applied to some cytogenetic stocks. If you do not have a good guess for a given segment, just write an arbitrary number in the given interval. You have the option of saving your data in a file. The data you input will be stored in an ASCII text file having the following format, e.g.:

S = {B, C, D, E, F}

 

m = {{{B, C, D, E, F}, {B, C, E, F}, {C, D, E, F}}, 

   {{B, D, E, F}, {B, E, F}, {D, E, F}}, {{C, E, F}}, 

   {{E, F}, {C, E}, {B, D}}, {{B, C, D, E}}, {{B, C, E}, {C, D, E}}, 

   {{B, D, E}}, {{B, E}, {D, E}, {B, F}}, {{B}, {E}}, {{B, C, D, F}}, 

   {{B, C, F}}, {{B, D, F}}, {{C, D, F}}, {{C, F}}, {{D, F}}, 

   {{C}, {D}, {F}}, {{B, C, D}}, {{B, C}}, {{C, D}}, {{}}}

 

n = {0, 0, 1, 2, 0, 1, 0, 1, 0, 1, 0, 0, 12, 5, 4, 37, 78, 6, 196, 0}

 

guess = {0.27, 0.76, 0.89, 0.01, 0.04}

If preferred, enter your data into an ASCII text file with the preceding format, instead of using the interactive subroutine in our program. Use a new line for each data definition of S, m, n, and guess, and use these names for any data set:



S = 	Set of segment’s names

m = 	Array of sets of chiasmate segment combinations for all possible configurations or meiotic classes

n = 	Vector of observed numbers of configurations or meiotic classes

guess = 	Vector of seeding values





Upon completion the data input, CHIASMA will commence iterative analysis. The number of each  iteration of the EM algorithm will appear successively as a screen output, with the respective log-likelihood (“support”). The iteration process will terminate once the difference between successive log-likelihoods is 10-25 or less, with a maximum of 300 iterations. Upon completion, the list of segments S and the initial guesses you gave for their chiasmate probabilities (guess),  are given along with the log-likelihood for those values. Then a second table displays, showing  the maximum likelihood estimate of the probability of being chiasmate for each segment, its standard error and transformations to map distances via Haldane, Kosambi, and Carter and Falconer mapping functions. CHIASMA includes a subroutine to show the plot of the three mentioned mapping functions against the chiasmate probability (see at the end of this tutorial). Note that Haldane's mapping function tends to seriously overestimate long distances. If the data have very few "ambiguous" configurations, as defined by Reyes-Valdés and Stelly (1995), the assumption of no interference can be relaxed and the Kosambi, or Carter and Falconer functions should be preferentially used. Carter and Falconer mapping function seems to work well for long distances, at least in the mouse system (Carter and Falconer, 1951, J Genet 50:307-323). Additional mapping functions will be included in subsequent versions of CHIASMA.



 At the end of the table, the log-likelihood of the MLE estimates is shown, which should be greater or equal to the log-likelihood of the first guesses. The observed and expected frequencies of meiotic configurations are shown in the next table. Also the chi square for goodness of fit and the Neyman-Pearson chi-square is given with the respective degrees of freedom. This permits one to test the fit of the data to the model of no interference. The following is the output for the analysis of the data in this example:

If you want to calculate the exact probability for one of the tests, e.g. the Neyman-Pearson's, load the statistical package of Mathematica:

<<Statistics`ContinuousDistributions`	Shift-Return

To calculate the probability of the Type I error, i.e. the probability or rejecting H0: “the data fits with the expectations”, use the following command:

1-CDF[ChiSquareDistribution[14],35.04]

In this case, since p<<.01 we reject H0. A discussion of this result can be found in Reyes-Valdés and Stelly (1995).  



Several options for graphically viewing properties of the estimates are offered at the end of the basic output. One of them is to draw all possible unidimensional log-likelihood plots. These plots are made by fixing the values of n-1 parameters and plotting the log-likelihood of the reminding parameter. The maximum of each plot should be in the estimated value of the parameter. If you want to draw color one-dimension plots, type:

plotsc	Shift-Return

To draw color plots for every combination of two segments use the option:

plot3dc	Shift-Return

An advanced feature of this program is that it can test the nonextreme estimates to see if they are in a  maximum point or not. Although most papers and programs related to maximum likelihood do not bother to test the critical points, some concern is warranted. We have found that the EM algorithm at least, which is commonly used in genetics, can reach critical points that are saddle points instead of maxima. The "test" option in this program generates the vector of first derivatives, evaluated on the estimates, the matrix of second derivatives (Hessian matrix) and the eigenvalues. Two things should be checked when all the estimates are greater than zero and less than one: all first derivatives should be close to zero, and the eigenvalues should be negative. In our example:

test	Shift-Return

The set of first derivatives is close to zero and all the eigenvalues are negative, which indicates that the point with zero gradient is at least a local maximum. Of course, there is always the danger of reaching a local maximum that is not a global maximum. A good set of initial guesses is desirable to avoid this situation. If no good guesses are available, try several to check the consistency of the estimation. Also, if the maximum number of iterations (300) is reached, run again the program using the final estimates as seeding values.



To show the mapping functions used by CHIASMA, plotted against probabilities of being chiasmate, use the command “mfun”:

mfun		Shift-Return