Stat 550 2014, Lab 2: MORGAN/Pedcheck.

Pedcheck, is part of the MORGAN (Monte Carlo Genetic Analysis) set of programs.
Pedcheck checks a pedigree file for errors.

All our more complex programs start out by calling Pedcheck: without a valid pedigree, one doesn't want to proceed! In this lab, you will look at the types of output Pedcheck gives when confronted with various sorts of pedigree errors, and then construct your own pedigree file with errors.

A) General MORGAN information

  • MORGAN is a big package that does lots of things to analyze genetic data on pedigrees: we will only use a small bit of MORGAN. However, we will use the MORGAN 3.2 online tutorial, and parts of the Examples files for the bits of MORGAN we do use.

  • If you prefer to use your own version of MORGAN, please download MORGAN V3.2 from the web site. This version will run under standard linux/unix and Mac OSX systems. You will need to follow the Tutorial/Examples instructions on how to set up links to the MORGAN executables. If using Windows, a unix emulator such as Cygwin is recommended.

  • The version of MORGAN on statgen.stat.washington.edu is the released version 3.2. Links to the MORGAN executables have been set up in /usr/local/bin, so you should be able to invoke MORGAN programs directly. To check this you may say
    % which pedcheck

    which should respond with /usr/local/bin/pedcheck, or

    % pedcheck

    in which case is will attempt to run, but cannot, as you have not specified a parameter file.

    B) Practicing Using Pedcheck:

    1. Rather than download the Tutorial Examples file, it will be simpler to use this link to get to the example data files for this lab. Copy the files to where you will run your Pedcheck Examples

    NOTE: the files are all simple text files. Some browsers will not display them as they have suffixes .par and .ped -- let me know if you have problems. Cutting and pasting these files may be easier for non-linux users.

    An alternative is to copy them from the subdirectory /datafiles/Pedcheck_lab2 on statgen.stat.washington.edu. You can see the names of the files by saying
    ls /datafiles/Pedcheck_lab2 and copy them by saying
    cp /datafiles/Pedcheck_lab2/* .
    The "*" denotes that you want them all, and the final "." means copy them to whatever current directory you are in on statgen.stat.washington.edu.

    2. There are 7 files you will need and 1 extra:

    You can follow running the examples in section 3.3 of the Online Tutorial or just follow the desciptions below.
    Note that the examples below invoke pedcheck using ``pedcheck'', while the tutorial uses the format ``. /pedcheck''. This is because of the different way the executables are linked -- use whichever works!

    3. Run the four pedcheck examples. The first three examples will give you error messages. This is (probably) not because you have something wrong, but because the pedigree input files have errors which pedcheck is finding. Verify that you understand the error messages.

    (i) % pedcheck imp.par

    runs on input pedigree file `imp.ped', which is specified in the parameter file `imp.par'. This is the standard way to run MORGAN programs -- command-name followed by a parameter file name.

    Why is the program unable to assign chronological order ?
    Verify that the pedigree contains an individual who is his own ancestor.

    (ii) % pedcheck empty.par ped sex.ped

    runs with an empty parameter file, with input pedigree file `sex.ped' specified on the command line. This is an alternative way to specify the pedigree file, using the key `ped' on the command line. However MORGAN still expects a parameter file name, even if there is nothing to put in it.

    What does the output say is wrong with this pedigree?

    (iii) % pedcheck empty.par ped dup.ped

    runs with an empty parameter file, with input pedigree file `dup.ped' specified on the command line. What does the output say is wrong with this pedigree?

    (iv) % pedcheck check.par

    runs on input pedigree file `check.ped' specified in the parameter file `check.par'. The pedigree contains no errors, but has no gender specified and is not in chronological order. Look at the parameter file: you will see that it specifies the absence of gender, and requests that gender be assigned and that the output pedigree be chronologically ordered. Then, indeed, the output pedigree file `check.oped' has gender assigned and has the members reordered. You will get an error message and the program will quit if `check.oped' already exists. If this occurs, delete the file ("rm check.oped") and try again or use another output file name.

    Note: Lines or part-lines preceded by a "#" such as at the top of check.ped are comment lines than will be ignored by MORGAN. In fact, all this week's pedigrees, when fixed, should look like two copies of the example pedigree from the class.

    C) Assignment for submission:

    Invent a pedigree with between 24 and 30 individuals, and and set up a pedigree file for it. Your pedigree files should have (at least) four columns -- three "names" and gender. Include at least one pair of bilateral relatives other than siblings (e.g. double first cousins) and at least one inbred individual.
    You will use this pedigree again in other labs, so make it moderately interesting, but not too huge!
    Note from the experience of students in 2013: It will be better for later use if not all your bilateral relatives are inbred, and there is a pair of bilateral relatives who are not direct ancestors of your inbred individual.

    Add appropriate parameter lines at the beginning. It is probably easiest to do this by cutting and pasting from one of the example files and modifying it to fit your pedigree. The only required statement is
    input pedigree record names 3 integers 1
    assuming you have just 1 integer in addition to the 3 names -- and MORGAN will assume that is gender, unless you tell it differently. Make sure you separate the parameter stuff from the pedigree stuff by a line of (at least) 4 asterisks. Avoid blank lines in the pedigree part (although this problem should be fixed in the most recent MORGAN 3.2) -- the parameter part does not care.

    Now think of three different kinds of pedigree errors you could make on your pedigree. Make three new copies of your pedigree file, each of which contains at least one error. Run pedcheck on your files and write a paragraph or two describing the errors you created and the resulting error messages.

    Please also submit a copy of your pedigree: this may be drawn by hand, so long as it is done carefully and neatly wth full information on which individual is which.
    If you prefer you may use pedigree-drawing software such as Pedfiddler or (for Windows) PED.) There is an accompanying document on using Pedfiddler.