[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1. Get Started


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1 Overview of MORGAN

MORGAN (Monte Carlo Genetic Analysis) is a collection of programs and libraries developed at the University of Washington under the PANGAEA (Pedigree Analysis for Genetics and Epidemiological Attributes) umbrella. This software implements a number of methods for the analysis of data observed on members of a pedigree, with the main programs implementing Markov Chain Monte Carlo (MCMC) methods. As of the date of this tutorial, the latest MORGAN version is 3.4 which was released in August 2016. It is available for download through the MORGAN home page at the Department of Statistics, University of Washington.

The MORGAN programs are grouped into five categories:

  1. Programs using deterministic algorithms: pedcheck checks for errors in pedigree structure and data format, see Checking Pedigree Validity. kin computes kinship and inbreeding coefficients for members of the pedigree, see Computing Kinship and Other Pedigree Computations. Additionally, the utility programs translink and ibd_class are also included in this group of programs.
  2. Programs using simple Monte Carlo techniques (by simulating data on founders and ‘dropping’ genes down the pedigree): genedrop simulates data on a pedigree for analysis by other programs, see Simulating Marker and Trait Data in Pedigrees. markerdrop simulates marker data at loci linked to a trait locus, see Simulating Marker Data Conditional on Trait Data in Pedigrees. ibddrop uses Monte Carlo to estimate gene ibd (identity by descent) probabilities in the absence of data, see Estimating a priori IBD Probabilities by Monte Carlo.
  3. Programs using Markov chain Monte Carlo (MCMC) techniques: MORGAN’s MCMC programs are split into two sections, ‘Autozyg’ and ‘Lodscore’. These programs typically have the prefix ‘lm_’ indicating that they use the MCMC LM-sampler. In fact, most of these programs now have the option to use the improved multiple-meiosis LM-sampler. A brief introduction to the MCMC sampling techniques employed by MORGAN can be found in Using MCMC to Estimate Parameters of Interest in Pedigree Data.

    The ‘Autozyg’ and ‘Lodscore’ programs may be categorized into five subsets:

  4. Programs that use population-based models rather than pedigree information; see Population-based inference of IBD. These programs are in the IBD_Haplo program directory.
  5. Programs using EM algorithm for segregation analysis with quantitative traits: includes univar, unibig, bivar and multivar, see Polygenic Modeling of Quantitative Traits by EM Algorithm.

This tutorial is based on the tutorial and examples for MORGAN 2.9 developed over the years 2002-2010 by Elizabeth Thompson, Michael Na Li, Myrna Jewett, Adele Mitchell, Audrey Fu, Tia Lerud, and Marshall Brown. MORGAN 2.9 and its accompanying tutorial remain available for download. Adam Gustafson updated the examples and tutorial for the new parameter statements of MORGAN 3.0 in 2011, and the text has subsequently been significantly updated and revised by Elizabeth Thompson.

The version for MORGAN 3.1.1 (December 2012), contains a new Chapter and examples for the new ibd_haplo program, while the updated version for MORGAN 3.2 (January 2014) contains a variety of updates, mainly associated with ibd_haplo and gl_lods. The version for MORGAN 3.3 of May 2015 greatly expands the Chapter on population-based ibd, with text and examples for the seven subprograms of ibd_create. Additionally the examples for ibd_haplo and gl_lods have been updated, and the ‘MORGAN_Examples’ directory has been expanded to include these new examples for all three programs. A number of other small edits and updates were made. For version 3.3.2 (August 2016) there are additional changes and improvements to the ibd_create subprograms, including the addition of two new subprograms simped_fgl and fgl2dgl. A new program base_trait_lods has also been added. This program provides the probability of trait data on a pedigree. This probability can be used to normalize the ibd-based lod score computed by gl_lods. Some other minor changes to parameter statements (for example in lm_twoqtl have been made to improve clarity. ’MC’ in parameter statements now refers only to MCMC, with ’realizations’ or ’simulation’ being used in other cases.

Finally, for version 3.4 (December 2017). simped_fgl is replaced by a completely new ibddrop program, which simulates descent of founder genome labels (FGL) at dense locations, by simulating breakpoints of chromosome segments. Analogous changes for the use of dense markers were made to the markerdrop program. New features of ibddrop allow selection to be imposed at a specified locus, and a new beta-test program ibd_trios in the IBD_haplo directory allows the analysis of parent-offspring trios for detection of possible causal regions for inbreeding depression. Additionally, in all the Lodscore programs, specification of liability penetrances and age-dependent penetrances is much improved, and realization quantiles were added to the output of the gl_lods program. A new ’select all markers except ...’ statement was implemented. The graphics option in lm_auto is no longer supported.

Combined with hands-on examples, this tutorial gives a brief introduction to the usage of the main MORGAN programs. For further information, please refer to the MORGAN documentation and to the references cited. Note also that the test Gold standards also provide many examples of parameter files. However, the Gold standards use short runs of MCMC and default seeds, and so should not be taken as useful for real analyses in this regard.

See Concept Index for: MORGAN, overview of MORGAN.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.2 Get the Tutorial

This tutorial is available on-line at
http://www.stat.washington.edu/thompson/Genepi/MORGAN/Morgan.shtml#tut

Several formats of this tutorial may also be available to download for off-line reading or printing. (These may not all be made available for all releases; the html, PDF, and plain text versions are recommended.)

See Concept Index for: how to get the tutorial.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.3 Get and set up the examples

This tutorial assumes that the MORGAN software has already been installed. If this is not the case, please contact your local system administrator or download the software yourself and follow the instructions therein.

Follow the following steps to download and set up the examples:

  1. Download the examples (gzipped tar files) for MORGAN 3.4. morgan34-examples.tar.gz

    (Note these examples are based on those for MORGAN 3.3., but have been updated for MORGAN 3.4 where at most minimal update is required. Other Examples have been removed for the Examples directory and from the tutorial text.).

  2. Unpack the examples by typing the following command in a shell window,
     
    tar zxvf morgan3-examples.tar.gz
    

    Or if the above command fails (you don’t have GNU tar), use

     
    gunzip -c morgan33-examples.tar.gz | tar xvf -
    

    This will produce a ‘MORGAN_Examples’ directory under your current directory.

    (Note: Throughout the text, file and directory names are enclosed in single quotes; these single quotes are not part of the file or directory name.)

  3. Use ‘Makefile’ to establish links under the ‘MORGAN_Examples’ directory to the MORGAN programs. A link under the ‘MORGAN_Examples’ directory serves as a shortcut to a MORGAN program installed elsewhere.

    Before making links, you first need to edit the ‘Makefile’ (using your favorite text editor, for instance vim or nano) in the ‘MORGAN_Examples’ directory to make sure the paths to your MORGAN programs and those to the ‘MORGAN_Examples’ directory are correct. Most often, it is necessary to change the ‘MORGANDIR’ and ‘EXAMPLEDIR’ statements to reflect the locations of the MORGAN files on your system and the examples, respectively. Here is the relevant part of the ‘Makefile’,

     
    # Change the following macros to where MORGAN and the examples 
    # are installed on your system.  This is the only change you 
    # need to make in this file.
    
    MORGANDIR = ~/morgan/MORGAN_V34_Release
    EXAMPLEDIR = `pwd`
    BINDIR = ~/bin
    
    # Note: the paths may happen to be same for MORGANDIR and 
    # EXAMPLEDIR. In general they are different: 
    #   MORGANDIR is where MORGAN is installed on your system
    #   EXAMPLEDIR is the MORGAN_Examples directory you have made 
    #   (we have used the BASH command `pwd` to automate this)
    #   BINDIR is your bin directory
    # BINDIR is needed only if you prefer to link to executables from 
    # your bin directory, rather than running from executables in 
    # a current directory.
    

    For more information on how to use Makefile to build links, etc., you may type:

     
    make help
    

    To make symbolic links to those programs in the current directory, type

     
    make links 
    

Notes for Microsoft Windows users:

MORGAN may be (in principle) installed under Windows: executables should then be placed in the directory in which programs are to be run. See the documentation for more information. We cannot currently answer any questions regarding Windows installation. Instead, we recommend the use of a linux-system emulator such as Cygwin.

See Concept Index for: how to get the examples.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.4 Overview of the pedigrees used in the examples

Except for some small pedagogical pedigrees for pedcheck under ‘Pedcheck’, two main pedigree files are used to illustrate the usage of MORGAN programs.

File ‘jv_rep.ped’, located under ‘IBD’, is composed of two replicates of the JV pedigree. The 15-individual 5-generation JV pedigree derives from a real study of a rare recessive trait by Goddard et. al. [GYO96].

The other pedigree in ‘ped73.ped’, located under ‘MORGAN_Examples’, consists of three components and 73 individuals: component one has 47 individuals over 6 generations, component two 11 individuals over 3 generations, and component three 15 individuals over 3 generations. In general, individuals from later generations are observed. The three components are displayed in ‘ped47.pdf’, ‘ped11.pdf’ and ‘ped15.pdf’, which are located in the subdirectory ‘PedInfo’.

The pedigree file ‘ped73.ped’ is used in many examples throughout the tutorial: including Sample genedrop parameter file, Sample gl_auto parameter file, and the lod score programs Sample parameter files for lm_linkage and lm_bayes.

See Concept Index for: examples using pedigree file ‘ped73.ped’.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.5 Structure of the MORGAN package

It is not necessary to read this section in order to use MORGAN, to run the examples, or to modify them for your own use. However, for those who wish to modify MORGAN code, or to understand MORGAN more fully, it will be useful to have information on the directory structure, the README documentation, and the GOLD-standard documentation, Makefiles, and examples. These are therefore described in this section, updated for the released version of MORGAN 3.4.

  1. README documentation files

    Within the main MORGAN directory, there are program directories, and within these there the Gold-standard directories. At each level there are README files which provide additional documentation. In many cases, this information is duplicated in the tutorial, but whereas the Tutorial is focused to the user, README documentation is focused to the modifier and developer.

    1. README files in the main MORGAN directory

      These include ‘README_readme’, ‘README_MORGAN’, ‘README_install’, and ‘README_relnotes’.

      • README_readme’ describes the various README files throughout MORGAN.
      • README_MORGAN’ lists the MORGAN programs and describes briefly the analysis done by each program. It also lists the MORGAN 3.4 directories and libraries.
      • README_relnotes’ contains a summary of the changes and additions in recent releases of MORGAN.
      • README_install’ contains instructions for installing MORGAN executables.

      In some MORGAN releases there may be additional main-directory README files.

    2. README files in main program directories

      The main program directories of MORGAN 3.4 are PedComp, Genedrop, Autozyg, Lodscore, IBD_Haplo, and PolyEM. Each main program directory contains its own ‘README_userdoc’. This describes the inputs to be prepared for the programs, and the various program options. Most of this information is now included in the tutorial, but the README files may contain more detail in some cases.

      Each of the main program directories Genedrop, Autozyg and Lodscore contains a file ‘README_convert2_3.0’ which specifies the changes one must make in order to convert parameter files from MORGAN 2.9 to 3.0.

      The Library Subroutine directories do not contain README files.

    3. README files in Gold and Test subdirectories.

      Each main program directory contains a subdirectory Gold. These directories include examples that may be run to check correct installation of MORGAN, and to provide a wider array of example parameter files than are currently in the example files used in the tutorial. Each Gold subdirectory contains a ‘README_gold’ file detailing the examples in that directory.

  2. The subroutine library directories

    The subroutine library directories contain the code for the library routines. During installation of MORGAN, each creates a library file from which the required subroutines are loaded into the executable of each main program.

    The header files for all libraries and programs are contained in the Headers subdirectory of MORGAN. Typically there is one or more header files associated with each library, and named accordingly. For example, the file ‘nghds.h’ in ‘Headers’ corresponds to the Nghds subroutine library. More complex libraries such as Pars have a large number of corresponding header files.

    The libraries can be divided broadly into four groups:

    1. Lowest-level libraries required by all programs
      • Stuff: Routines for printing, allocating, freeing
      • Pars: Routines for processing MORGAN parameter statements
    2. Low-levels libraries performing various groups of functions
      • CMF: A set of routines mainly for matrix manipulation, originally translated from the FORTRAN CM library
      • Peel: Routines for pedigree peeling computations
      • Rans: Routines for random number generation
    3. Main libraries supporting genetic analysis programs
      • Pedchk: Routines for checking validity of input pedigrees. Routines for the pedchk program in PedComp, but also called by all programs.
      • Nghds: Routines for constructing the pedigree neighborhood structures from input pedigree files. Used by all programs with input pedigree data files.
      • Quant: Routines for handling quantitative trait data. Used by PolyEM programs and others that use quantitative trait data. Relies on the CMF matrix manipulation library.
      • Markers: Contains routines for sorting and analyzing marker and trait data. Also all the routines that allocate and set the underlying inheritance vector arrays used by MCMC-based programs.
      • Sample: Routines for MCMC sampling and related computations on pedigrees.
    4. Extra specialist libraries
      • TwoQTL: Routines for the Lodscore program lm_twoqtl
      • IBDgraph: Library to find equivalent IBD graphs; used by the Lodscore program gl_lods, and also by the ibd_class utility.
      • IBD_Create: Library containing the six subprograms of the ibd_create suite of programs, for use in simulating ibd graphs and structures, and haplotype data that can then be used in test analyses of other programs.

    In addition to the subroutine libraries, the subdirectory ‘Utils’ of Autozyg contains code for subroutines that are directly incorporated into the lm_ibdtests, lm_map and civil programs. Also, the subdirectory ‘NewRtnes’ of Lodscore includes code directly incorporated into the lm_bayes program. These routines were written by the authors of those programs, and have not been incorporated into the MORGAN subroutine libraries.

  3. The main program directories

    The main program directories of MORGAN 3.4 are PedComp, Genedrop, Autozyg, Lodscore, IBD_Haplo and PolyEM. When MORGAN is installed these directories contain the following executables:

    More details about all of these executable programs can be found either in this tutorial or in the README_userdoc files of the relevant main program directory.

  4. GOLD-STANDARD directories, Makefiles and examples

    The Gold subdirectories of the main program directories PedComp, Genedrop, Autozyg, Lodscore, IBD_Haplo and PolyEM contain example runs of all the main programs in order to test various aspects of code and installation. Examples for a particular main program are in the Gold subdirectory of that main program directory.

    The Gold subdirectories typically contain numerous test parameter files, pedigree files, and marker data files. The tests are run via Makefiles, and the command make help.gold will provide details. Additionally, the ‘README_gold’ file in each directory will give details of the examples.

    Examples may run using the make command. Typically the complete set of examples in any Gold directory is run using the command make all.gold. More detailed information is given by using make help.gold or by viewing the Makefile. Since the Gold tests and examples are intended primarily for developers, it is expected that viewing and modifying the Makefile examples will pose no difficulties.

See Concept Index for: MORGAN package structure, README documentation files, MORGAN program libraries, MORGAN subroutine libraries, MORGAN Gold standards.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Elizabeth Thompson on September 6, 2019 using texi2html 1.82.