Stat550 2012: Lab 2: MORGAN/kin

This lab will cover only one small MORGAN program, kin, which computes the kinship coefficient between specified pairs of individuals, and the inbreeding coefficient of specified individuals.

If using the Biostat linux computers:
Remember that if you did not discover how to put the source ~statgen/.statgen.cshrc
into your own .cshrc (or equiv.) file, you will need to give this command each time you log on, to access the statgen programs.

MORGAN/kin assignment

1 Practising Using Kin: (checked on hercules.biostat, Apr 12,2012)

Again, we will use the example in the MORGAN Tutorial and downloaded examples for practice. You can find out more about kin in Chapter 4 of the online tutorial.

To run kin you will need a parameter file and a pedigree file. These files can be found in the IBD subdirectory of the MORGAN_Examples that come with the tutorial. Alternatively, you may find these files here:

Parameter file jv_rep_kin.par
Pedigree file jv_rep.ped.


Take a look at jv_rep.ped. As the name suggests, this pedigree is just 2 copies of our usual JV pedigree. The first two parameter statements specify that there are 30 individuals in the pedigree, each of whom has the usual trio of names, followed by 2 integers. The other two parameter statements are self-explanatory, and are really just there for information, since these are the default options.

Now take a look at jv_rep_kin.par. The first line tells the program where to find the pedigree file. The next line requests the program to compute kinship coefficients between two pairs of individuals, the final individual (531) and her dad, and between her two parents. The next line asks for a couple of inbreeding coefficients on the second copy ("component") of the JV pedigree. You can specify as many pairs (for kinship) and individuals (for inbreeding) as you want -- the program should figure it out. However, if there is more than one component pedigree in the data file, you do need to tell it which component pedigree the individuals are in. (This should not be a problem for your own single-component example pedigrees.)

Finally the program asks for a couple of two-locus inbreeding coefficients, which may or may not be talked about in class. It is just the probability that the maternal and paternal haplotypes of an individual are IBD at both of two linked loci. This probability will depend on the recombination rate between the loci, so the final line specifies the recombination values at which this two-locus inbreeding is to be computed. (This paragraph is just here for info: you can ignore this bit if you wish.)

To run the program kin on the example file, type:
% kin jv_rep_kin.par
or, if you would like to send your output to a file, such as kin.out, type
% kin jv_rep_kin.par > kin.out
or, if you decided to call the pedigree file something different such as my-pedfile
% kin kin.par ped my-pedfile
(The ped key on the command line overrides whatever is in the parameter file.)
Look at your output, or output file. It should be self-explanatory.

Practice modifying the jv_rep_kin.par file to calculate an inbreeding coefficient or kinship coefficient for another individual or pair of individuals. Apparently, kin thinks it is an error to try to compute a kinship of an individual with itself: I need to fix this, but it is not yet fixed!! .

2 Your MORGAN/kin Assignment

Create a parameter file to run kin on a copy of your own pedigree file that you made for pedcheck in Lab 1. (It is simplest to leave the pedigree size and pedigree input record ... statements in your pedigree file from when you ran pedcheck on it, as in the copy here of jv_rep.ped, and to put the other statements into your own version of a parameter file kin.par, although in fact MORGAN does not care which statements are in which file.)

Also note that for your single-component pedigrees you just leave out the component 1 bit of the statement. You can ask for any number of pairs for kinship in one statement (as the two pairs in the example), and any number of individuals for inbreeding (as the two in the example). You should have (for each component if you have more than 1), just one kinship request statement and just one inbreeding request statement in your parameter file.

Your output should include the following:

(i) Calculations of the kinship coefficients between members of four pairs of individuals in your pedigree. Try to find pairs with different kinship coefficients, or with different relationships having the same kinship coefficient. At most one of your pairs should have kinship coefficient 0, and at least one of the pairs should be a pair of bilateral relatives other than siblings.

(ii) Calculations of the inbreeding coefficients for three non-founder individuals in your pedigree. At most one should have inbreeding coefficient 0. Try to find individuals with different inbreeding coefficients if you have them.

Turn in a sheet of paper with your results, with brief explanation of the relationships between the individuals you have chosen (for kinship) or between their parents (for inbreeding).