#LyX 2.1 created this file. For more info see http://www.lyx.org/
\lyxformat 474
\begin_document
\begin_header
\textclass article
\begin_preamble
\usepackage{tocstyle}
\usepackage{fullpage}
\usepackage{changepage}
\usepackage{multicol}

\title{mega2-title}

\setcounter{tocdepth}{2}
\end_preamble
\use_default_options false
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman default
\font_sans default
\font_typewriter default
\font_math auto
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize 10
\spacing single
\use_hyperref true
\pdf_bookmarks true
\pdf_bookmarksnumbered false
\pdf_bookmarksopen false
\pdf_bookmarksopenlevel 1
\pdf_breaklinks false
\pdf_pdfborder false
\pdf_colorlinks false
\pdf_backref false
\pdf_pdfusetitle true
\papersize default
\use_geometry false
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 0
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 0
\use_package mhchem 1
\use_package stackrel 0
\use_package stmaryrd 0
\use_package undertilde 0
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 0
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip 1ex
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Title
Mega2
\begin_inset Newline newline
\end_inset


\begin_inset Quotes eld
\end_inset

Manipulation Environment for Genetic Analyses
\begin_inset Quotes erd
\end_inset


\begin_inset Newline newline
\end_inset

A data-handling program for facilitating
\begin_inset Newline newline
\end_inset

genetic linkage and association analyses
\end_layout

\begin_layout Date
\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
today
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="7" columns="1">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
Daniel E.
 Weeks
\emph default
 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Department of Human Genetics, University of Pittsburgh 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Copyright 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout

{
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
copyright
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout

}
\end_layout

\end_inset

 1997-2014 by the University of Pittsburgh 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Current Programmer: 
\shape italic
Robert V.
 Baron
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Previous Programmers:
\emph on
 Charles P.
 Kollar, Nandita Mukhopadhyay, Lee Almasy, Mark Schroeder, William P.
 Mulvihill.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
Jia Jia and Xinyu Tang helped with quality assurance testing.
 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
Xinyu Tang also helped with utility development.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
hrule
\end_layout

\end_inset

 
\end_layout

\begin_layout Standard

\series bold
\shape italic
Note:
\series default
 This documentation is available in PDF form from 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/docs/mega2_html/Mega2_Documentation.pdf
\end_layout

\end_inset

 and it is also included in the mega2_html folder of the Mega2 distribution.
\end_layout

\begin_layout Standard
\begin_inset VSpace smallskip
\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
hrule
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset CommandInset toc
LatexCommand tableofcontents

\end_inset


\end_layout

\begin_layout Section
Introduction
\end_layout

\begin_layout Standard
During an association or linkage  analysis project, one may need to analyze
 the data with several different programs.
 Unfortunately, it can often be quite difficult to get one's data in the
 proper format desired by each different computer program.
 Not only must the data be converted to the proper format, but also the
 loci must be reordered into their proper order.
 Writing custom reformatting scripts can be error-prone and very time-consuming.
 To address these problems, we created Mega2, which can be obtained following
 the instructions in Section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:Installation"

\end_inset

.
\end_layout

\begin_layout Standard
The Quick Start Mega2 tutorial in 
\begin_inset CommandInset ref
LatexCommand formatted
reference "sec:Quickstart---get"

\end_inset

 will help you get started using Mega2.
\end_layout

\begin_layout Standard
Mega2 can read input data in several formats: LINKAGE format, PLINK format,
 and VCF format (as listed here: 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Input-formats"

\end_inset

).
 Mega2 allows one to augment these input formats with additional information,
 if desired.
 For example, trait locus pentrance information can be specified.
 
\end_layout

\begin_layout Standard
Mega2 then takes the input files and, via a menu-driven interface, transforms
 them into various other file formats (listed here 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Output-formats"

\end_inset

), thus greatly facilitating a variety of different analyses.
 In addition, for many of these options, it also sets up a shell script
 that then can automatically run these analyses (if you are using Mega2
 in a Unix or Macintosh environment).
 
\end_layout

\begin_layout Standard
Mega2 is currently structured so that the user proceeds through a series
 of menus, making choices in each one (or accepting the default values),
 until the desired output files are created.
 After the desired output files are created, Mega2 exits.
 It can also be run in a 
\begin_inset Quotes eld
\end_inset

hands-free
\begin_inset Quotes erd
\end_inset

 mode, using a control file to specify these choices.
\end_layout

\begin_layout Standard
In addition to the ability to reformat data for a variety of analysis programs,
 other useful features of Mega2 include:
\end_layout

\begin_layout Enumerate
The ability to create publication-quality PDF plots of the results using
 our nplplot R library (See Section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:Creating-plots"

\end_inset

).
\end_layout

\begin_layout Enumerate
The ability to create custom tracks of results for visualization in the
 UCSC genome browser (See Section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:Custom-tracks-for"

\end_inset

).
\end_layout

\begin_layout Enumerate
The ability to run in an automated way using batch files (See Section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:Batch-mode"

\end_inset

).
\end_layout

\begin_layout Enumerate
The availability of our Genetic Map Interpolator for aiding in constructing
 genetic maps of markers (See Section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:Genetic-Map-Interpolator"

\end_inset

).
\end_layout

\begin_layout Enumerate
The ability to simulate genotype errors (See section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Simulate-errors"

\end_inset

).
\end_layout

\begin_layout Enumerate
Input and output support for Mega2 format files that contain informative
 header lines and are readable into R (See Section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Annotated-file-formats"

\end_inset

).
\end_layout

\begin_layout Enumerate
Input and output support for the widely-used PLINK format files (See Section
 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:PLINK-file-formats"

\end_inset

).
\end_layout

\begin_layout Enumerate
Input support for Variant Call Format (VCF, BCF, compressed VCF) files,
 including flexible filtering on input (See Section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:VCF-file-formats"

\end_inset

).
\end_layout

\begin_layout Enumerate
The ability to automatically zero out selected genotypes for specific individual
s in order to resolve Mendelian inconsistencies (See Section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Annotated-omit-file"

\end_inset

).
\end_layout

\begin_layout Enumerate
In most cases, in addition to generating appropriately re-formatted files,
 Mega2 also generates a shell script that will automatically run the desired
 program.
 
\end_layout

\begin_layout Enumerate
Creation of an HTML summary of the most recent run of Mega2, with links
 to input and output and log files (See Section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:MEGA2run.html-and-related"

\end_inset

).
\end_layout

\begin_layout Subsection
Graphical overview of Mega2
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{adjustwidth*}{-1.5cm}{-1.5cm}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset Graphics
	filename Mega2_overview.pdf
	scale 83

\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{adjustwidth*}
\end_layout

\end_inset


\end_layout

\begin_layout Subsection
Supported formats
\end_layout

\begin_layout Standard
Mega2 can convert data from three primary input formats to a large set of
 target output formats.
\end_layout

\begin_layout Subsubsection
Input formats 
\begin_inset CommandInset label
LatexCommand label
name "sub:Input-formats"

\end_inset


\end_layout

\begin_layout Standard
Mega2 supports the following input file formats:
\end_layout

\begin_layout Enumerate
Mega2 format (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Annotated-file-formats"

\end_inset

)
\end_layout

\begin_layout Enumerate
LINKAGE format (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Linkage-file-formats"

\end_inset

)
\end_layout

\begin_layout Enumerate
PLINK format (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:PLINK-file-formats"

\end_inset

)
\end_layout

\begin_layout Enumerate
Variant Call Format (VCF, BCF, compressed VCF) (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:VCF-file-formats"

\end_inset

)
\end_layout

\begin_layout Subsubsection
Output formats 
\begin_inset CommandInset label
LatexCommand label
name "sub:Output-formats"

\end_inset


\end_layout

\begin_layout Standard
Mega2 supports the following output file formats (For more detail, see Sections
 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:The-analysis-menu"

\end_inset

 and 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:Detailed-info-Analysis-Options"

\end_inset

):
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{multicols}{2}
\end_layout

\end_inset


\end_layout

\begin_layout Enumerate
SimWalk2 format 
\end_layout

\begin_layout Enumerate
Vintage Mendel format 
\end_layout

\begin_layout Enumerate
ASPEX format 
\end_layout

\begin_layout Enumerate
GeneHunter-Plus format 
\end_layout

\begin_layout Enumerate
GeneHunter format 
\end_layout

\begin_layout Enumerate
Create nuclear families 
\end_layout

\begin_layout Enumerate
SLINK format 
\end_layout

\begin_layout Enumerate
SPLINK format 
\end_layout

\begin_layout Enumerate
Homogeneity analyses 
\end_layout

\begin_layout Enumerate
SIMULATE format 
\end_layout

\begin_layout Enumerate
Create summary files 
\end_layout

\begin_layout Enumerate
Old SAGE format 
\end_layout

\begin_layout Enumerate
SOLAR format 
\end_layout

\begin_layout Enumerate
Vitesse format 
\end_layout

\begin_layout Enumerate
Linkage format 
\end_layout

\begin_layout Enumerate
Test loci for HWE 
\end_layout

\begin_layout Enumerate
Allegro format 
\end_layout

\begin_layout Enumerate
MLBQTL format 
\end_layout

\begin_layout Enumerate
SAGE format 
\end_layout

\begin_layout Enumerate
Pre-makeped format 
\end_layout

\begin_layout Enumerate
Merlin/SimWalk2-NPL format 
\end_layout

\begin_layout Enumerate
PREST format 
\end_layout

\begin_layout Enumerate
PAP format 
\end_layout

\begin_layout Enumerate
Merlin format 
\end_layout

\begin_layout Enumerate
Loki format 
\end_layout

\begin_layout Enumerate
Mendel format 
\end_layout

\begin_layout Enumerate
SUP format 
\end_layout

\begin_layout Enumerate
PLINK format 
\end_layout

\begin_layout Enumerate
CRANEFOOT format 
\end_layout

\begin_layout Enumerate
Mega2 format 
\end_layout

\begin_layout Enumerate
IQLS/Idcoefs format 
\end_layout

\begin_layout Enumerate
FBAT format 
\end_layout

\begin_layout Enumerate
PANGAEA MORGAN format 
\end_layout

\begin_layout Enumerate
Beagle format 
\end_layout

\begin_layout Enumerate
Eigenstrat format 
\end_layout

\begin_layout Enumerate
Structure format 
\end_layout

\begin_layout Enumerate
PSEQ format 
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{multicols}
\end_layout

\end_inset


\end_layout

\begin_layout Section
Download Mega2
\end_layout

\begin_layout Standard
Mega2 can be obtained from 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/register/
\end_layout

\end_inset

 .
\end_layout

\begin_layout Standard
Detailed installation instructions can be found in Section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:Installation"

\end_inset

.
\end_layout

\begin_layout Section
Recent improvements and changes
\end_layout

\begin_layout Subsection
Enhancements in Mega2 version 4.7.1
\end_layout

\begin_layout Itemize
Mega2 now gives you complete control to specify missing values for quantitative
 and affection phenotypes, both in the input data and for the data that
 Mega2 will output.
\end_layout

\begin_layout Itemize
Mega2's performance is almost twice as fast as Version 4.7.0
\end_layout

\begin_layout Subsection
Enhancements in Mega2 version 4.7.0
\end_layout

\begin_layout Itemize
Mega2 now passes non-numeric alleles through (without recoding them to numeric
 alleles) to analysis programs that will accept non-numeric alleles (section
 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Using-non-numeric-allele"

\end_inset

).
 This simplifies analyses, as it avoids relabelling alleles, making it easier
 to interpret the resulting output.
 Conversion to numeric alleles can still be requested if desired (section
 
\begin_inset CommandInset ref
LatexCommand ref
reference "force_numeric_alleles_cmd_line"

\end_inset

).
\end_layout

\begin_layout Itemize
Bug Fix: A number of problems with Beagle Analysis have been addressed.
\end_layout

\begin_layout Itemize
Bug Fix: Resolved an issue specifying PLINK mode interactively.
\end_layout

\begin_layout Itemize
Bug Fix: Problems discovered via the CLANG/LLVM compiler have been addressed.
\end_layout

\begin_layout Subsection
Enhancements in Mega2 version 4.6.2
\end_layout

\begin_layout Itemize
Mega2 can now read VCF, BCF, and compressed VCF input files, while applying
 optional 'VCFtools' filters (See section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:VCF-file-formats"

\end_inset

).
 
\end_layout

\begin_layout Itemize
Initial interactive menus have been modified to improve the specification
 of different input file types (See section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:The-input-menu"

\end_inset

).
\end_layout

\begin_layout Subsection
Enhancements in Mega2 version 4.6.1
\end_layout

\begin_layout Itemize
Mega2 can now produce PLINK/SEQ format files and a script for loading these
 files into a PLINK/SEQ project (See section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Detailed-info-PSEQ"

\end_inset

).
\end_layout

\begin_layout Itemize
Bug fix: Mega2 4.6.0 had broken support for Linkage format input when using
 a 
\begin_inset Quotes eld
\end_inset

Names file
\begin_inset Quotes erd
\end_inset

 (See section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Names-file"

\end_inset

).
\end_layout

\begin_layout Itemize
Added binaries for native Microsoft Windows 8 and MinGW built on Microsoft
 Windows 8.
\end_layout

\begin_layout Standard
\noindent
\begin_inset CommandInset line
LatexCommand rule
offset "0.5ex"
width "100line%"
height "1pt"

\end_inset


\end_layout

\begin_layout Section
Quick start - get Mega2 running in minutes
\begin_inset CommandInset label
LatexCommand label
name "sec:Quickstart---get"

\end_inset

 
\end_layout

\begin_layout Subsection
The fast, easy way to set up your files for Mega2 
\end_layout

\begin_layout Standard
Minimal input to Mega2 consists of three matched files: (1) a names file;
 (2) a pedigree file; and (3) a map file.
 We illustrate this here with a simple example pedigree: 
\begin_inset Newline newline
\end_inset

 
\end_layout

\begin_layout Standard
\align center
\begin_inset Graphics
	filename simple_ped.jpg

\end_inset

 
\end_layout

\begin_layout Standard
This pedigree consists of the mother, father and their three offspring.
 The mother and two of the siblings are considered to be affected for a
 binary trait called 'Trait' (as indicated by the shaded symbols), and all
 five pedigree members are also genotyped at a genetic marker 'Marker1'.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Standard
To analyze this pedigree, you need to create (1) a names file containing
 the trait and marker locus names, (2) a pedigree file with relationship,
 phenotype and genotype information, and (3) a map file indicating which
 chromosome Marker1 is on and its genetic map position.
 
\end_layout

\begin_layout Enumerate
Names file:
\end_layout

\begin_deeper
\begin_layout Standard
Mega2 supports the use of the relatively simple QTDT format "names" file
 (used by Merlin), containing two columns of data, (i) locus type and (ii)
 locus name.
 
\begin_inset Newline newline
\end_inset

 Call this file names.txt .
 For our example data, this is how it looks: 
\end_layout

\begin_layout LyX-Code
A   Trait       
\end_layout

\begin_layout LyX-Code
M   Marker1
\end_layout

\end_deeper
\begin_layout Enumerate
Pedigree file: 
\begin_inset Newline newline
\end_inset

 The 
\shape italic
pre-makeped
\shape default
 pedigree file format is a relatively simple format with the first 5 columns
 containing pedigree information followed by genotypes and phenotypes.
 The first 5 columns are: 
\begin_inset Newline newline
\end_inset

 pedigree-id, individual-id, father, mother, gender.
 
\end_layout

\begin_deeper
\begin_layout Standard
Genotypes and phenotypes have to match the order of the loci in the names
 file.
 Here, gender is coded as '1' = male, and '2' = female; the 'Trait' phenotypes
 are coded as '2' = affected, and '1' = unaffected.
 
\begin_inset Newline newline
\end_inset

 Call this file pedin.txt .
 Here is how it looks for our example data: 
\end_layout

\begin_layout LyX-Code
1   1  0  0  2  2  1  2
\end_layout

\begin_layout LyX-Code
1   2  0  0  1  1  1  1 
\end_layout

\begin_layout LyX-Code
1   3  2  1  2  2  1  2
\end_layout

\begin_layout LyX-Code
1   4  2  1  2  1  1  1
\end_layout

\begin_layout LyX-Code
1   5  2  1  1  2  1  2
\end_layout

\begin_layout Standard
The columns in this file are Pedigree, Person, Father, Mother, Gender, Trait
 phenotype, Marker1 allele 1, and Marker1 allele 2.
 
\end_layout

\begin_layout Standard
Note: the 
\shape italic
pre-makeped
\shape default
 pedigree file above is exactly the same layout as a PLINK PED file; but
 while the 
\shape italic
pre-makeped
\shape default
 pedigree file may have any number of traits, the PED file may have 
\series bold
only one
\series default
 trait.
\end_layout

\end_deeper
\begin_layout Enumerate
Map file: 
\begin_inset Newline newline
\end_inset

 This is a simple tabular format with three columns of data: chromosome
 number, position in centiMorgans and marker name.
 The first line is a header line and should be something like "Chromosome
 Haldane Name" (case is not relevant).
 
\end_layout

\begin_deeper
\begin_layout Standard
Call this file 
\begin_inset Quotes eld
\end_inset

map.txt
\begin_inset Quotes erd
\end_inset

.
 Note that the positions will be read in as Haldane centiMorgans.
 Our map file looks like this:
\end_layout

\begin_layout LyX-Code
Chromosome   Haldane  Name
\end_layout

\begin_layout LyX-Code
  1          1.0      Marker1
\end_layout

\begin_layout Standard
The second column heading decides whether the map function is Haldane or
 Kosambi.
 
\end_layout

\begin_layout Standard
Convert to Mega2 format files: Use the l2a.py utility to convert the three
 files you created as illustrated below: 
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
l2a.py -p pedin.txt -d names.txt -m map.txt -x 01 
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Three new files are created in the Mega2 format, pedin.01, names.01 and map.01.
 These look like the three files above, except that they all have header
 lines with columns names, e.g.
 the pedigree file has these column names 
\series bold
"Pedigree"
\series default
, 
\series bold
"ID"
\series default
, 
\series bold
"Father"
\series default
, 
\series bold
"Mother"
\series default
, 
\series bold
"Sex"
\series default
, 
\series bold
"Trait.A"
\series default
, 
\series bold
"Marker1.M.1"
\series default
, 
\series bold
"Marker2.M.2"
\series default
.
\end_layout

\end_deeper
\begin_layout Enumerate
Run mega2
\end_layout

\begin_layout Standard
From within a Unix (or Cygwin) shell, at the Unix prompt, type the command:
 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset

mega2 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Assuming that the
\shape italic
 Mega2
\shape default
 program has been installed according to the installation instructions,
 you should now see the first menu, like so: 
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
              Mega2 4.7.1 input menu:
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed
\end_layout

\begin_layout LyX-Code
 1) Select input file format:                   Mega2 format with header
\end_layout

\begin_layout LyX-Code
 2) Input file suffix:                          01
\end_layout

\begin_layout LyX-Code
 3) Locus file:       (Mega2 names.) [required] _
\end_layout

\begin_layout LyX-Code
 4) Pedigree file:    (Mega2 pedin.) [required] _
\end_layout

\begin_layout LyX-Code
 5) Map file:         (Mega2 map.)   [required] _
\end_layout

\begin_layout LyX-Code
 6) Omit file:        (Mega2 omit.)  [optional] _
\end_layout

\begin_layout LyX-Code
 7) Frequency file:   (Mega2 freq.)  [optional] _
\end_layout

\begin_layout LyX-Code
 8) Penetrance file:  (Mega2 pen.)   [optional] _
\end_layout

\begin_layout LyX-Code
 9) Output Directory:                           [ Current directory ]
\end_layout

\begin_layout LyX-Code
10) Simulate genotyping errors:                 [ no ]
\end_layout

\begin_layout LyX-Code
11) Include all pedigrees whether typed or not 
\end_layout

\begin_layout LyX-Code
12) Maximum number of alleles per marker:       2 alleles
\end_layout

\begin_layout LyX-Code
Select from options 0-12 >
\end_layout

\begin_layout Standard
This input menu displays the names of these three input files in the appropriate
 items (e.g., items 3, 4, and 5).
 When you are done making all your choices within this menu, to proceed
 to the next menu, choose item 0 
\begin_inset Quotes eld
\end_inset

Done with this menu - please proceed
\begin_inset Quotes erd
\end_inset

.
 Simply follow the instructions provided by this and subsequent menus to
 continue with the Mega2 analysis.
 
\end_layout

\begin_layout Standard
Note that option 1 allows one to instruct Mega2 to read PLINK format input
 files, either in binary format or in PED format, or Variant Call Format
 (VCF) input files in either binary (.bcf), compressed (.vcf.gz), or text (.vcf)
 format.
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
hypertarget{tips}{
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout

}
\end_layout

\end_inset


\end_layout

\begin_layout Subsection
Tips on more complex data 
\end_layout

\begin_layout Standard
Specifying allele-frequencies: 
\begin_inset Newline newline
\end_inset

 If you have allele frequencies available and wish to use these instead
 of letting Mega2 estimate them from the pedigree data, then you can set
 up a frequency file.
 The Mega2 format frequency file has three columns and looks like: 
\end_layout

\begin_layout LyX-Code
  Name      Allele  Frequency
\end_layout

\begin_layout LyX-Code
  Marker1   1       0.2
\end_layout

\begin_layout LyX-Code
  Marker1   2       0.8
\end_layout

\begin_layout Standard
It is not necessary for the trait locus to be included, but you may do so
 if you wish.
 If you name this file "frequency.01", then it is discovered automatically
 by Mega2 as a an input frequency file (and displayed in item 6 of the menu
 above).
 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
hypertarget{caution}{
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout

}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
This frequency file, as well as the other optional Mega2 files: the omit
 file and the penetrance file, may also be provided for PLINK format input.
 The files follow the exact same format as is used for the Mega2 input format.
 
\end_layout

\begin_layout Subsection
Word of caution regarding input file names 
\end_layout

\begin_layout Standard
For Macintosh OS X users: 
\begin_inset Newline newline
\end_inset

 Be careful when you select the common extension
\series bold
 .dat
\series default
 for your input files.
 If your map file is named
\series bold
 map.dat 
\series default
, and you create SimWalk2 files and then run SimWalk2, the 
\series bold
map.dat
\series default
 file will be overwritten by the SimWalk2 formatted file 
\series bold
MAP.DAT
\series default
.
 The default Macintosh file system is case-insensitive, so it would treat
 
\series bold
map.dat
\series default
 and 
\series bold
MAP.DAT
\series default
 as the same file.
\end_layout

\begin_layout Standard
\noindent
\begin_inset CommandInset line
LatexCommand rule
offset "0.5ex"
width "100line%"
height "1pt"

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace defskip
\end_inset


\end_layout

\begin_layout Section
Citing Mega2
\begin_inset CommandInset label
LatexCommand label
name "sec:Citing-Mega2"

\end_inset


\end_layout

\begin_layout Standard
If you use Mega2 as part of a published work, please remember to reference
 Mega2.
 You may reference it by citing the following: 
\end_layout

\begin_layout Quote
Mukhopadhyay N, Almasy L, Schroeder M, Mulvihill WP, Weeks DE (2005)
\begin_inset Newline newline
\end_inset

 Mega2: data-handling for facilitating genetic linkage and association analyses.
 
\begin_inset Newline newline
\end_inset

 Bioinformatics.
 2005 May 15;21(10):2556-7.
 
\begin_inset Newline newline
\end_inset

 PMID: 15746282
\end_layout

\begin_layout Standard
as well as citing the web site and the version that you used.
 For example, the web site citation for version 4.7.1 should be: 
\end_layout

\begin_layout Quote
Baron RV, Kollar CP, Mukhopadhyay N, Almasy L, Schroeder M, Mulvihill WP,
 Weeks DE (2013) Mega2 (Version 4.7.1).
 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu
\end_layout

\end_inset

 
\end_layout

\begin_layout Standard
If you use Mega2 to convert VCF or BCF input files, then, as this makes
 use of a built-in copy of VCFtools, you should also cite the following
 paper:
\end_layout

\begin_layout Quote
\begin_inset CommandInset href
LatexCommand href
name "The Variant Call Format and VCFtools"
target "http://dx.doi.org/10.1093/bioinformatics/btr330"

\end_inset

, Petr Danecek, Adam Auton, Goncalo Abecasis, Cornelis A.
 Albers, Eric Banks, Mark A.
 DePristo, Robert Handsaker, Gerton Lunter, Gabor Marth, Stephen T.
 Sherry, Gilean McVean, Richard Durbin and 1000 Genomes Project Analysis
 Group, Bioinformatics (2011) 27 (15): 2156-2158.
\end_layout

\begin_layout Section
Support, bug reports, and feedback
\begin_inset CommandInset label
LatexCommand label
name "sec:Support-bugreports-feedback"

\end_inset


\end_layout

\begin_layout Subsection
Mega2 feedback
\end_layout

\begin_layout Standard
As we strive to improve Mega2, we would greatly appreciate your feedback.
 This page provides a link to our Mega2 feedback form:
\end_layout

\begin_layout Standard
\begin_inset Flex URL
status open

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/docs/mega2_html/Mega2_feedback.html
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Or feel free to send us an e-mail (contact information below).
\end_layout

\begin_layout Subsection
Mega2 Google Group
\end_layout

\begin_layout Standard
Mega2 users are invited to participate in our Mega2 Google Group at 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://groups.google.com/forum/#!forum/mega2-users
\end_layout

\end_inset

.
 Support questions should be posted there.
\end_layout

\begin_layout Subsection
Bug reports
\end_layout

\begin_layout Standard
If you encounter a bug in Mega2, please send us a detailed bug report, including
 the following information:
\end_layout

\begin_layout Itemize
Program Name: Mega2
\end_layout

\begin_layout Itemize
Program Version: [Mega2 prints out a version number when you first start
 it up.]
\end_layout

\begin_layout Itemize
Platform: [Windows, Macintosh, Linux, etc.]
\end_layout

\begin_layout Itemize
Description:
\end_layout

\begin_layout Itemize
Example files: [If you can, please send us example files that will allow
 us to try to re-create the bug on our own computers.]
\end_layout

\begin_layout Standard
Please send your bug reports and feedback to: Daniel E.
 Weeks at weeks@pitt.edu
\end_layout

\begin_layout Section
Contact information
\begin_inset CommandInset label
LatexCommand label
name "sec:Contact-information"

\end_inset


\end_layout

\begin_layout LyX-Code
Daniel E.
 Weeks, Ph.D.
        
\end_layout

\begin_layout LyX-Code
Professor of Human Genetics and Biostatistics 
\end_layout

\begin_layout LyX-Code
Department of Human Genetics
\end_layout

\begin_layout LyX-Code
Graduate School of Public Health   
\end_layout

\begin_layout LyX-Code
University of Pittsburgh        
\end_layout

\begin_layout LyX-Code
Crabtree Hall, Room A303     
\end_layout

\begin_layout LyX-Code
130 DeSoto Street             
\end_layout

\begin_layout LyX-Code
Pittsburgh, PA 15261          
\end_layout

\begin_layout LyX-Code
USA                         
\end_layout

\begin_layout LyX-Code
                              
\end_layout

\begin_layout LyX-Code
1 412 624-5388              
\end_layout

\begin_layout LyX-Code
FAX: 1 412 624-3020         
\end_layout

\begin_layout LyX-Code
E-mail: weeks@pitt.edu 
\end_layout

\begin_layout LyX-Code
Web page: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu
\end_layout

\end_inset


\end_layout

\begin_layout Section
Installation
\begin_inset CommandInset label
LatexCommand label
name "sec:Installation"

\end_inset


\end_layout

\begin_layout Standard
\noindent
\align center
INSTALLATION INSTRUCTIONS FOR MEGA2 VERSION 4.7.1 AND HIGHER 
\end_layout

\begin_layout Subsection
Download Instructions
\begin_inset CommandInset label
LatexCommand label
name "sub:Download-Instructions"

\end_inset


\end_layout

\begin_layout Standard
Mega2 can be downloaded from: 
\end_layout

\begin_layout LyX-Code
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/register
\end_layout

\end_inset

 
\end_layout

\begin_layout Standard
The latest version is 4.7.1 
\end_layout

\begin_layout Enumerate
Download the Mega2 distribution package: 
\end_layout

\begin_deeper
\begin_layout LyX-Code
mega2_v4.7.1_src.tar.gz
\end_layout

\end_deeper
\begin_layout Enumerate
Uncompress the package using the "gunzip" Unix command.
 For example: 
\end_layout

\begin_deeper
\begin_layout LyX-Code
gunzip mega2_v4.7.1_src.tar.gz 
\end_layout

\end_deeper
\begin_layout Enumerate
Untar the result using the "tar" Unix command: 
\end_layout

\begin_deeper
\begin_layout LyX-Code
tar xvf mega2_v4.7.1_src.tar 
\end_layout

\begin_layout Standard
NOTE: You may combine the above two steps via a single command: 
\end_layout

\begin_layout Standard
tar xzvf mega2_v4.7.1_src.tar.gz 
\end_layout

\begin_layout Standard
The "z" instructs tar that it is a compressed archive.
 This is works for GNU-tar.
 
\end_layout

\end_deeper
\begin_layout Enumerate
At this point, you should see a new folder named 
\series bold
mega2_v4.7.1_src
\series default
.
 This is the "distribution folder" which contains all the necessary components
 of Mega2.
\end_layout

\begin_layout Subsubsection
Mega2 Bitbucket repository
\end_layout

\begin_layout Standard
You can obtain, using git, the latest development snapshot of the code from
 our Mega2 Bitbucket repository at 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://bitbucket.org/dweeks/mega2
\end_layout

\end_inset


\end_layout

\begin_layout Standard
The development snapshot is not as thoroughly tested as our stable release
 version available above, but will contain the newest features and changes.
\end_layout

\begin_layout Subsection
Prerequisites for Mega2 
\begin_inset CommandInset label
LatexCommand label
name "sub:Prerequisites-for-Mega2"

\end_inset


\end_layout

\begin_layout Standard
There are installation details specific to each particular platform that
 are covered in the platform specific sections below.
 But the common prerequisites will be described in this section.
 
\end_layout

\begin_layout Standard
Before you attempt to install and run Mega2, you should already have Perl,
 Python, R, awk or GNU-awk, bash and csh (or tcsh), and installed on your
 computer.
 All of the above except R are usually present on a typical Unix computer
 or within the Cygwin (
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

www.cygwin.com
\end_layout

\end_inset

) environment.
\end_layout

\begin_layout Standard
The R statistical package is used by Mega2’s Hardy-Weinberg equilibrium
 estimation options, as well as for plotting non-parametric linkage and
 variance-components LOD scores from the output of Merlin, LOD scores of
 Allegro and non-parametric linkage P-values from SimWalk2, as well as the
 Merlin/Simwalk2 combined analysis.
\end_layout

\begin_layout Subsubsection
R
\end_layout

\begin_layout Standard
R can be downloaded from the R distribution site 
\end_layout

\begin_layout LyX-Code
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://cran.r-project.org/
\end_layout

\end_inset

 
\end_layout

\begin_layout Standard
For installation instructions, see the R-documentation at: 
\end_layout

\begin_layout LyX-Code
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://cran.r-project.org/doc/manuals/R-admin.html
\end_layout

\end_inset

 
\end_layout

\begin_layout Subsubsection
R Libraries
\end_layout

\begin_layout Paragraph
Genetics package 
\end_layout

\begin_layout Standard
To use the HWE options, you need to obtain and install separately the R
 "genetics" library which provides functions to perform population-genetics
 related analyses.
\end_layout

\begin_layout Standard
The genetics package requires these other packages: 
\end_layout

\begin_layout LyX-Code
combinat, gdata, gtools, MASS, mvtnorm
\end_layout

\begin_layout Paragraph
The nplplot R package
\end_layout

\begin_layout Standard
To use the plotting option, you need the "nplplot" R library (version 4.5
 or greater), also distributed from CRAN.
 The Mega2 install.sh script now checks to see if you have the proper version
 installed.
\end_layout

\begin_layout Standard
To install these packages, open up R, go to the "Package manager" menu item,
 and use the "install from the web" option.
 To load in these libraries, you can again use the package manager menu.
 
\end_layout

\begin_layout Standard
Or alternatively at the command line, start up R, and then issue the R command:
 
\end_layout

\begin_layout LyX-Code
install.packages(c("genetics", "nplplot"), dependencies=T) 
\end_layout

\begin_layout Standard
You should be able to see the above libraries in the list of installed libraries.
 
\end_layout

\begin_layout Subsection
Installing Mega2 from a Binary Package
\end_layout

\begin_layout Subsubsection
Contents of a binary package
\end_layout

\begin_layout Standard
If you downloaded and unpacked the mega2_v4.7.1_src.tar.gz bundle following
 the download section (
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Download-Instructions"

\end_inset

), you should see a directory named mega2_v4.7.1_src containing the following
 directories (in bold) or files listed in alphabetical order:
\end_layout

\begin_layout Quotation
\begin_inset Tabular
<lyxtabular version="3" rows="21" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top" width="2in">
<column alignment="left" valignment="top" width="4in">
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Directory (bold) or file
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Contents
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
developer_documentation
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Directory containing documentation describing the technical details involved
 with adding a new output target to Mega2.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
example
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Directory containing example data and batch files.
 The MEGA2.BATCH.post creates output files for the Cranefoot option and the
 other MEGA2.BATCH.* files create output files for the Mendel option.
 The last four batch files below: MEGA2.BATCH_pre, MEGA2.BATCH_ped, MEGA2.BATCH_bed
, and MEGA2.BATCH_preannotated, run on the equivalent pre-makeped input files
 and will produce equivalent results.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
example_output_post
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Folder containing output files created by running mega2 on the *.ex files
 using the MEGA2.BATCH.post batch file.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
example_output_annotated
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Folder containing output files created by running with mega2 input files,
 using the batch file MEGA2.BATCH.annotated.
 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
example_output_pre
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Folder containing output files created by running mega2 on chromosome 5
 data using the MEGA2.BATCH.pre batch file from the example folder.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
example_output_ped
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Folder containing output files created by running mega2 with PLINK PED input
 files, using the batch file MEGA2.BATCH.ped.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
example_output_bed
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Folder containing output files created by running mega2 with PLINK binary
 input files, using the batch file MEGA2.BATCH.bed.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
example_output_preannotated
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Folder containing output files created by running mega2 with mega2 input
 files, using the batch file MEGA2.BATCH.preannotated.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
install.sh
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Bash script for installing Perl scripts and Mega2.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
LICENSE.txt
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
License agreement.
 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
l2a.py.src
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Python script linkage_to_annotated.py to convert linkage-style format files
 to the new Mega2 format.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
make_gen_table.pl.src
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perl source code to reformat the output of the GEN program to a table.
 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
make_hwe_table.pl.src
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perl source code to reformat the output of the HWE program to a table.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
map_making_utils
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Folder of awk scripts for creating the old Mega2 format map files.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
mega2log2html.pl.src
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perl source to create html-formatted Mega2 log and summary files.
 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
mega2_bin
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Pre-compiled binaries for some platforms.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
mega2_html
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
PDF and html documentation pages for Mega2
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
merlin2sw2.pl.src
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perl source for feeding Merlin output into SimWalk2 for the Merlin-SimWalk2
 combined option.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Rallegro.pl.src Rmerlin.pl.src Rsimwalk2.pl.src
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Perl source files for reformatting Allegro, Merlin and SimWalk2 linkage-analysis
 output for plotting by nplplot.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
srcdir
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Mega2 source code
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsubsection
Mega2 Binaries
\end_layout

\begin_layout Standard
In the 
\series bold
mega2_bin
\series default
 directory, there will be binary versions of Mega2 for several platforms.
 These binaries will have a Mega2 version number and a platform version
 number.
 Typically, the Mega2 binary references dynamic load libraries (.dll's or
 .so's) for a particular platform/version and will not necessarily work on
 other versions of the platform.
 There are separate native binaries for Microsoft Windows 7 vs Microsoft
 Windows 8.
 Also, the binaries for MinGW are labeled according to whether they were
 built on Windows 7 vs Windows 8.
 (MinGW needs two .dll's if you wish to install just Mega2 without the whole
 MinGW.
 They are included and depend on Windows Version.)
\end_layout

\begin_layout Standard
The 
\series bold
install.sh
\series default
 program (below) determines whether any compiled binaries will work on your
 platform.
 (Alternatively, 
\series bold
install.sh
\series default
 will compile an appropriate binary from the source.
\end_layout

\begin_layout Subsubsection
Installing Mega2
\end_layout

\begin_layout Standard
To install the mega2 executable, Perl scripts and nplplot, from within the
 Mega2 package folder (i.e.
 mega2_v4.7.1_src in above step), type the command:
\end_layout

\begin_layout LyX-Code
./install.sh 
\end_layout

\begin_layout Standard
It prompts the user to enter a directory to install the Mega2 components
 into.
 Enter the full path name of the desired directory e.g.
\end_layout

\begin_layout LyX-Code
/usr/local/bin
\end_layout

\begin_layout Standard
(do not add a trailing backslash!)
\end_layout

\begin_layout Standard
The directory entered above must be in the user’s path and you will need
 write permission to copy files into this directory.
\end_layout

\begin_layout Standard
On some platforms, you may need to type ’rehash’ to refresh your search
 path (this is not necessary on Linux, and the `rehash' command is not a
 standard Linux command).
 
\end_layout

\begin_layout Standard
Mega2 can now be run on a set of data by simply typing the command "mega2".
 It should be invoked from within the directory containing the input data
 files.
\end_layout

\begin_layout Subsection
Compiling and Installing Mega2 from Source 
\begin_inset CommandInset label
LatexCommand label
name "sub:Compiling-and-Installing"

\end_inset


\end_layout

\begin_layout Standard
The mega2_v4.7.1_src.tar.gz package also includes a source code folder "srcdir"
 containing C source files, a Makefile, and several OS-specific Makedefs
 files that define compilation flags that govern locations of standard C
 libraries, and other OS-specific behavior.
\end_layout

\begin_layout Standard
Please note that GNU-make is required to compile Mega2.
\end_layout

\begin_layout Standard
To compile Mega2 follow these steps:
\end_layout

\begin_layout Enumerate
From within the mega2_v4.7.1_src folder, type 
\end_layout

\begin_deeper
\begin_layout LyX-Code
./install.sh
\end_layout

\begin_layout Standard
to find out whether your OS or OSTYPE variable is recognized.
 This script attempts to determine the platform using the 
\emph on
uname
\emph default
 command.
 
\end_layout

\end_deeper
\begin_layout Enumerate
The script will print an error message if the platform is not included within
 a pre-defined list, and ask you to create a Makedefs file to describe compilati
on parameters for your specific platform.
 
\end_layout

\begin_layout Enumerate
Create this file by adapting one of the existing Makedefs files.
 
\end_layout

\begin_layout Enumerate
Run 
\end_layout

\begin_deeper
\begin_layout LyX-Code
./install.sh 
\end_layout

\begin_layout Standard
again, and 
\begin_inset Quotes eld
\end_inset

make all
\begin_inset Quotes erd
\end_inset

 will be run to compile Mega2.
 Finally, you will be prompted for the name of an installation path as before.
 Mega2 will then proceed to install the Mega2 binary and Perl programs correctly.
 
\end_layout

\end_deeper
\begin_layout Standard
If you make changes to Mega2’s source code, we would greatly appreciate
 your informing us of what changes you made and why.
 
\end_layout

\begin_layout Subsection
Running Mega2 on Your Data
\end_layout

\begin_layout Standard
Familiarize yourself by running Mega2 on the example data provided.
\end_layout

\begin_layout Enumerate
cd into the 
\series bold
example/
\series default
 folder.
\end_layout

\begin_layout Enumerate
Check its contents by using the ls command.
\end_layout

\begin_deeper
\begin_layout Standard
The 
\series bold
example
\series default
/ folder contains the following files:
\end_layout

\begin_layout Standard
datain.05
\end_layout

\begin_layout Standard
map.05
\end_layout

\begin_layout Standard
MEGA2.BATCH.post
\end_layout

\begin_layout Standard
datain.ex
\end_layout

\begin_layout Standard
pedin.ex
\end_layout

\begin_layout Standard
map.ex
\end_layout

\begin_layout Standard
omit.ex
\end_layout

\begin_layout Standard
pedin.pre.05
\end_layout

\begin_layout Standard
MEGA2.BATCH.pre
\end_layout

\begin_layout Standard
names.annotated
\end_layout

\begin_layout Standard
frequency.annotated
\end_layout

\begin_layout Standard
penetrance.annotated
\end_layout

\begin_layout Standard
map.annotated
\end_layout

\begin_layout Standard
pedin.annotated
\end_layout

\begin_layout Standard
MEGA2.BATCH.annotated
\end_layout

\begin_layout Standard
names.preannotated
\end_layout

\begin_layout Standard
frequency.annotated
\end_layout

\begin_layout Standard
penetrance.annotated
\end_layout

\begin_layout Standard
map.preannotated
\end_layout

\begin_layout Standard
pedin.preannotated
\end_layout

\begin_layout Standard
MEGA2.BATCH.preannotated
\end_layout

\begin_layout Standard
ped.ped
\end_layout

\begin_layout Standard
ped.map
\end_layout

\begin_layout Standard
ped.phe
\end_layout

\begin_layout Standard
ped.frequency
\end_layout

\begin_layout Standard
ped.penetrance
\end_layout

\begin_layout Standard
MEGA2.BATCH.ped
\end_layout

\begin_layout Standard
bed.fam
\end_layout

\begin_layout Standard
bed.bed
\end_layout

\begin_layout Standard
bed.map
\end_layout

\begin_layout Standard
ped.phe
\end_layout

\begin_layout Standard
ped.frequency
\end_layout

\begin_layout Standard
ped.penetrance
\end_layout

\begin_layout Standard
MEGA2.BATCH.bed 
\end_layout

\end_deeper
\begin_layout Standard
These constitute several sets of the preexisting Mega2 format data files,
 namely the ".05" data set and the ".ex" data set, as well as a data set in
 the Mega2 format.
 The "pedin.pre" file is analogous to the "pedin.05", except that it is in
 pre-makeped format.
 The *.ex set also includes an omit file to illustrate the usage of the "omit"
 file.
 The pedin.pre.05 file is a pre-Makeped format file.
 It uses the datain.05 locus data file.
 The Mega2 data set was created by running the python script linkage_to_annotate
d.py on the ".05" data set.
\end_layout

\begin_layout Enumerate
Run mega2, by simply issuing the command mega2 without any arguments, or
 you may run it using one of the batch files:
\end_layout

\begin_deeper
\begin_layout LyX-Code
mega2 MEGA.BATCH.pre
\end_layout

\begin_layout Standard
Your own data can be run exactly as above; simply change into your data
 folder, and run Mega2.
 
\end_layout

\end_deeper
\begin_layout Enumerate
Example Output:
\end_layout

\begin_deeper
\begin_layout Standard
\noindent
\align left
The example_output_pre, example_output_post, example_output_annotated, example_o
utput_ped, example_output_bed and example_output_preannotated directories
 contain output from Mega2 when run using the MEGA2.BATCH.pre, MEGA2.BATCH.post,
 MEGA2.BATCH.annotated, MEGA2.BATCH.ped, MEGA2.BATCH.bed and MEGA2.BATCH.preannotated
 batch files in the example/ directory.
 
\end_layout

\end_deeper
\begin_layout Subsection
Mega2 Documentation
\end_layout

\begin_layout Standard
The sub-folder called mega2_html/ within the mega2_v4.7.1_src folder contains
 documentation for mega2.
 The Mega2 documentation is also available on-line at 
\end_layout

\begin_layout LyX-Code
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/docs/mega2_html/
\end_layout

\end_inset

 
\end_layout

\begin_layout Subsection
License Agreement
\end_layout

\begin_layout Standard
Distribution of Mega2 is governed by the terms of GNU General Public License
 Version 3 (
\begin_inset CommandInset href
LatexCommand href
name "GPLv3"
target "http://www.gnu.org/licenses/gpl-3.0.html"

\end_inset

) 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:GNU-General-Public"

\end_inset

.
\end_layout

\begin_layout Standard
Mega2 uses two libraries developed by other external groups, the sources
 of which are included with the Mega2 sources.
 Minimal modifications have been made to these two libraries to facilitate
 their integration with Mega2.
 The VCFtools library handles reading of the various Variant Call Format
 (VCF) input files.
 ZLIB is needed by the VCFtools library and is also used to format Beagle
 output.
 The VCFtools library is released under the GNU Lesser General Public License
 Version 3 (
\begin_inset CommandInset href
LatexCommand href
name "LGPLv3"
target "http://www.gnu.org/copyleft/lesser.html"

\end_inset

) 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:GNU-Lesser-General"

\end_inset

, and the MIT license 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:MIT-License---"

\end_inset

.
 The license for ZLIB is shown in 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:License-for-ZLIB"

\end_inset

.
\end_layout

\begin_layout Subsection
Feedback and Bug Reports
\end_layout

\begin_layout Standard
If any of these instructions are not clear, please let us know via our feedback
 form by following the "Feedback/Bug report" link on the following page:
\end_layout

\begin_layout LyX-Code
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/register/
\end_layout

\end_inset


\end_layout

\begin_layout Standard
You may also use this feedback form to send us comments and bug reports
 on Mega2.
\end_layout

\begin_layout Subsection
Macintosh-specific installation issues
\end_layout

\begin_layout Subsubsection
Introduction to Command line programs for Mac users
\end_layout

\begin_layout Standard
You will need to familiarize yourself with using the Macintosh OS terminal,
 as installing and using Mega2 is mainly done within a Unix terminal.
\end_layout

\begin_layout Paragraph
Unix organization conventions
\begin_inset CommandInset label
LatexCommand label
name "par:Unix-organization-conventions"

\end_inset


\end_layout

\begin_layout Standard
The "Users" folder contains sub-folders with user names matching those that
 have user-accounts on your computer.
 Each user has full access and modification permissions to his or her /home/user
_name folder.
\end_layout

\begin_layout Standard
All other folders can only be written or modified by the administrator.
 The /bin and /sbin folder contains system programs that are very basic
 to Unix (such as ls, cd, rm, mkdir, bash, tcsh etc.).
\end_layout

\begin_layout Standard
The /usr folder hierarchy is used to install programs that should be made
 available to all users.
 Widely-used standard Unix software such as compilers and language development
 tools (gcc, Perl, Python) are directly installed inside /usr.
 Thus to run Perl from inside a terminal, you would invoke /usr/bin/perl.
\end_layout

\begin_layout Standard
There is also a /usr/local folder hierarchy inside the /usr folder which
 is normally used to install lesser known or non-standard software, of which
 Mega2 would be an example.
 Thus, you may choose to install your genetic analysis software (such as
 Merlin, SimWalk2 etc.) inside the /usr/local/bin folder.
 
\end_layout

\begin_layout Paragraph
The Mac OS environment
\end_layout

\begin_layout Standard
When you open up a Mac terminal window, you can use Unix commands such as
 ls (list folder contents), cd (change directory) etc.
 The default folder associated with such a window (i.e.
 before you issue a a cd command), is your "home" folder, generally named
 
\emph on
/Users/your-user-name.

\emph default
 Your Desktop folder is called 
\emph on
/Users/your-user-name/Desktop
\emph default
.
 
\end_layout

\begin_layout Paragraph
Command line version of R
\end_layout

\begin_layout Standard
R is required to use Mega2’s Hardy-Weinberg equilibrium estimation options,
 as well as for plotting LOD scores from the output of Merlin, SimWalk2,
 and Allegro.
 Therefore, for full functionality, you need to obtain and install the R
 software.
 The command line version of R is identical to R as used on other Unix operating
 systems.
 Therefore general documentation for R applies to this version as well.
 On each release (and patched-release), binaries are distributed through
 CRAN.
 These binaries come with a common installer used by R.app so please read
 the related notes (see How to get R.app).
 To use R, you probably need to add a symbolic link on your system as the
 R binary is located inside the MAC 
\begin_inset Quotes eld
\end_inset

framework
\begin_inset Quotes erd
\end_inset

 hierarchy.
 Suppose you have the /usr/local/bin directory on your system (if you do
 not have one, you can use /usr/bin instead), you should just type in your
 Terminal (a root password is required) 
\end_layout

\begin_layout LyX-Code
sudo ln -s /Library/Frameworks/R.framework/Resources/R /usr/local/bin/R
\end_layout

\begin_layout Standard
Assuming that you have /usr/local/bin in your PATH environment variable,
 you will be able to launch R from any location on your system just by typing
 R.
 In this way, when you install a new version of the R.framework this link
 will point to the latest R binary.
\end_layout

\begin_layout Subsubsection
Xcode compilation environment
\end_layout

\begin_layout Standard
Xcode is free software, and contains development tools including "make"
 and "gcc", both of which are required to compile and install Mega2.
 Xcode is not typically installed by default, but is available on one of
 the Mac OS system install DVDs that came with your computer.
 Xcode is also available as a free download from:
\end_layout

\begin_layout LyX-Code
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://developer.apple.com/technologies/tools/xcode.html
\end_layout

\end_inset

 
\end_layout

\begin_layout Standard
You need to be a registered Apple user to download Xcode.
 
\end_layout

\begin_layout Subsection
Unix-specific installation issues
\end_layout

\begin_layout Standard
This release of Mega2 has been tested on several versions of Ubuntu Linux.
 It should work on other Unixes as well.
 The supplied binaries are for Ubuntu 10.04.2 both 32 and 64 bit platforms
 as well as for Ubuntu 11.04 both 32 and 64 bit platforms.
 Be careful to run the appropriate binary on the matching platform.
\end_layout

\begin_layout Standard
If you discover errors, please report them so we can improve our port.
\end_layout

\begin_layout Standard
Note: The current version of mega2 has some C++ files.
 If you compile mega2 from source, make sure that your system includes a
 C++ compiler.
 
\end_layout

\begin_layout Subsection
Windows Cygwin installation 
\end_layout

\begin_layout Subsubsection
Cygwin POSIX windows environment
\end_layout

\begin_layout Standard
Cygwin(
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

www.cygwin.com
\end_layout

\end_inset

) provides a rather complete Posix Unix environment running on top of a
 Windows platform.
 An interface layer lets traditional Unix programs be compiled and interface
 with Windows services.
 Thus all of the Unix programs can be made available.
\end_layout

\begin_layout Standard
If you are planning to use the Cygwin environment extensively to run Mega2
 and other programs, you should familiarize yourself with the Unix system
 in general; see 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Unix-organization-conventions"

\end_inset

 (above).
\end_layout

\begin_layout Standard
Before you attempt to install and run Mega2, Cygwin should already have
 been installed on your Windows machine.
\end_layout

\begin_layout Paragraph
Installing Cygwin
\end_layout

\begin_layout Standard
Download and install Cygwin from 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://cygwin.com
\end_layout

\end_inset

, the Cygwin distribution site.
\end_layout

\begin_layout Standard
IMPORTANT: the cygwin version should be 1.7.9-1 or higher to be able to run
 Mega2.
 
\end_layout

\begin_layout Standard
Run
\end_layout

\begin_layout LyX-Code
setup.exe
\end_layout

\begin_layout Standard
Click on either the "install" or "install/update" link and follow the instructio
ns.
\end_layout

\begin_layout Standard
The cygwin user’s guide can be found at:
\end_layout

\begin_layout LyX-Code
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html
\end_layout

\end_inset


\end_layout

\begin_layout Standard
If your Windows machine has multiple user-accounts, you should install cygwin
 when logged in as "administrator".
 Also, select the "All users" default option to make Cygwin available to
 all users.
\end_layout

\begin_layout Standard
You should do a custom install of Cygwin, and make sure that the following
 are selected/installed: 
\end_layout

\begin_layout Enumerate
Perl (top level; click on ’Default’ to change it to ’Install’) 
\end_layout

\begin_layout Enumerate
tcsh and bash (inside "Shells"; bash is already selected for installation)
 
\end_layout

\begin_layout Enumerate
GNU C libraries (inside "Devel"; libgcc1 is already selected for installation)
 
\end_layout

\begin_layout Enumerate
gcc compiler (inside “Devel”; choose the version 4 compiler gcc4-core) 
\end_layout

\begin_layout Enumerate
gdb debugger (inside 
\begin_inset Quotes eld
\end_inset

Devel
\begin_inset Quotes erd
\end_inset

; just in case)
\end_layout

\begin_layout Enumerate
make (inside "Devel", named "make: The GNU version of the ’make’ utility"’)
 
\end_layout

\begin_layout Enumerate
Python (top level).
 
\end_layout

\begin_layout Enumerate
An editor such as nano, or vim (inside "Editors") 
\end_layout

\begin_layout Enumerate
The gawk interpreter (inside "Interpreters") 
\end_layout

\begin_layout Enumerate
Finally, R (inside 
\begin_inset Quotes eld
\end_inset

Interpreters
\begin_inset Quotes erd
\end_inset

) can be installed if the pre-compiled versions available are new enough
 for your purposes.
\end_layout

\begin_layout Standard
Click on the check box next to each of these items, and change the "default"
 to "install".
\end_layout

\begin_layout Standard
In the newest version of Cygwin, many of these are set to install by default,
 however you should verify this.
 If you do forget to install any of these components, you may update the
 existing installation rerunning the same setup script "setup.exe".
 
\end_layout

\begin_layout Paragraph
The Cygwin environment
\end_layout

\begin_layout Standard
Cygwin provides a Unix-like environment inside the Windows operating system.
 During the installation process it will prompt you for an installation
 path.
 Let us assume that you choose to install it on the Desktop.
 Then you will see a folder called Cygwin on the Desktop, which contains
 folders named "home", "bin", "etc", "tmp", "sbin", "usr" etc.
\end_layout

\begin_layout Standard
An icon is created on the Desktop for running the Cygwin program.
 When you click on this icon, Cygwin starts an interactive shell (resembling
 the Windows DOS shell), and puts you inside the /home/your_user_name folder.
 
\end_layout

\begin_layout Paragraph
Accessing data 
\end_layout

\begin_layout Standard
Files within Cygwin folders from the Windows can be opened using the Windows
 file explorer.
 All cygwin files and folders are kept within the Cygwin installation folder
 (in our example: Desktop/Cygwin).
\end_layout

\begin_layout Standard
To access Windows files from inside of Cygwin, note that relative to Cygwin,
 all Windows drives can be accessed by using the ’/cygdrive/’ path prefix.
 For example, to list files and folders on your C drive, do this:
\end_layout

\begin_layout LyX-Code
ls /cygdrive/c 
\end_layout

\begin_layout Standard
to list the contents of the directory C: 
\end_layout

\begin_layout Standard
(Inside Unix, you are always required to enclose names inside quotes if
 they have white-spaces inside them.) 
\end_layout

\begin_layout Paragraph
Introduction to command line programs for Windows
\end_layout

\begin_layout Standard
The "home" folder contains sub-folders with user names matching those that
 have user-accounts on your Windows machine.
 Each user has full access and modification permissions to his or her /home/user
_name folder.
\end_layout

\begin_layout Standard
All other folders can only be written or modified by the administrator.
 The /bin and /sbin folder contains system programs that are very basic
 to Unix (such as ls, cd, rm, mkdir, bash, tcsh etc.).
\end_layout

\begin_layout Standard
The /usr folder hierarchy is used to install programs that should be made
 available to all users.
 Widely-used standard Unix software such as compilers and language development
 tools (gcc, Perl, Python) are directly installed inside /usr.
 Thus to run Perl from inside Cygwin, you would invoke /usr/bin/perl.
\end_layout

\begin_layout Standard
There is also a /usr/local folder hierarchy inside the /usr folder which
 is normally used to install lesser known or non-standard software, of which
 Mega2 would be an example.
 Thus, you may choose to install your genetic analysis software (such as
 Merlin, SimWalk2 etc.) inside the /usr/local/bin folder.
 
\end_layout

\begin_layout Subsubsection
R installation:
\begin_inset CommandInset label
LatexCommand label
name "sub:R-installation:"

\end_inset


\end_layout

\begin_layout Standard
R is required to use Mega2’s Hardy-Weinberg equilibrium estimation options,
 as well as for plotting LOD scores from the output of Merlin, SimWalk2,
 and Allegro.
 You can follow the earlier instructions and include R from the Cygwin repositor
y.
\end_layout

\begin_layout Standard
Alternatively, the windows version of R can be downloaded from the R distributio
n site 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://cran.r-project.org/
\end_layout

\end_inset

.
 By default R will install into a folder named R inside the Program Files
 folder.
 Each version of R installs into a separate sub-folder inside R, e.g., if
 you installed version 2.13.0, you should have a folder
\end_layout

\begin_layout LyX-Code
c:Program Files/R/R-2.13.0/
\end_layout

\begin_layout Standard
The R executable (.exe) file is named R.exe and resides inside R-2.13.0/bin.
\end_layout

\begin_layout Standard
To make sure that Cygwin knows where to find R, start up Cygwin as administrator
, change directory into /usr/bin, and create an alias to this R-executable
 using the following command:
\end_layout

\begin_layout Quotation
ln -s /cygdrive/c/Program
\backslash
 Files/R/R-2.13.0/bin/R.exe R 
\end_layout

\begin_layout Subsubsection
Mega2 Download instructions for Windows
\begin_inset CommandInset label
LatexCommand label
name "sub:Mega2-Download-instructions"

\end_inset


\end_layout

\begin_layout Standard
Mega2 can be downloaded from:
\end_layout

\begin_layout LyX-Code
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/register
\end_layout

\end_inset


\end_layout

\begin_layout Standard
You need to have registered your e-mail before you can download software
 at this site.
\end_layout

\begin_layout Enumerate
The Mega2 distribution package is named mega2_v4.7.1_src.tar.gz.
 Download this package into your Downloads folder.
\end_layout

\begin_layout Enumerate
Depending on your browser settings, Windows may automatically untar the
 file, in which case you will see this folder on your desktop instead: 
\end_layout

\begin_deeper
\begin_layout LyX-Code
mega2_v4.7.1_src.tar
\end_layout

\end_deeper
\begin_layout Enumerate
Now please follow the common installation instructions in section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Download-Instructions"

\end_inset

.
 
\end_layout

\begin_layout Enumerate
Note: In some cases, your file may be downloaded as: 
\end_layout

\begin_deeper
\begin_layout LyX-Code
mega2_v4.7.1_src.tar.tar
\end_layout

\begin_layout Standard
instead of as:
\end_layout

\begin_layout LyX-Code
mega2_v4.7.1_src.tar.gz
\end_layout

\begin_layout Standard
If that happens, then rename the “tar.tar” file as follows:
\end_layout

\begin_layout LyX-Code
mv mega2_v4.7.1_src.tar.tar mega2_v4.7.1_src.tar.gz
\end_layout

\begin_layout Standard
and then follow the common installation instructions in section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Download-Instructions"

\end_inset

.
 
\end_layout

\end_deeper
\begin_layout Subsection
Windows Mingw installation
\begin_inset CommandInset label
LatexCommand label
name "sub:Windows-Mingw-installation"

\end_inset


\end_layout

\begin_layout Subsubsection
Mingw POSIX windows environment
\end_layout

\begin_layout Standard
Mingw (
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

www.mingw.org
\end_layout

\end_inset

) provides a 
\series bold
min
\series default
imal 
\series bold
G
\series default
NU environment running on top of a 
\series bold
W
\series default
indows platform.
 The environment is just sufficient to support the traditional gcc C language
 compiler and other elements of the tool chain.
 Some additional programs have been ported as well such as bash.
 But all the target libraries and services used are supplied by Windows.
 Thus most Unix programs have to be modified to compile and link in this
 environment.
 Still, these programs will run faster than the equivalent programs available
 under Cygwin which has an interface library between the programs and the
 Windows services.
\end_layout

\begin_layout Standard
Before you attempt to install and run Mega2, Mingw should already have been
 installed on your Windows machine.
\end_layout

\begin_layout Paragraph
Installing Mingw
\end_layout

\begin_layout Standard
Browse the Mingw page 
\end_layout

\begin_layout LyX-Code
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.mingw.org/wiki/Getting_Started
\end_layout

\end_inset


\end_layout

\begin_layout Standard
on the Mingw distribution site.
 Click on the link
\end_layout

\begin_layout LyX-Code
mingw_get_inst
\end_layout

\begin_layout Standard
to get the interactive loader.
 Select g++ and in addition select the development environment.
 After a few minutes of downloading, mingw and MSYS (the development environment
 programs) will be set up on you machine.
 To allow easy access to all of the programs, add 
\end_layout

\begin_layout LyX-Code
c:
\backslash
mingw
\backslash
bin
\end_layout

\begin_layout Standard
and 
\end_layout

\begin_layout LyX-Code
c:
\backslash
mingw
\backslash
msys
\backslash
1.0
\backslash
bin 
\end_layout

\begin_layout Standard
to your path.
 
\end_layout

\begin_layout Paragraph
Building Mega2
\end_layout

\begin_layout Standard
You should follow the previous instructions for downloading Mega2 on Windows
 (
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Mega2-Download-instructions"

\end_inset

) and then just build Mega2.
 The instructions for compiling were given in section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Compiling-and-Installing"

\end_inset

.
\end_layout

\begin_layout Paragraph
Using Mega2
\end_layout

\begin_layout Standard
Following the previous recipe, you will have a Mega2 binary program.
 But as discussed earlier and summarized in section
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:List-of-third-party"

\end_inset

, there are several third party programs that are needed by Mega2.
 Mingw only provides Perl and Bash.
 You will have to download Python and R and csh if you need them.
\end_layout

\begin_layout Subsection
Native Windows installation
\begin_inset CommandInset label
LatexCommand label
name "sub:Native-Windows-installation"

\end_inset


\end_layout

\begin_layout Subsubsection
Native Windows environment
\end_layout

\begin_layout Standard
All that is truly necessary to build Mega2 is a compiler and the GNU make
 program.
 Microsoft provides a free C/C++ compiler as part of its Visual Studio Express;
 visit
\end_layout

\begin_layout LyX-Code
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express
\end_layout

\end_inset


\end_layout

\begin_layout Standard
and download the C++ compiler.
\end_layout

\begin_layout Standard
Note: You will not be using the IDE just the compiler and linker from visual
 studio.
 This means you need to put them on your path before doing the 
\emph on
make
\emph default
 (below).
 The easiest way to do this is to run the script 
\series bold
vcvars32.bat
\series default
 in the binary directory of visual studio visual C++ compiler.
\end_layout

\begin_layout Standard
It is a bit harder to find a native version of GNU make that is not part
 of Cygwin or Mingw.
 The sourceforge project GNU Win32 has it at:
\end_layout

\begin_layout LyX-Code
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://gnuwin32.sourceforge.net/packages/make.htm
\end_layout

\end_inset


\end_layout

\begin_layout Standard
You should download GNU make and install it to some place on your path.
\end_layout

\begin_layout Paragraph
Building Mega2
\end_layout

\begin_layout Standard
You should follow the previous instructions for downloading Mega2 on Windows
 (
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Mega2-Download-instructions"

\end_inset

) and then just build Mega2.
 Unfortunately, the instructions that were given in section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Compiling-and-Installing"

\end_inset

 do not work because 
\series bold
install.sh
\series default
 depends on the 
\series bold
bash
\series default
 shell.
 The work around is to change to the 
\series bold
srcdir
\series default
 directory and execute
\end_layout

\begin_layout LyX-Code
make all
\end_layout

\begin_layout Standard
You will have to copy the Mega2 binary and all the Perl and Python scripts
 to a directory on your path.
 The script files end in 
\series bold
\emph on
.src
\series default
\emph default
; you should remove this suffix so that Windows can find the right program
 to run the file.
\end_layout

\begin_layout Paragraph
Using Mega2
\end_layout

\begin_layout Standard
Following the previous recipe, you will have a Mega2 binary program.
 But as discussed earlier and summarized in section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:List-of-third-party"

\end_inset

, there are several third party programs that are needed by Mega2.
 If you need these programs, you will have to load them onto Windows.
\end_layout

\begin_layout Labeling
\labelwidthstring 00.00.0000
\begin_inset VSpace defskip
\end_inset


\end_layout

\begin_layout Section
Input file formats
\begin_inset CommandInset label
LatexCommand label
name "sec:Input-file-formats"

\end_inset


\end_layout

\begin_layout Standard
Mega2 supports the following input file formats:
\end_layout

\begin_layout Enumerate
Mega2 format (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Annotated-file-formats"

\end_inset

)
\end_layout

\begin_layout Enumerate
Linkage format (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Linkage-file-formats"

\end_inset

)
\end_layout

\begin_deeper
\begin_layout Enumerate
Linkage format 
\end_layout

\begin_layout Enumerate
Linkage format with Mega2 names file (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Names-file"

\end_inset

)
\end_layout

\end_deeper
\begin_layout Enumerate
PLINK format (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:PLINK-file-formats"

\end_inset

)
\end_layout

\begin_deeper
\begin_layout Enumerate
PLINK binary format 
\end_layout

\begin_layout Enumerate
PLINK PED format 
\end_layout

\end_deeper
\begin_layout Enumerate
Variant Call Format (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:VCF-file-formats"

\end_inset

)
\end_layout

\begin_deeper
\begin_layout Enumerate
BCF format 
\end_layout

\begin_layout Enumerate
VCF compressed format 
\end_layout

\begin_layout Enumerate
VCF format 
\end_layout

\end_deeper
\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "inp:mega2"

\end_inset

Mega2 input file formats
\begin_inset CommandInset label
LatexCommand label
name "sub:Annotated-file-formats"

\end_inset


\end_layout

\begin_layout Standard
Mega2 can read input file sets in the Mega2 format ( referred to in previous
 documentation as the Annotated format), which consist of files are in table
 format with a header line defining the names of each data column.
 Columns are separated by one or more white-space characters (tabs or blanks),
 and rows are separated by newlines (or returns).
 
\end_layout

\begin_layout Standard
Some columns require special reserved names (these are listed as fixed names
 below under each file heading), and other column names are specified by
 the user following our naming convention.
 Every file has some required columns (e.g.
 pedigree file always has an ID column), and some files allow optional columns,
 including extra ones that are ignored by Mega2.
 A column is read in and ignored if its name contains 
\begin_inset Quotes eld
\end_inset

X.
\begin_inset Quotes erd
\end_inset

 as the first two characters.
 Note that the 
\begin_inset Quotes eld
\end_inset

#
\begin_inset Quotes erd
\end_inset

 character at the beginning of the column name also works, but the 
\begin_inset Quotes eld
\end_inset

X.
\begin_inset Quotes erd
\end_inset

 convention allows files to be compatible with R.
 
\end_layout

\begin_layout Standard
Data lines below the header column are read in accordance with the column
 names/types, therefore, there is no special order required for the columns
 themselves, as is the case for the linkage format files.
 
\end_layout

\begin_layout Standard
The Mega2 distribution package contains a conversion program for converting
 from the old LINKAGE-based format files into the Mega2 format files (See
 section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:Converting-to-annotated-format"

\end_inset

).
\end_layout

\begin_layout Standard
Mega2 requires three matched files as its input.
 These are the locus, pedigree, and map data files.
 This trio of files can be supplemented by an omit file, for omitting specific
 data points from all reformatted output files.
 It is easiest if you give these files their 
\series bold
default names
\series default
 with the same extension, as then Mega2 will automatically fill in the file
 names for you when you specify the chromosome number.
 So, for example, if your files contained information for just chromosome
 4 markers, then it is easiest if you name them as follows: 
\end_layout

\begin_layout LyX-Code
  datain.04
\end_layout

\begin_layout LyX-Code
  pedin.04
\end_layout

\begin_layout LyX-Code
  map.04
\end_layout

\begin_layout LyX-Code
  omit.04
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
Mega2 also supports two more optional files: an allele-frequency file, and
 a penetrance file for affection status traits.
 The default file names are (e.g.
 for chromosome 4): 
\end_layout

\begin_layout LyX-Code
  freq.04 
\end_layout

\begin_layout LyX-Code
  pen.04
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
Note: 
\emph on
frequency
\emph default
 can be used in place of 
\emph on
freq
\emph default
 and 
\emph on
penetrance
\emph default
 in place of 
\emph on
pen
\emph default
.
 In the current version, there is no provision for providing quantitative
 trait distribution parameters.
 
\end_layout

\begin_layout Standard

\series bold
\begin_inset VSpace defskip
\end_inset

WINDOWS/DOS USERS WARNING
\end_layout

\begin_layout Standard
If you are creating your files on a Windows or DOS system and then transferring
 them to a Unix machine, please remember to convert the DOS end-of-line
 characters to Unix end-of-line characters.
 When run on a Unix machine, Mega2 will detect DOS end-of-line characters
 and terminate with an error.
 See the trouble-shooting section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:DOS-format-file-related"

\end_inset

 for more details.
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsubsection
Mega2 Names file
\begin_inset CommandInset label
LatexCommand label
name "sub:Annotated-names-file"

\end_inset


\end_layout

\begin_layout Standard
The two required columns inside a names file are the locus name and the
 locus type.
 The required column names are Name and Type.
 Allowed marker types are the six locus types, as for the QTDT names file,
 namely autosomal numbered (M), X-linked numbered (X), Y-linked numbered
 (Y), binary trait with a single liability class (A), binary trait with
 multiple liability classes (L), quantitative trait (T), and quantitative
 covariate (C).
 
\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="8" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Type code
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
M
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
autosomal marker
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X-linked marker
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Y
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Y-linked marker
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
T
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Quantitative trait
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
C
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Quantitative covariate
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
A
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Affection status trait (single liability class)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
L
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Affection status trait (multiple liability classes)
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
Here is an example names file: 
\end_layout

\begin_layout LyX-Code
Type  Name
\end_layout

\begin_layout LyX-Code
A Trait
\end_layout

\begin_layout LyX-Code
T Q1
\end_layout

\begin_layout LyX-Code
M M1
\end_layout

\begin_layout LyX-Code
M M2
\end_layout

\begin_layout LyX-Code
M M3
\end_layout

\begin_layout Subsubsection
Mega2 Pedigree file
\begin_inset CommandInset label
LatexCommand label
name "sub:Annotated-pedigree-file"

\end_inset


\end_layout

\begin_layout Standard
There are 5 required columns and 9 optional columns with fixed column names,
 which primarily refer to the pedigree information.
 The required columns are ID, Pedigree, Father, Mother, and Sex.
 The optional columns allowed in the pedigree file are: PerID, PedID, MZTwin,
 DZTwin, Proband, Group, FirstOff, NextMatSib, NextPatSib .
 
\end_layout

\begin_layout Standard
Phenotype and genotype column headers are defined by the user using the
 following convention: numbered autosomal and x-linked loci genotype column
 names are named as
\end_layout

\begin_layout Standard

\series bold
marker-name.marker-type.[1/2] 
\series default
, 
\end_layout

\begin_layout Standard
where marker-name one of the locus names within the names file, marker-type
 is the corresponding locus type, and the extension 1 or 2 denotes the allele-nu
mber.
 Currently, the allele-number is of no significance with respect to the
 haplotype, in future, we will consider extending Mega2 to process haplotypes.
 
\end_layout

\begin_layout Standard
Binary traits are given an extension A for the status column header, and
 L for the liability class header.
 Traits with a single liability class does not need this liability column.
 Quantitative traits and covariates have either a Q or a C as the extension.
 
\end_layout

\begin_layout Standard
For an affection trait, the headers should be as follows: If there is a
 single liability class, then you only need one phenotype column containing
 the affected status, and the header for this should have the single extension
 A .
 
\end_layout

\begin_layout Standard
If there are multiple liability classes, then the status column header should
 have 2 extensions L.1, and the liability class column should have the extensions
 L.2.
 
\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="8" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Extension
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
M
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
autosomal marker
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X-linked marker
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Y
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Y-linked marker
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
T
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Quantitative trait
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
C
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Quantitative covariate
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
A
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Affection status trait (single liability class)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
L
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Affection status trait (multiple liability classes)
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
In version 4.5.7 and later, you can just use M for all the 
\series bold
markers
\series default
 in the pedigree file header line and in the names file.
 Mega2 will read the map file to determine whether the marker is on a X-linked
 or Y-linked chromosome.
 
\end_layout

\begin_layout Paragraph
Using non-numeric allele names 
\begin_inset CommandInset label
LatexCommand label
name "par:Using-non-numeric-allele"

\end_inset


\end_layout

\begin_layout Standard
Marker genotypes are coded as a pair of alleles, with at least one space
 or tab between them.
 Non-numeric allele names are allowed inside the pedigree file only with
 the use of a names file, and only for numbered marker loci.
 In releases of Mega2 starting with 4.7.1, non-numeric allele names when specified
 will be copied forward from input files to output files for analysis types
 that allow non-numeric alleles.
 Carrying the original allele labels through to the output files without
 recoding makes it easier to keep track of which allele is which.
 The analysis options which support non-numeric allele names are: Beagle,
 Cranefoot, IQLS/Idcoefs, Loki, Mega2, Mendel, Merlin, Merlin-SimWalk2,
 PLINK, SAGE, SAGE4.0, SOLAR, SPLINK, and SimWalk2.
 For the other analyses, the recoded output pedigrees will have their genotypes
 altered to have numeric alleles.
 Also, in the case where the input contains numeric alleles that are not
 contiguous (e.g., microsatellites) they will be treated as if they are allele
 names and copied.
 The Mega2 command line flag (
\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-force_numeric_alleles
\emph default
) can be been specified to force allele recoding, if it is not necessary,
 but preferred by the researcher.
 Allele names have to be strings, and may not contain white-space characters,
 since the pedigree file is read in assuming a white-space delimited column
 format.
 
\end_layout

\begin_layout Standard
Note: Some analyses, like Merlin, require the letter alleles to be A, C,
 G or T.
 The coding convention of using A and B as the allele designator is not
 accepted.
 Mega2 has not been programmed to make this check.
 So for the present, in this and similar analyses, you will have to manually
 set 
\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-force_numeric_alleles.
\end_layout

\begin_layout Paragraph
Missing values 
\end_layout

\begin_layout Standard
Missing values are 
\begin_inset Quotes eld
\end_inset

NA
\begin_inset Quotes erd
\end_inset

 by default in Mega2 format.
 In order to be compatible with linkage format data, we have provided a
 means to specify missing allele and affection codes.
 Missing quantitative values can be 
\begin_inset Quotes eld
\end_inset

NA
\begin_inset Quotes erd
\end_inset

 or a special number such as -99.
 In a future release, we will also allow non-numeric missing value indicators
 for quantitative phenotypes.
 
\end_layout

\begin_layout LyX-Code
Pedigree ID Father Mother Sex TRAIT.A Q1.T M1.M.1 M1.M.2 M3.M.1 M3.M.2 M2.M.1 M2.M.2 PedID
 PerID 
\begin_inset CommandInset label
LatexCommand label
name "lyx:PLINK-ex1"

\end_inset


\end_layout

\begin_layout LyX-Code
 1   1   0   0  1  2    21.2   1  2   1  1   1  2   1  1
\end_layout

\begin_layout LyX-Code
 1   2   0   0  2  0     1.3   1  2   2  2   1  1   1  2
\end_layout

\begin_layout LyX-Code
 1   3   0   0  1  0     NA   NA NA  NA NA  NA NA   1  3
\end_layout

\begin_layout LyX-Code
 1   4   1   2  2  2    19.1   1  2   2  1   1  2   1  4
\end_layout

\begin_layout LyX-Code
 1   5   1   2  1  2    18.3   2  2   2  1   1  2   1  5
\end_layout

\begin_layout LyX-Code
 1   6   0   0  2  0     0.7   2  2   1  1   1  2   1  6
\end_layout

\begin_layout LyX-Code
 1   7   3   4  2  2    20.5   2  2   1  2   2  1   1  7
\end_layout

\begin_layout LyX-Code
 1   8   3   4  2  2    22.1   2  2   1  1   2  2   1  8
\end_layout

\begin_layout LyX-Code
 1   9   3   4  2  0    11.1   2  2   1  1   2  2   1  9
\end_layout

\begin_layout LyX-Code
 1  10   5   6  1  2    19.5   2  2   1  1   2  2   1 10
\end_layout

\begin_layout LyX-Code
 1  11   5   6  1  2    17.9   2  2   1  2   1  2   1 11
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Subsubsection
Mega2 Map file
\begin_inset CommandInset label
LatexCommand label
name "sub:Annotated-map-file"

\end_inset


\end_layout

\begin_layout Standard
The map file requires 3 mandatory columns, including at least one set of
 genetic map positions.
 Multiple versions of the genetic map can be provided using additional columns,
 as well as physical position on each chromosome in base-pairs.
 Mega2 allows users to choose between multiple maps.
 Each genetic map can include sex-specific maps.
 Details on specifying male and female distances are provided below.
 
\end_layout

\begin_layout Standard
See the Genetic Map Interpolator section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:Genetic-Map-Interpolator"

\end_inset

 for help making map files.
\end_layout

\begin_layout Standard
The chromosome number column should be named 'Chromosome' (case-sensitive)
 and the marker name column should have the heading 'Name'.
 Map position columns are identified by user-defined names of the format
 
\shape italic
map-name.map-type.sex
\shape default
 for genetic maps.
 Map-type can be either 'k' or 'h', denoting Kosambi or Haldane centiMorgans
 respectively.
 Sex can be 'a', 'm' or 'f' denoting sex-averaged, male, and female maps,
 respectively.
 
\end_layout

\begin_layout Standard
Physical maps columns should be named as map-name.p, where the 'map-name'
 is user-defined, and the 'p' stands for the physical map type.
 
\end_layout

\begin_layout Standard
Below is an example Mega2 map file, with two maps, one genetic and one physical:
 
\end_layout

\begin_layout LyX-Code
Chromosome    Map.k.a  Name   Map.k.m    Map.k.f  Buildxx.p
\end_layout

\begin_layout LyX-Code
5             0.0       M1      0.0        0.0    144255
\end_layout

\begin_layout LyX-Code
5             5.0       M3      2.0        7.0    144355
\end_layout

\begin_layout LyX-Code
5             8.0       M2      4.0       12.0    144400
\end_layout

\begin_layout Standard
Shown below is a more complicated Mega2 map file containing four maps, two
 genetic (M and M4) and two physical (M2 and M3):
\end_layout

\begin_layout LyX-Code
Chromosome M.h.a    Name   M.h.m   M2.p    M.h.f  M3.p   M4.k.a   M4.k.m
\end_layout

\begin_layout LyX-Code
1          0.0     rs101   0.0     543     0.0    304    0.0       0.0 
\end_layout

\begin_layout LyX-Code
1          5.0     rs102   2.0     678     7.0    821    5.0       2.0 
\end_layout

\begin_layout LyX-Code
X          0.0     rs231   0.0     743     0.0    912    0.0       0.0 
\end_layout

\begin_layout LyX-Code
X          4.0     rs232   1.0     862     6.0    954    4.0       0.0 
\end_layout

\begin_layout Standard
For annotated map files, acceptable chromosome labels include: 
\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="7" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Chromosome code
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Description
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X chromosome
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Y
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Y chromosome
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
XY
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Pseudo-autosomal
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MT
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Mitochondrial
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
U
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Unknown chromosome
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
1 to 22
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Autosomal chromosome
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
Mapping used by l2a.py when converting chromosome numbers into more human-readabl
e chromosome codes: 
\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="6" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Chromosome number
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Chromosome code
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
23
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
24
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Y
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
25
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
XY
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
26
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MT
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
999
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
U
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard

\series bold
Important Note
\series default
: Before release 4.5.5, Mega2 used the mapping table below with number 25
 coding for Y, and 24 coding for XY.
 But as of version 4.5.5, this coding has been changed to be compatible with
 PLINK.
 
\end_layout

\begin_layout Standard
Table of the previous coding system (version 4.5.4 and earlier):
\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="6" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Chromosome number
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Chromosome code
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
23
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
X
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
24
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
XY
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
25
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Y
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
26
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MT
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
999
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
U
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Paragraph

\series bold
Special chromosome names and numbers 
\end_layout

\begin_layout Standard
Note: We have not defined the 
\series bold
simple map file format
\series default
 yet.
 It is used with LINKAGE style input files and it is not as flexible as
 the 
\series bold
map file
\series default
 we have described here.
 It provides a single set of map information.
 See section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Simple-Mega2-Map"

\end_inset

.
\end_layout

\begin_layout Standard

\series bold
X chromosome
\series default
 
\begin_inset Newline newline
\end_inset


\series bold
 map file
\series default
 - 
\begin_inset Quotes eld
\end_inset

X
\begin_inset Quotes erd
\end_inset

 denotes x-linked loci in the map file.
 
\begin_inset Newline newline
\end_inset

 
\series bold
simple map file
\series default
 - 
\begin_inset Quotes eld
\end_inset

23
\begin_inset Quotes erd
\end_inset

 should be used as the chromosome label to denote X-linked loci in the simple
 map file.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Females can be heterozygous at X-linked markers, whereas males should be
 assigned homozygous genotypes.
 Males' genotypes are then analyzed as being hemizygous by Mega2 and the
 other genetic analysis software that can handle X-linked loci.
 
\end_layout

\begin_layout Standard
Mega2 asks the user if loci on chromosome 23 (in simple map input files)
 should be considered as X-linked or autosomal.
\end_layout

\begin_layout Standard

\series bold
Pseudo-X region of X and Y chromosomes
\series default
 
\begin_inset Newline newline
\end_inset


\series bold
 map file
\series default
 - Some genes are common to both X and Y chromosomes in humans.
 These genes are said to reside in the pseudo-autosomal region.
 The chromosome labels should be set to 
\begin_inset Quotes eld
\end_inset

XY
\begin_inset Quotes erd
\end_inset

.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset


\series bold
 simple map file
\series default
 - In simple map files, such markers should be labeled with chromosome number
 
\begin_inset Quotes eld
\end_inset

25
\begin_inset Quotes erd
\end_inset

.
 
\begin_inset Newline newline
\end_inset

 Loci labeled as pseudo-autosomal are treated as autosomal loci.
 (Before Mega2 4.5.5 this used to be 
\begin_inset Quotes eld
\end_inset

24
\begin_inset Quotes erd
\end_inset

.)
\end_layout

\begin_layout Standard

\series bold
Y chromosome
\series default
 
\begin_inset Newline newline
\end_inset


\series bold
 map file
\series default
 - 
\begin_inset Quotes eld
\end_inset

Y
\begin_inset Quotes erd
\end_inset

 should be used as the chromosome label for markers that are to be treated
 as Y-linked.
 
\begin_inset Newline newline
\end_inset


\series bold
 simple map file
\series default
 - 
\begin_inset Quotes eld
\end_inset

24
\begin_inset Quotes erd
\end_inset

 should be the chromosome number inside the simple map file.
 (Before Mega2 4.5.5 this used to be 
\begin_inset Quotes eld
\end_inset

25
\begin_inset Quotes erd
\end_inset

.)
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Note that most analysis software listed inside our output options do not
 handle Y-linked loci.
 We have included this facility so that the user can check and clean data
 for Y-linked loci as well as generate allele-frequency and genotyping summaries.
 
\end_layout

\begin_layout Standard
Females' genotypes for Y-linked loci are ignored for now, and males are
 expected to be homozygous at these loci.
 In future, we will provide counts on 
\begin_inset Quotes eld
\end_inset

putative
\begin_inset Quotes erd
\end_inset

 female genotypes at Y-linked loci, in order to flag data errors.
\end_layout

\begin_layout Standard

\series bold
Mitochondrial chromosome
\series default
 
\begin_inset Newline newline
\end_inset


\series bold
 map file
\series default
 - 
\begin_inset Quotes eld
\end_inset

MT
\begin_inset Quotes erd
\end_inset

 should be used as the chromosome label for markers that are to be treated
 as linked to the mitochondrial chromosomes.
 
\begin_inset Newline newline
\end_inset


\series bold
 simple map file
\series default
 - 
\begin_inset Quotes eld
\end_inset

26
\begin_inset Quotes erd
\end_inset

 should be the chromosome number for mitochondrial markers.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Although an individual is expected to be homozygous at mitochondrial markers,
 and also have inherited the mother's genotype exclusively, there have been
 known to be deviations from this inheritance pattern.
 Therefore, for the present, Mega2 only reports genotypes which are heterozygous
, or different from the maternal genotype, it does not flag these as Mendelian
 inheritance errors, nor are these reset along with other Mendelian inconsistenc
ies.
\end_layout

\begin_layout Standard

\series bold
Unknown chromosome
\series default
 
\begin_inset Newline newline
\end_inset

 If the input data contains unmapped markers, some limited analysis is still
 possible on such markers, which do not need map information.
 These include the allele-frequency estimation and data-checking/cleaning
 steps of Mega2, as well as marker-related summaries.
 Some output options do not need map information.
 These are: SUMMARY options, PLINK (using a map file with dummy positions),
 the HWE options, which do not need a genetic map, LINKAGE, NUCLEAR PEDIGREES,
 PREMAKEPED-FORMAT, and PREST.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset


\series bold
 map file
\series default
 - Use the label 
\begin_inset Quotes eld
\end_inset

U
\begin_inset Quotes erd
\end_inset

 inside the map file to label unmapped markers.
 
\begin_inset Newline newline
\end_inset


\series bold
 simple map file
\series default
 - Use 
\begin_inset Quotes eld
\end_inset

999
\begin_inset Quotes erd
\end_inset

 to label unmapped markers inside the simple map file.
\end_layout

\begin_layout Standard

\series bold
Output file labels
\series default
 
\begin_inset Newline newline
\end_inset

If input files were in Mega2 format with chromosomes labeled with X,Y etc.
 the output files also have character extensions instead of chromosome numbers
 (e.g.
 Lpedin.X, Ldatain.X etc.).
 If input files were in simple map format, numeric extensions are used,
 23-25 and 999 for the unknown chromosome.
\end_layout

\begin_layout Standard

\series bold
New reordering menu items
\series default

\begin_inset Newline newline
\end_inset

 For analysis menu options that can handle unmapped loci, you will be able
 to select the unknown chromosome as well as the usual numbered chromosomes
 if your map file contains such loci.
 The menu option which allows selection of multiple chromosomes for output
 now offers 3 choices:
\begin_inset Newline newline
\end_inset

 1) All known chromosomes.
 
\begin_inset Newline newline
\end_inset

 2) Specific known chromosomes.
 
\begin_inset Newline newline
\end_inset

 3) All mapped and unmapped loci.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsubsection
Omit file
\begin_inset CommandInset label
LatexCommand label
name "sub:Annotated-omit-file"

\end_inset


\end_layout

\begin_layout Standard
The omit file contains the three required columns.
 Again, names must be maintained, ordering of columns doesn't matter, and
 neither does the case in the header line.
\end_layout

\begin_layout LyX-Code
Pedigree  Individual  Marker
\end_layout

\begin_layout LyX-Code
1 All All
\end_layout

\begin_layout LyX-Code
2 10  M2
\end_layout

\begin_layout LyX-Code
2 All M1
\end_layout

\begin_layout Standard
The optional omit file permits one to easily delete certain marker genotypes
 from all Mega2-generated output files.
 This is useful if certain marker genotypes are Mendelianly-inconsistent,
 yet one wants to preserve the original marker data in the input file.
 Marker genotypes can be omitted for a whole family at once or for one specific
 individual.
\end_layout

\begin_layout Standard
The omit file should be in the following format:
\end_layout

\begin_layout Standard
Each line should have two integers and a string, separated by white space.
 The first number is the pedigree number and must match that used in your
 input LINKAGE format file.
 The second number is the person number and must match that used in your
 input LINKAGE format file.
 The string should be either All or the name of the locus.
 If All is used, the person or pedigree indicated will be untyped at all
 marker loci.
 Trait phenotypes will not be set to unknown.
 Specific omit file entries containing the name of the trait locus should
 be included to do the latter.
 If the person number is zero or all, then all marker genotypes will be
 set to unknown for the entire pedigree.
 Otherwise only the indicated person will be untyped.
\end_layout

\begin_layout Standard
A summary of the omit results will be found in the file omit.log.
 This file is rewritten the next time Mega2 is run with an omit file specified.
 If Mega2 can not find a person or pedigree as specified in the input omit
 file, it will halt with an error message.
\end_layout

\begin_layout Standard
Example omit file, 'omit.05':
\end_layout

\begin_layout LyX-Code
Pedigree  Individual  Marker
\end_layout

\begin_layout LyX-Code
1 0 All
\end_layout

\begin_layout LyX-Code
2 10 M2
\end_layout

\begin_layout LyX-Code
2 0  M1
\end_layout

\begin_layout Standard
This file generates the following log file: 
\end_layout

\begin_layout LyX-Code
Marker untyped everyone in pedigree 1
\end_layout

\begin_layout LyX-Code
Marker untyped pedigree 2 person 10 at locus M2
\end_layout

\begin_layout LyX-Code
Marker untyped everyone in pedigree 2 at locus M1
\end_layout

\begin_layout Standard
The omit file can now be used to set trait phenotypes to unknown.
 Here is such an example: 
\end_layout

\begin_layout LyX-Code
Pedigree  Individual  Marker
\end_layout

\begin_layout LyX-Code
1 11 AFF2
\end_layout

\begin_layout LyX-Code
1 11 QUANT1
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
These two lines direct Mega2 to untype person 11 of pedigree 1 at the affection
 locus AFF2 and at the QTL trait QUANT1.
 The affection status will be set to unknown (0), and the quantitative phenotype
 will be set to the appropriate missing value in the output.
 These actions are logged as well.
\end_layout

\begin_layout Standard
Please note that when the marker column contains the keyword 
\begin_inset Quotes eld
\end_inset

All
\begin_inset Quotes erd
\end_inset

, it still refers to only marker loci, trait loci are left untouched.
\end_layout

\begin_layout Standard
Hint: See the section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:omit-file"

\end_inset

 on creating omit files based on errors found by running the pedigree checking
 program Pedcheck.
\end_layout

\begin_layout Subsubsection
Frequency file
\begin_inset CommandInset label
LatexCommand label
name "sub:Annotated-frequency-file"

\end_inset


\end_layout

\begin_layout Standard
The frequency file contains one line for each marker and allele.
 All alleles present in the data have to be listed.
 The allele labels should match those in the pedigree file (raw or coded).
 The column headings should be as listed below (letter case and order of
 columns don't matter).
 
\end_layout

\begin_layout LyX-Code
Name Allele Frequency
\end_layout

\begin_layout LyX-Code
TRAIT 1 0.990000
\end_layout

\begin_layout LyX-Code
TRAIT 2 0.010000
\end_layout

\begin_layout LyX-Code
Q1 1 0.990000
\end_layout

\begin_layout LyX-Code
Q1 2 0.010000
\end_layout

\begin_layout LyX-Code
M1 1 0.500000
\end_layout

\begin_layout LyX-Code
M1 2 0.500000
\end_layout

\begin_layout LyX-Code
M3 1 0.250000
\end_layout

\begin_layout LyX-Code
M3 2 0.250000
\end_layout

\begin_layout LyX-Code
M3 3 0.250000
\end_layout

\begin_layout LyX-Code
M3 4 0.250000
\end_layout

\begin_layout LyX-Code
M2 1 0.500000
\end_layout

\begin_layout LyX-Code
M2 2 0.500000
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
It is not necessary to have all your loci listed within the frequency file,
 however, if a locus is included, it is necessary to list ALL its alleles.
 If this is not so, then alleles encountered in the genotype data, and not
 specified inside the frequency file will be flagged as errors.
 Locus names listed inside the frequency file, but missing from the names
 file will cause Mega2 to terminate with error messages.
 
\end_layout

\begin_layout Standard
For marker loci whose allele frequencies are not listed, Mega2 estimates
 them, as well as recoding them to consecutive integer values.
 For trait loci, Mega2 accepts only 2 alleles.
 If trait allele frequencies are not provided, then Mega2 uses default values
 of 0.5 for both alleles.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsubsection
Penetrance file
\begin_inset CommandInset label
LatexCommand label
name "sub:Annotated-penetrance-file"

\end_inset


\end_layout

\begin_layout Standard
Affection status traits are listed in the penetrance file.
 This file should contain 5 columns listing the name class number and penetrance
 values for the three genotypes in each class.
 As in the names file and frequency file a header is required; the column
 headers should be as specified below (case is ignored, and there is no
 special ordering).
 
\end_layout

\begin_layout LyX-Code
Name   Class  Pen.11    Pen.12    Pen.22
\end_layout

\begin_layout LyX-Code
TRAIT 1 0.0000 1.0000 1.0000
\end_layout

\begin_layout Standard
With the above header, the penetrances are assumed to be autosomal.
 An additional column, 
\begin_inset Quotes eld
\end_inset

Type
\begin_inset Quotes erd
\end_inset

, may be added to the header with row value of 
\emph on
autosomal
\emph default
 for autosomal chromosomes or with the values, 
\emph on
female
\emph default
, or 
\emph on
male
\emph default
 to indicate the penetrance values for the particular population on the
 X chromosome.
 
\end_layout

\begin_layout LyX-Code
Name   Class  Pen.11    Pen.12    Pen.22 Type
\end_layout

\begin_layout LyX-Code
TRAIT 1 0.1000 1.0000 1.0000 autosomal
\end_layout

\begin_layout LyX-Code
TRAIT 1 0.1500 1.0000 1.0000 female
\end_layout

\begin_layout LyX-Code
TRAIT 1 0.0500 1.0000 1.0000 male
\end_layout

\begin_layout Standard
NOTE: Every row must have 6 column, even though there is no meaningful value
 for Pen.12 for males.
 Whatever value is put in the Pen.12 column is ignored.
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "inp:plink"

\end_inset

PLINK input file formats
\begin_inset CommandInset label
LatexCommand label
name "sub:PLINK-file-formats"

\end_inset


\end_layout

\begin_layout Standard
The PLINK program (
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://pngu.mgh.harvard.edu/~purcell/plink/
\end_layout

\end_inset

) written by Shaun Purcell and colleagues has become a 
\shape italic
de facto
\shape default
 standard for whole genome association analysis.
 It uses input files that contain the same kind of information as the Mega2
 format.
 It also allows for several different formats of the input data and supports
 conversion between these formats.
 Perhaps the most popular (but unreadable) format is its compressed binary
 PED format.
 Mega2 supports the binary format and one of the text formats, PED.
 We suggest you visit the PLINK documentation web site (
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://pngu.mgh.harvard.edu/~purcell/plink/
\end_layout

\end_inset

) to understand these formats.
 
\end_layout

\begin_layout Standard
Our desire is to have Mega2 accept the PLINK files unmodified.
 One 
\begin_inset Quotes eld
\end_inset

feature
\begin_inset Quotes erd
\end_inset

 of the PLINK file format is that some of the columns in the files listed
 below may be omitted by using a corresponding flag when starting PLINK.
 Mega2 will accept most of those flags and interpret them as the PLINK program
 would.
 The flags are explained below.
 How to enter these flags is explained in section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:PLINK-parameters"

\end_inset

.
\end_layout

\begin_layout Subsubsection
PLINK PED input format
\begin_inset CommandInset label
LatexCommand label
name "sub:PLINK-PED-input"

\end_inset


\end_layout

\begin_layout Standard
This format is typically coded using two primary files: the pedigree file
 and the map file.
 The default naming scheme is to use the same stem for both, and a '.ped'
 extension for the pedigree file, and a '.map' extension for the map file.
\end_layout

\begin_layout Paragraph
Pedigree file (*.ped)
\begin_inset CommandInset label
LatexCommand label
name "par:Pedigree-file-(*.ped)"

\end_inset


\end_layout

\begin_layout Standard
Below is a small example PED file (corresponding to the map file just below):
\end_layout

\begin_layout LyX-Code
1  1  0  0  1  21.2  1  2  1  1  1  2  
\end_layout

\begin_layout LyX-Code
1  2  0  0  2   1.3  1  2  2  2  1  1  
\end_layout

\begin_layout LyX-Code
1  3  0  0  1   0.9  2  2  2  1  1  2  
\end_layout

\begin_layout LyX-Code
1  4  1  2  2  19.1  1  2  2  1  1  2  
\end_layout

\begin_layout LyX-Code
1  5  1  2  1  18.3  2  2  2  1  1  2  
\end_layout

\begin_layout LyX-Code
1  6  0  0  2   0.7  2  2  1  1  1  2  
\end_layout

\begin_layout LyX-Code
1  7  3  4  2  20.5  2  2  1  2  2  1  
\end_layout

\begin_layout LyX-Code
1  8  3  4  2  22.1  2  2  1  1  2  2  
\end_layout

\begin_layout LyX-Code
1  9  3  4  2  11.1  2  2  1  1  2  2  
\end_layout

\begin_layout LyX-Code
1 10  5  6  1  19.5  2  2  1  1  2  2  
\end_layout

\begin_layout LyX-Code
1 11  5  6  1  17.9  2  2  1  2  1  2  
\end_layout

\begin_layout LyX-Code
2  1  0  0  1   1.2  1  2  2  2  2  2  
\end_layout

\begin_layout LyX-Code
2  2  0  0  2  19.1  1  1  2  1  1  1  
\end_layout

\begin_layout LyX-Code
2  3  0  0  1   0.8  1  1  1  2  1  2  
\end_layout

\begin_layout LyX-Code
2  4  1  2  2  21.1  1  1  2  1  2  1  
\end_layout

\begin_layout LyX-Code
2  5  1  2  2  20.3  1  1  2  1  2  1  
\end_layout

\begin_layout LyX-Code
2  6  0  0  1   0.7  2  2  1  2  1  2  
\end_layout

\begin_layout LyX-Code
2  7  3  4  2  18.6  1  1  2  1  2  1  
\end_layout

\begin_layout LyX-Code
2  8  6  5  1  17.6  2  1  2  1  2  1  
\end_layout

\begin_layout LyX-Code
2  9  8  7  2  20.2  1  1  2  1  2  1  
\end_layout

\begin_layout LyX-Code
2 10  8  7  2  22.3  1  1  2  1  2  1  
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
To read the example PED file correctly while naming the quantitative trait
 
\begin_inset Quotes eld
\end_inset

Q1
\begin_inset Quotes erd
\end_inset

, we use the Mega2 PLINK flags:
\end_layout

\begin_layout LyX-Code
--trait Q1 --quantitative
\end_layout

\begin_layout Standard
This file is very similar to a 
\emph on
pre-makeped
\emph default
 style Mega2 pedigree file.
 It has the standard five initial columns: pedigree, person, father, mother
 and sex.
 This is followed by a single trait and then the markers, coded as pairs
 of alleles.
 There is no header for this file, so it includes no information regarding
 the type of trait in the trait column; this information is supplied via
 the use of the Mega2-PLINK options -
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-affectionstatus or -
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-quantitative.
 In Mega2, it is sometimes necessary to have a name for the trait.
 This name is supplied as part of the Mega2 file selection menu, using the
 -
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-trait Mega2 PLINK option.
 (The name is necessary to correlate this trait with the information in
 the Mega2 penetrance and frequency files.) The Mega2 PLINK flags are:
\end_layout

\begin_layout Quotation
\begin_inset Tabular
<lyxtabular version="3" rows="7" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="left" valignment="top" width="4in">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
flag
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
no-fid
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
The two columns pedigree & person are replaced by one column, specifying
 a unique identifier
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
no-parents
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
The father and mother column are not present; Mega2 will assign the missing
 value zero '0' to the entries in these two columns.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
no-pheno
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
The trait column is not present.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
trait
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
specify a name for the pedigree file trait column.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-affectionstatus
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
indicate that trait is a dichotomous affection status trait locus (default).
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-quantitative
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
indicate that trait is a quantitative trait locus.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Paragraph
Map file (*.map)
\begin_inset CommandInset label
LatexCommand label
name "par:Map-file-(*.map)"

\end_inset


\end_layout

\begin_layout Standard
Below is a small example map file:
\end_layout

\begin_layout LyX-Code
5    M1        0.0	1
\end_layout

\begin_layout LyX-Code
5    M2        8.0	3
\end_layout

\begin_layout LyX-Code
5    M3        5.0	2
\end_layout

\begin_layout Standard
To read the example map file, under the assumption the genetic map positions
 are specified in Kosambi centiMorgans, we use the Mega2-PLINK flags:
\end_layout

\begin_layout LyX-Code
--kosambi --cM 
\end_layout

\begin_layout Standard
This file allows the alleles in the 
\series bold
Pedigree file
\series default
 to be assigned to a particular marker.
 Successive lines of the 
\series bold
Map file
\series default
 identify the marker for each allele pair.
 Each row typically includes four fields: the chromosome (1-22, X, Y or
 0), the marker name, the genetic position in Kosambi Morgans, and finally
 the base-pair position.
 The override flags are:
\end_layout

\begin_layout Quotation
\begin_inset Tabular
<lyxtabular version="3" rows="5" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="left" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
flag
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
map3
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
The genetic position column is not present.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
cM
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
The genetic position is specified in centiMorgans.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
kosambi
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
genetic distance in map file is in Kosambi units (default)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
haldane
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
genetic distance in map file is in Haldane units
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
There is one final PLINK convention involving the base-pair column.
 If any marker has a negative base-pair position, then the corresponding
 data from the 
\series bold
Pedigree file
\series default
 is not used.
\end_layout

\begin_layout Paragraph
Alternated Phenotype file (header line required)
\begin_inset CommandInset label
LatexCommand label
name "par:Alternated-Phenotype-file"

\end_inset


\end_layout

\begin_layout Standard
Below is a small example phe file:
\end_layout

\begin_layout LyX-Code
FID  IID  TRAIT
\end_layout

\begin_layout LyX-Code
1    1    2
\end_layout

\begin_layout LyX-Code
1    2   NA
\end_layout

\begin_layout LyX-Code
1    3   NA
\end_layout

\begin_layout LyX-Code
1    4    2
\end_layout

\begin_layout LyX-Code
1    5    2
\end_layout

\begin_layout LyX-Code
1    6   NA
\end_layout

\begin_layout LyX-Code
1    7    2
\end_layout

\begin_layout LyX-Code
1    8    2
\end_layout

\begin_layout LyX-Code
1    9    0
\end_layout

\begin_layout LyX-Code
1   10    2
\end_layout

\begin_layout LyX-Code
1   11    2
\end_layout

\begin_layout LyX-Code
2    1   NA
\end_layout

\begin_layout LyX-Code
2    2    2
\end_layout

\begin_layout LyX-Code
2    3   NA
\end_layout

\begin_layout LyX-Code
2    4    2
\end_layout

\begin_layout LyX-Code
2    5    2
\end_layout

\begin_layout LyX-Code
2    6   NA
\end_layout

\begin_layout LyX-Code
2    7    2
\end_layout

\begin_layout LyX-Code
2    8    2
\end_layout

\begin_layout LyX-Code
2    9    2
\end_layout

\begin_layout LyX-Code
2   10    2
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The PLINK standard allows for only one phenotype in the 
\series bold
Pedigree file
\series default
, but more phenotypes can be specified in a separate file.
 The alternate
\series bold
 Phenotype file
\series default
 has three or more columns; the first two columns contain the pedigree and
 person IDs and the remaining columns are phenotypes.
 The PLINK standard allows there to be a header line for this file.
 The first two columns of the header 
\series bold
MUST 
\series default
contain 
\series bold
FID
\series default
 and 
\series bold
IID
\series default
 the remaining header columns name the phenotypes.
 
\series bold
\emph on
Mega2 requires that this header line be present.

\series default
\emph default
 There are flags:
\end_layout

\begin_layout Quotation
\begin_inset Tabular
<lyxtabular version="3" rows="3" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="left" valignment="top" width="4in">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
flag
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
missing-phenotype
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Specifies the missing value for quantitative traits (default -9).
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
1
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Affection status is coded 0 (unaffected) / 1 (affected) / -9 (missing,)
 vs.
 0 (missing) / 1 (unaffected) / 2 (affected) / -9 (missing).
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Paragraph
Miscellaneous files
\end_layout

\begin_layout Standard
The 
\series bold
omit file
\series default
, 
\series bold
frequency file
\series default
, and 
\series bold
penetrance file
\series default
 are part of the Mega2 data schema, and they may be supplied with the PLINK
 input files.
\end_layout

\begin_layout Subsubsection
PLINK binary PED input format
\end_layout

\begin_layout Standard

\series bold
Pedigree files
\series default
 for GWAS studies can become rather large and slow to process.
 The PLINK binary PED file makes these data more accessible.
\end_layout

\begin_layout Standard
This format is typically coded using three primary files: the pedigree file,
 the family file, and the map file.
 The default naming scheme is to use the same stem for all three, and a
 '.ped' extension for the pedigree file, a '.fam' extension for the family
 file, and a '.map' extension for the map file.
\end_layout

\begin_layout Paragraph
Binary PED file (*.bed)
\begin_inset CommandInset label
LatexCommand label
name "par:Binary-PED-file"

\end_inset


\end_layout

\begin_layout Standard
This file is described in detail in the PLINK manual.
 It tightly encodes the allele data in two bits per SNP.
 The file is not ASCII and not human readable.
\end_layout

\begin_layout Paragraph
Family file (*.fam)
\begin_inset CommandInset label
LatexCommand label
name "par:PLINK-family-file"

\end_inset


\end_layout

\begin_layout Standard
Below is a small example fam file:
\end_layout

\begin_layout LyX-Code
1  1  0  0  1  21.2
\end_layout

\begin_layout LyX-Code
1  2  0  0  2   1.3
\end_layout

\begin_layout LyX-Code
1  3  0  0  1   0.9
\end_layout

\begin_layout LyX-Code
1  4  1  2  2  19.1
\end_layout

\begin_layout LyX-Code
1  5  1  2  1  18.3
\end_layout

\begin_layout LyX-Code
1  6  0  0  2   0.7
\end_layout

\begin_layout LyX-Code
1  7  3  4  2  20.5
\end_layout

\begin_layout LyX-Code
1  8  3  4  2  22.1
\end_layout

\begin_layout LyX-Code
1  9  3  4  2  11.1
\end_layout

\begin_layout LyX-Code
1 10  5  6  1  19.5
\end_layout

\begin_layout LyX-Code
1 11  5  6  1  17.9
\end_layout

\begin_layout LyX-Code
2  1  0  0  1   1.2
\end_layout

\begin_layout LyX-Code
2  2  0  0  2  19.1
\end_layout

\begin_layout LyX-Code
2  3  0  0  1   0.8
\end_layout

\begin_layout LyX-Code
2  4  1  2  2  21.1
\end_layout

\begin_layout LyX-Code
2  5  1  2  2  20.3
\end_layout

\begin_layout LyX-Code
2  6  0  0  1   0.7
\end_layout

\begin_layout LyX-Code
2  7  3  4  2  18.6
\end_layout

\begin_layout LyX-Code
2  8  6  5  1  17.6
\end_layout

\begin_layout LyX-Code
2  9  8  7  2  20.2
\end_layout

\begin_layout LyX-Code
2 10  8  7  2  22.3
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
To read the example fam file correctly while naming the quantitative trait
 
\begin_inset Quotes eld
\end_inset

Q1
\begin_inset Quotes erd
\end_inset

, we use the Mega2 PLINK flags:
\end_layout

\begin_layout LyX-Code
--trait Q1 --quantitative
\end_layout

\begin_layout Standard
The 
\begin_inset Quotes eld
\end_inset


\series bold
Family
\series default

\begin_inset Quotes erd
\end_inset

 
\series bold
file
\series default
 only contains the pedigree information; in other words it is the first
 six columns of the PED 
\series bold
Pedigree file
\series default
 described above: pedigree, person, father, mother, sex, and trait.
 The flags shown earlier and repeated below can be used if the 
\series bold
Family file
\series default
 has fewer than the default six columns.
 The flags are:
\end_layout

\begin_layout Quotation
\begin_inset Tabular
<lyxtabular version="3" rows="4" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="left" valignment="top" width="4in">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
flag
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
no-fid
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
The two columns pedigree & person are replaced by one column, specifying
 a unique identifier
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
no-parents
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
The father and mother column are not present; 0 is used as the value.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
no-pheno
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
The trait column is not present.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Paragraph
Binary Map file (*.bim)
\begin_inset CommandInset label
LatexCommand label
name "par:Binary-Map-file"

\end_inset


\end_layout

\begin_layout Standard
Below is a small example bim file:
\end_layout

\begin_layout LyX-Code
5	M1	0	1	1	2
\end_layout

\begin_layout LyX-Code
5	M3	5	2	2	1
\end_layout

\begin_layout LyX-Code
5	M2	8	3	1	2
\end_layout

\begin_layout Standard
The 
\begin_inset Quotes eld
\end_inset


\series bold
BI
\series default
nary
\begin_inset Quotes erd
\end_inset

 
\series bold
M
\series default
ap file (
\series bold
BIM file)
\series default
 is similar to the 
\series bold
Map file
\series default
 described above.
 There is no space available in the 
\series bold
Binary PED file
\series default
 to represent the allele values; so these are added to the end of each line
 of the 
\series bold
Map file
\series default
.
 So each row typically includes six fields: the chromosome (1-22, X, Y or
 0), the SNP name, the genetic position in Morgans, the base-pair position,
 and the two allele names.
 The override flags are as before:
\end_layout

\begin_layout Quotation
\begin_inset Tabular
<lyxtabular version="3" rows="3" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="left" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
flag
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
map3
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
The genetic position column is not present.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
cM
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
The genetic position is specified in centiMorgans.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
Note: negative base-pair distances are 
\series bold
NOT allowed
\series default
.
\end_layout

\begin_layout Paragraph
Alternate Phenotype file (header line required)
\end_layout

\begin_layout Standard
This file is exactly the same as that used for the non binary input.
 The PLINK standard allows for only one phenotype in the 
\series bold
Pedigree file
\series default
 but more phenotypes can be specified in a separate file.
 The 
\series bold
Alternate Phenotype file
\series default
 has three or more columns; the first two columns contain the pedigree and
 person and the remaining columns are phenotypes.
 The PLINK standard allows there to be a header for this file.
 The first two columns of the header 
\series bold
MUST 
\series default
contain 
\series bold
FID
\series default
 and 
\series bold
IID
\series default
 the remaining header columns name the phenotypes.
 
\series bold
\emph on
Mega2 requires that this header be present.

\series default
\emph default
 Of course there are flags:
\end_layout

\begin_layout Quotation
\begin_inset Tabular
<lyxtabular version="3" rows="3" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="left" valignment="top" width="4in">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
flag
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
missing-phenotype
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Specifies the missing value for quantitative traits (default -9)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
1
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Affection status is coded 0 (unaffected) / 1 (affected) / -9 (missing),
 vs.
 0 (missing) / 1 (unaffected) / 2 (affected) / -9 (missing)
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Paragraph
Miscellaneous files
\end_layout

\begin_layout Standard
These files are exactly the same as that used for the non binary input.
 The 
\series bold
omit file
\series default
, 
\series bold
frequency file
\series default
, and 
\series bold
penetrance file
\series default
 are part of the Mega2 data schema, and they may be supplied with the PLINK
 input files.
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "inp:linkage"

\end_inset

LINKAGE input file formats
\begin_inset CommandInset label
LatexCommand label
name "sub:Linkage-file-formats"

\end_inset


\end_layout

\begin_layout Standard
The LINKAGE format is the one used by the LINKAGE programs (Lathrop and
 Lalouel 1984; Lathrop et al.
 1986; Lathrop and Lalouel 1988); these formats are described in detail
 in the LINKAGE User's Guide at 
\end_layout

\begin_layout Standard
\align center
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://linkage.rockefeller.edu/soft/linkage/
\end_layout

\end_inset

 
\end_layout

\begin_layout Standard
and also in the LINKAGE Handbook by Terwilliger and Ott (1994).
\end_layout

\begin_layout Standard
LINKAGE format files typically come in pairs: the 'datain.dat' contains the
 locus information (disease model, allele frequencies, numbers of alleles,
 etc.), while the 'pedin.dat' contains the pedigree structure information
 and phenotypes.
 However, the original LINKAGE format made no provisions for locus names
 nor for marker map information.
 So Mega2 uses as input a trio of files which remedy these omissions:
\end_layout

\begin_layout Enumerate
the LINKAGE locus file modified to contain locus name information; 
\end_layout

\begin_layout Enumerate
the LINKAGE pedigree file; and 
\end_layout

\begin_layout Enumerate
the Simple Mega2 map file.
 
\end_layout

\begin_layout Subsubsection
LINKAGE locus file
\begin_inset CommandInset label
LatexCommand label
name "sub:Locus-file"

\end_inset


\end_layout

\begin_layout Standard

\emph on
Default name:
\emph default
 datain.##, where ## is the number of the chromosome (01, 02,..., 23) or datain.ex,
 where ex is the input file extension.
 For example, if the chromosome number chosen is 2, then Mega2 looks for
 the file datain.02 in the current directory.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset VSpace defskip
\end_inset

The locus data file is in standard LINKAGE format with the addition of locus
 names, which must be specified.
 The standard (but not well-known) LINKAGE format for including loci names
 is to, right after the number of alleles, put a # sign followed by the
 marker name.
 For example:
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
5 0 0 5  << NO.
 OF LOCI, RISK LOCUS, SEXLINKED (IF 1) PROGRAM
\end_layout

\begin_layout LyX-Code
0 0.0 0.0 0  << MUT LOCUS, MUT RATE, HAPLOTYPE FREQUENCIES (IF 1)
\end_layout

\begin_layout LyX-Code
1       2 3 4 5
\end_layout

\begin_layout LyX-Code
1   2   # TRAIT
\end_layout

\begin_layout LyX-Code
 0.990000 0.010000   << GENE FREQUENCIES
\end_layout

\begin_layout LyX-Code
1 << NO.
 OF LIABILITY CLASSES
\end_layout

\begin_layout LyX-Code
0.0000 1.0000 1.0000 << PENETRANCES
\end_layout

\begin_layout LyX-Code
0       2  # Q1
\end_layout

\begin_layout LyX-Code
 0.990000 0.010000   << GENE FREQUENCIES
\end_layout

\begin_layout LyX-Code
1 << NO.
 OF TRAITS
\end_layout

\begin_layout LyX-Code
1.000   10.000 20.000 << GENOTYPE MEANS
\end_layout

\begin_layout LyX-Code
1.000   << VARIANCE - COVARIANCE MATRIX
\end_layout

\begin_layout LyX-Code
1.000   << MULTIPLIER FOR VARIANCE IN HETEROZYGOTES
\end_layout

\begin_layout LyX-Code
3   2   # M1
\end_layout

\begin_layout LyX-Code
 0.500000 0.500000   << GENE FREQUENCIES
\end_layout

\begin_layout LyX-Code
3   2   # M2
\end_layout

\begin_layout LyX-Code
 0.500000 0.500000   << GENE FREQUENCIES
\end_layout

\begin_layout LyX-Code
3   2   # M3
\end_layout

\begin_layout LyX-Code
 0.500000 0.500000   << GENE FREQUENCIES
\end_layout

\begin_layout LyX-Code
0 0  << SEX DIFFERENCE, INTERFERENCE (IF 1 OR 2)
\end_layout

\begin_layout LyX-Code
0.1     0.1 0.1 0.1  << RECOMBINATION VALUES
\end_layout

\begin_layout LyX-Code
1 0.10000 0.45000 << REC VARIED, INCREMENT, FINISHING VALUE 
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
This setup would give the name TRAIT to the first locus, the name Q1 to
 the second locus, and the name M1 to the third locus, etc.
 (You may put no space between the # sign and the locus name, if desired).
 
\end_layout

\begin_layout Standard
Each co-dominant marker name must have an exact match in the corresponding
 map file; if a locus name in the locus data file is not found in the map
 file, then the user is warned about this.
 If the user still chooses to proceed, any marker that was not found in
 the map file will not appear in any of the output files (as Mega2 would
 not know which map position to put it in).
 HINT: This feature can be used to easily exclude a marker from all files
 produced by Mega2 - simply alter the name of the marker in the map file
 so that it no longer matches.
\end_layout

\begin_layout Subsubsection
LINKAGE pedigree file
\begin_inset CommandInset label
LatexCommand label
name "sub:Pedigree-file"

\end_inset


\end_layout

\begin_layout Standard

\emph on
Default name:
\emph default
 pedin.##, where ## is the number of the chromosome (01, 02, ..., 23) or pedin.ex,
 where ex is the input file extension.
 So if the chromosome number chosen is 2, then Mega2 looks for the file
 pedin.02 in the current directory.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset VSpace defskip
\end_inset

The pedigree data file should have either of the following formats,
\end_layout

\begin_layout Standard
a) pre-Makeped linkage format
\end_layout

\begin_layout Standard
b) the standard (post-Makeped) LINKAGE format without loops.
\end_layout

\begin_layout Standard
Example of a pre-Makeped file with an inbred pedigree [no.
 2] (to match the example locus datafile above): 
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
   1   1   0   0   1  2  21.2 1  2  1  2  1  1
\end_layout

\begin_layout LyX-Code
   1   2   0   0   2  0   1.3 1  2  1  1  2  2
\end_layout

\begin_layout LyX-Code
   1   3   0   0   1  0   0.9 2  2  1  2  2  1
\end_layout

\begin_layout LyX-Code
   1   4   1   2   2  2  19.1 1  2  1  2  2  1
\end_layout

\begin_layout LyX-Code
   1   5   1   2   1  2  18.3 2  2  1  2  2  1
\end_layout

\begin_layout LyX-Code
   1   6   0   0   2  0   0.7 2  2  1  2  1  1
\end_layout

\begin_layout LyX-Code
   1   7   3   4   2  2  20.5 2  2  2  1  1  2
\end_layout

\begin_layout LyX-Code
   1   8   3   4   2  2  22.1 2  2  2  2  1  1
\end_layout

\begin_layout LyX-Code
   1   9   3   4   2  0  11.1 2  2  2  2  1  1
\end_layout

\begin_layout LyX-Code
   1  10   5   6   1  2  19.5 2  2  2  2  1  1
\end_layout

\begin_layout LyX-Code
   1  11   5   6   1  2  17.9 2  2  1  2  1  2
\end_layout

\begin_layout LyX-Code
   2   1   0   0   1  0   1.2 1  2  2  2  2  2
\end_layout

\begin_layout LyX-Code
   2   2   0   0   2  2  19.1 1  1  1  1  2  1
\end_layout

\begin_layout LyX-Code
   2   3   0   0   1  0   0.8 1  1  1  2  1  2
\end_layout

\begin_layout LyX-Code
   2   4   1   2   2  2  21.1 1  1  2  1  2  1
\end_layout

\begin_layout LyX-Code
   2   5   1   2   2  2  20.3 1  1  2  1  2  1
\end_layout

\begin_layout LyX-Code
   2   6   0   0   1  0   0.7 2  2  1  2  1  2
\end_layout

\begin_layout LyX-Code
   2   7   3   4   2  2  18.6 1  1  2  1  2  1
\end_layout

\begin_layout LyX-Code
   2   8   6   5   1  2  17.6 2  1  2  1  2  1
\end_layout

\begin_layout LyX-Code
   2   9   8   7   2  2  20.2 1  1  2  1  2  1
\end_layout

\begin_layout LyX-Code
   2  10   8   7   2  2  22.3 1  1  2  1  2  1 
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The LINKAGE format is essentially the de facto standard for coding pedigree
 information in a machine-readable form.
 For a complete description of this format, please see the Handbook of Human
 Genetic Linkage (Terwilliger and Ott 1994) and the LINKAGE Users Guide
 (at 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://linkage.rockefeller.edu/soft/linkage/
\end_layout

\end_inset

) .
 
\begin_inset Newline newline
\end_inset

 pre-Makeped LINKAGE pedigree file consist of columns of integer data.
 The pre-Makeped columns are: 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Pedigree Person Father Mother Gender Phenotype1 Phenotype2 Phenotype3 ...
 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
where missing parents are entered as 0 (zero), and, for the gender column,
 a 1 = Male and a 2 = Female (This is easy to remember if you think of the
 number of X chromosomes).
 Makeped inserts some additional columns of pointers (which would be difficult
 to enter by hand) and breaks loops, which is required by the LINKAGE programs.Th
e columns should be separated by spaces or tabs (any number of these is
 allowed).
\begin_inset Newline newline
\end_inset

 While the order of the phenotypes is arbitrary, it is common to put the
 affection status phenotype first, followed by the marker phenotypes (which,
 for co-dominant markers, are the same as the genotypes).
 
\begin_inset Newline newline
\end_inset

 
\series bold
Phenotype coding: 
\series default

\begin_inset Newline newline
\end_inset

 1) 
\series bold
Trait locus:
\series default
 To code a simple affection status locus, use these codes: 
\end_layout

\begin_layout LyX-Code
0 = unknown
\end_layout

\begin_layout LyX-Code
1 = normal
\end_layout

\begin_layout LyX-Code
2 = affected
\end_layout

\begin_layout Standard
2) 
\series bold
Marker locus:
\series default
 To code a codominant marker locus phenotype, simply list the two numbered
 alleles with at least one space or tab between the alleles.
 The unknown genotype is coded as 0 0.
 
\end_layout

\begin_layout Paragraph
Using non-numeric allele names: 
\end_layout

\begin_layout Standard
Non-numeric allele names are allowed inside the pedigree file only with
 the use of a names file, and only for numbered marker loci.
 The recoded output pedigrees will have their genotypes altered to numeric
 alleles if the target output format requires this.
 Allele names have to be strings, and may not contain white-space characters,
 since the pedigree file is read in as a white-space separated column format.
 See the names file section above for details on recoding.
 
\end_layout

\begin_layout Standard
Note: Everyone must have either two parents or no parents in the data set.
 Thus, to connect relatives one may need to include people in a pedigree
 for whom there is at present no data.
 Example of post-Makeped file corresponding to the pre-Makeped file (above):
 
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
   1   1   0   0   4   0   0 1  1  2  21.2 1  2  1  2  1  1
\end_layout

\begin_layout LyX-Code
   1   2   0   0   4   0   0 2  0  0   1.3 1  2  1  1  2  2
\end_layout

\begin_layout LyX-Code
   1   3   0   0   7   0   0 1  0  0   0.9 2  2  1  2  2  1
\end_layout

\begin_layout LyX-Code
   1   4   1   2   7   5   5 2  0  2  19.1 1  2  1  2  2  1
\end_layout

\begin_layout LyX-Code
   1   5   1   2  10   0   0 1  0  2  18.3 2  2  1  2  2  1
\end_layout

\begin_layout LyX-Code
   1   6   0   0  10   0   0 2  0  0   0.7 2  2  1  2  1  1
\end_layout

\begin_layout LyX-Code
   1   7   3   4   0   8   8 2  0  2  20.5 2  2  2  1  1  2
\end_layout

\begin_layout LyX-Code
   1   8   3   4   0   9   9 2  0  2  22.1 2  2  2  2  1  1
\end_layout

\begin_layout LyX-Code
   1   9   3   4   0   0   0 2  0  0  11.1 2  2  2  2  1  1
\end_layout

\begin_layout LyX-Code
   1  10   5   6   0  11  11 1  0  2  19.5 2  2  2  2  1  1
\end_layout

\begin_layout LyX-Code
   1  11   5   6   0   0   0 1  0  2  17.9 2  2  1  2  1  2
\end_layout

\begin_layout LyX-Code
   2   1   0   0   4   0   0 1  1  0   1.2 1  2  2  2  2  2
\end_layout

\begin_layout LyX-Code
   2   2   0   0   4   0   0 2  0  2  19.1 1  1  1  1  2  1
\end_layout

\begin_layout LyX-Code
   2   3   0   0   7   0   0 1  0  0   0.8 1  1  1  2  1  2
\end_layout

\begin_layout LyX-Code
   2   4   1   2   7   5   5 2  0  2  21.1 1  1  2  1  2  1
\end_layout

\begin_layout LyX-Code
   2   5   1   2   8   0   0 2  0  2  20.3 1  1  2  1  2  1
\end_layout

\begin_layout LyX-Code
   2   6   0   0   8   0   0 1  0  0   0.7 2  2  1  2  1  2
\end_layout

\begin_layout LyX-Code
   2   7   3   4   9   0   0 2  0  2  18.6 1  1  2  1  2  1
\end_layout

\begin_layout LyX-Code
   2   8   6   5   0   0   0 1  2  2  17.6 2  1  2  1  2  1
\end_layout

\begin_layout LyX-Code
   2   9  11   7   0  10  10 2  0  2  20.2 1  1  2  1  2  1
\end_layout

\begin_layout LyX-Code
   2  10  11   7   0   0   0 2  0  2  22.3 1  1  2  1  2  1
\end_layout

\begin_layout LyX-Code
   2  11   0   0   9   0   0 1  2  2  17.6 2  1  2  1  2  1 
\end_layout

\begin_layout Paragraph
Defining missing quantitative phenotype values: 
\end_layout

\begin_layout Standard
The missing value is user-defined: if there are one or more quantitative
 trait loci in your input files, then Mega2 will ask you what the missing
 value is.
 However, you have to use the same missing value for all of the quantitative
 traits in your file, and (unfortunately) it has to be a real-valued missing
 value (but need not be zero!).
\end_layout

\begin_layout Paragraph
Using Ped, Per and ID identifiers in the pedigree file:
\end_layout

\begin_layout Standard
Unique IDs for each person can be specified in the pedigree file using the
 tag 
\begin_inset Quotes eld
\end_inset

Id:
\begin_inset Quotes erd
\end_inset

.
 
\series bold
NOTE
\series default
: Mega2 checks if your unique IDs are unique over the entire set of individuals
 inside the pedigree file.
 
\end_layout

\begin_layout Standard
If not, Mega2 gives you the option to generate unique IDs by prepending
 the pedigree name to the ID.
 Uniqueness is generally not required except for the Cranefoot pedigree
 drawing option, so Mega2 will automatically create new unique IDs if needed
 for this option.
 For the PAP option, Mega2 numbers individual sequentially from 1 through
 the total number of individuals, thus it neither checks, nor generates
 unique IDs.
 
\begin_inset Newline newline
\end_inset

Non-numeric pedigree and person identifiers can be indicated using the 
\begin_inset Quotes eld
\end_inset

Ped:
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

Person:
\begin_inset Quotes erd
\end_inset

 tags.
 These three tags are case insensitive e.g.
 the ID tag can be any of 
\begin_inset Quotes eld
\end_inset

ID:
\begin_inset Quotes erd
\end_inset

, 
\begin_inset Quotes eld
\end_inset

Id:
\begin_inset Quotes erd
\end_inset

, 
\begin_inset Quotes eld
\end_inset

iD:
\begin_inset Quotes erd
\end_inset

, or 
\begin_inset Quotes eld
\end_inset

id:
\begin_inset Quotes erd
\end_inset

.
 Unique IDs are allowed within the pre-makeped format pedigree file, but
 the 
\begin_inset Quotes eld
\end_inset

Ped:
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

Per:
\begin_inset Quotes erd
\end_inset

 tags are not recognized.
 If these are provided, Mega2 simply ignores these fields as long as they
 are placed after the phenotype/genotype columns.
 
\begin_inset Newline newline
\end_inset

There is no restriction on the ordering of Ped:, Per: and ID: field pairs
 except that each label has to be followed by the appropriate value.
 Thus these are correct 
\begin_inset Newline newline
\end_inset

 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
...
 ID: 10001 Ped: 101 Per: 10001
\end_layout

\begin_layout Standard
...
 Ped: 101 Per: 10001 ID: 10001
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset

 whereas this is not a correct order: 
\begin_inset Newline newline
\end_inset

 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
...
 Per: Ped: 10001 101 ID: 10001
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
For output formats which can handle arbitrary pedigree and person names,
 Mega2 allows the user to select, which pedigree and person id should be
 used in the output file.
 Mendel is one such option.
 The output pedigree and person IDs can be selected via the 
\begin_inset Quotes eld
\end_inset

Output file names
\begin_inset Quotes erd
\end_inset

 menu which looks like: 
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
  MENDEL file name menu
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed
\end_layout

\begin_layout LyX-Code
 1) Locus file name:                   locus.05         [new]
\end_layout

\begin_layout LyX-Code
 2) Pedigree filename:                 pedm.05          [new]
\end_layout

\begin_layout LyX-Code
 3) M13 batch file name:               m13bat.05        [new]
\end_layout

\begin_layout LyX-Code
 4) Batch file name:                   batch.05         [new]
\end_layout

\begin_layout LyX-Code
 5) M13 batch file name:               m13bat.05        [new]
\end_layout

\begin_layout LyX-Code
 6) Person id in output pedigree file:        Individual id
\end_layout

\begin_layout LyX-Code
 7) Pedigree identifier in output
\end_layout

\begin_layout LyX-Code
                     pedigree file:           Pedigree number
\end_layout

\begin_layout LyX-Code
Select options 0-7 to enter new file names/options >
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
Selecting option 6 will display the individual id selection menu: 
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
Output person id selection menu:
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed.
\end_layout

\begin_layout LyX-Code
*1) Individual id
\end_layout

\begin_layout LyX-Code
 2) Create unique id e.g 1_2, 1=ped, 2=ind
\end_layout

\begin_layout LyX-Code
 3) Renumber consecutively within pedigree
\end_layout

\begin_layout LyX-Code
Select from options 0 - 3 >
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The current choice is indicated with an asterisk.
 Option 2 can be either selecting unique IDs, if these are present as the
 
\begin_inset Quotes eld
\end_inset

:ID
\begin_inset Quotes erd
\end_inset

 field in the input pedigree file, or creation of unique IDs by Mega2 if
 they are absent.
 
\begin_inset Newline newline
\end_inset

 Selecting option 7 will display the pedigree id selection menu: 
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
Output pedigree id selection menu:
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed
\end_layout

\begin_layout LyX-Code
*1) Pedigree number
\end_layout

\begin_layout LyX-Code
 2) Renumbered consecutively
\end_layout

\begin_layout LyX-Code
Select from options 0 - 2 >
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
This functionality is available for the following options: 
\begin_inset Newline newline
\end_inset

 Mendel 
\begin_inset Newline newline
\end_inset

 SimWalk2 
\begin_inset Newline newline
\end_inset

 Aspex 
\begin_inset Newline newline
\end_inset

 Genotyping Summary 
\begin_inset Newline newline
\end_inset

 SOLAR 
\begin_inset Newline newline
\end_inset

 Pre-makeped 
\begin_inset Newline newline
\end_inset

 Merlin-SimWalk2-NPL 
\begin_inset Newline newline
\end_inset

 (Selection allowed only once, and used in both sets of files 
\begin_inset Newline newline
\end_inset

 Merlin 
\begin_inset Newline newline
\end_inset

 Loki 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsubsection
Handling of loops inside pedigrees
\end_layout

\begin_layout Paragraph
Loop breaking:
\end_layout

\begin_layout Standard
Mega2 will automatically select an optimal set of loop-breakers if there
 are loops inside a pre-Makeped pedigree file, and if the output analysis
 type requires loop-less pedigrees.
 For example, VITESSE and SLINK options require loops to be broken in the
 pedigree.
\end_layout

\begin_layout Standard
Mega2's loop-breaking capabilities have been successfully tested on several
 pedigrees, including large ones, and complex inter-breeding structures.
 Multiple marriages are also handled by the Mega2 loop-breaking procedure,
 although, we currently limit the number of marriages at 10 per person.
 If your pedigree contains more than 10 marriages per individual, then you
 are advised to use Makeped in order to break the loops.
 
\end_layout

\begin_layout Paragraph
Loop-breaker selection menu:
\end_layout

\begin_layout Standard
This allows the user to specify whether selecting a loop-breaker should
 be limited only to the non-founders in a family.
 The selected list of loop-breakers is displayed as well recorded in the
 MEGA2.LOG file.
 
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
Loop-breaker selection menu:
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed.
\end_layout

\begin_layout LyX-Code
 1) Select only non-founders as loop-breakers [n].
\end_layout

\begin_layout LyX-Code
Enter 1 to toggle, 0 to exit > 
\end_layout

\begin_layout Paragraph
Loop reconnection:
\end_layout

\begin_layout Standard
Mega2 will automatically reconnect the loops of a linkage pedigree file
 when necessary.
 For example, this is done when generating output files in MENDEL, SAGE,
 and SOLAR formats.
 The reconnection will, unfortunately, result in a renumbering of person
 IDs.
\end_layout

\begin_layout Standard
If the input pedigree was in pre-Makeped format, then the pedigrees remain
 intact for these options.
\end_layout

\begin_layout Standard
Mega2 displays each pair of pedigree records that were re-connected, as
 well as logging them in the MEGA2.KEYS file.
\end_layout

\begin_layout Subsubsection
Simple Mega2 Map file
\begin_inset CommandInset label
LatexCommand label
name "sub:Simple-Mega2-Map"

\end_inset


\end_layout

\begin_layout Standard

\emph on
Default name:
\emph default
 map.##, where ## is the number of the chromosome (01, 02, ..., 23) or map.ex,
 where ex is the input file extension.
 So if the chromosome number chosen is 2, then Mega2 looks for the file
 map.02 in the current directory.
\end_layout

\begin_layout Standard
\begin_inset VSpace defskip
\end_inset

The map file gives the (relative) map position of each marker in centiMorgans
 (cM).
 If two markers fall at exactly same position, then Mega2 will assume that
 the marker listed first should come first, and will automatically add a
 small increment (of 0.0001 cM) to the position of the second marker.
\end_layout

\begin_layout Standard
Note that Mega2 can now make the distinction between Haldane and Kosambi
 map distances by looking at the first line of the map file.
 If the second column heading contains 
\begin_inset Quotes eld
\end_inset

Kosambi
\begin_inset Quotes erd
\end_inset

, then the distances are read in as Kosambi centimorgans.
\end_layout

\begin_layout Standard
An additional 4th column can be added to the map file specifying mistyping
 probabilities for each marker.
 These values are utilized within the Genotyping error simulation option.
 This column should have the heading 
\begin_inset Quotes eld
\end_inset

error
\begin_inset Quotes erd
\end_inset

 (case-insensitive).
\end_layout

\begin_layout Standard
Some of the analysis options like SLINK, Vitesse etc.
 use recombination fractions.
 In this case, the appropriate mapping function is used to convert the inter-mar
ker distances into recombination fractions.
 In Aspex, e.g., if the user chooses to output Kosambi map distances, using
 Haldane distances in the map file, the map will first be converted to thetas
 which will then be converted to Kosambi map distances.
\end_layout

\begin_layout Standard
Example map file, 'map.05': 
\end_layout

\begin_layout LyX-Code
CHROMOSOME    KOSAMBI   NAME
\end_layout

\begin_layout LyX-Code
5             0.0       M1
\end_layout

\begin_layout LyX-Code
5             5.0       M3
\end_layout

\begin_layout LyX-Code
5             8.0       M2
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
NOTE: Any marker that is in the locus file must be given a map position
 in the map file.
 Thus, the marker names used in the map file must match exactly the names
 used in the locus file.
 If a codominant marker locus in the locus file is not found in the map
 file, then Mega2 will warn you about this.
 If you ignore the warning, then this locus will not appear in the output
 files created by Mega2.
 You may have more loci in the map file than appear in the locus file.
 While you will be warned about this, it does not pose any difficulties.
\end_layout

\begin_layout Standard
NOTE: The Simple Mega2 Map file is only available for linkage input.
\end_layout

\begin_layout Standard
Hint: See the Genetic Map Interpolator section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:Genetic-Map-Interpolator"

\end_inset

 for help on creating map files.
 
\end_layout

\begin_layout Subsubsection
Specifying sex-specific maps 
\end_layout

\begin_layout Standard
The simple map file now allows two extra columns for specifying male and
 female map distances.
 These columns should appear after the 
\begin_inset Quotes eld
\end_inset

Name
\begin_inset Quotes erd
\end_inset

 column.
 They should be labeled 
\begin_inset Quotes eld
\end_inset

male
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

female
\begin_inset Quotes erd
\end_inset

 respectively, and Mega2 is case-insensitive to these headers.
 The map function for the male and female maps is assumed to be the same
 as the sex-average map (the second column).
 Here is an example of a Mega2 map file, 'map.05', containing male and female
 maps: 
\end_layout

\begin_layout LyX-Code
CHROMOSOME    KOSAMBI   NAME    MALE       FEMALE
\end_layout

\begin_layout LyX-Code
5             0.0       M1      0.0        0.0
\end_layout

\begin_layout LyX-Code
5             5.0       M3      2.0        7.0
\end_layout

\begin_layout LyX-Code
5             8.0       M2      4.0       12.0
\end_layout

\begin_layout Subsubsection
Omit file [Optional]
\end_layout

\begin_layout Standard
The optional omit file permits one to easily delete certain genotypes/phenotypes
 from all Mega2-generated output files.
 This is useful if certain genotypes are Mendelianly-inconsistent, yet one
 wants to preserve the original marker data in the input file, or one wishes
 to exclude specific phenotypes from the output.
\end_layout

\begin_layout Standard
The omit file should be in the following format:
\end_layout

\begin_layout Standard
Each line should contain three items separated by white space.
 These items represent pedigree, person, and loci.
 For a LINKAGE format file these must be ordered pedigree, person, and loci
 respectively.
 For a Mega2 format file the columns can be in any order but must be named
 Pedigree, Individual, and Marker.
 The pedigree should be either All, or an integer that must match a pedigree
 number used in your input file.
 If All, then the locus(loci) with associated person(s) will be untyped
 for all pedigrees.
 Otherwise only loci with the specific pedigree number will be affected.
 The person should be either All, a zero (synonym for All), or an integer
 that must match a person number used in your input file.
 If a zero, or All, then the locus(loci) with associated pedigree(s) will
 be untyped for all persons.
 Otherwise only loci with the specific person number will be affected.
 The loci (third item) should be either All, or the name of a locus used
 in your input file.
 If All, then the person(s), and pedigree(s) indicated will be untyped for
 
\emph on
all marker
\emph default
 
\emph on
loci only; trait loci will not be affected
\emph default
.
 Otherwise only the specific loci (marker or trait) will be affected.
\end_layout

\begin_layout Standard
A summary of the omit results will be found in the file omit.log.
 This file is rewritten the next time Mega2 is run with an omit file specified.
\end_layout

\begin_layout Standard
The following describes possible errors and warnings associated with the
 reading of an omit file.
 If Mega2 can not find a specific pedigree, person, or loci (from the omit
 file) in the input data, it will halt with an error message.
 If All is used for a loci in the omit file, and the input data contains
 a loci named All, it will halt with an error message.
 If the pedigree is specified as All, and a person number given, a warning
 will be issued if that person cannot be found within one of the available
 pedigrees.
 If pedigree, person, and loci are all specified as All, a warning will
 be issued stating that all marker loci will be untyped.
\end_layout

\begin_layout Standard
Example LINKAGE format omit file, 'omit.05':
\end_layout

\begin_layout LyX-Code
1 0   All
\end_layout

\begin_layout LyX-Code
2 10  M2
\end_layout

\begin_layout LyX-Code
2 All M1
\end_layout

\begin_layout Standard
This file generates the following log file: 
\end_layout

\begin_layout LyX-Code
Untyped all individuals in pedigree 1 at all marker loci.
\end_layout

\begin_layout LyX-Code
Untyped individual 10 in pedigree 2 at locus M2.
\end_layout

\begin_layout LyX-Code
Untyped all individuals in pedigree 2 at locus M1.
\end_layout

\begin_layout Standard
The omit file can also be used to set trait phenotypes to unknown.
 Here is such an example: 
\end_layout

\begin_layout LyX-Code
1 11 AFF2
\end_layout

\begin_layout LyX-Code
1 11 QUANT1
\end_layout

\begin_layout Standard
These two lines direct Mega2 to 
\begin_inset Quotes eld
\end_inset

untype
\begin_inset Quotes erd
\end_inset

 person 11 of pedigree 1 at the affection status locus AFF2 and the QTL
 locus QUANT1.
 The affection status will be set to unknown (0), and the quantitative phenotype
 will be set to the appropriate missing value in the output (see 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Value_Missing_Quant_On_Output"

\end_inset

).
 These actions are logged as well.
\end_layout

\begin_layout Standard
Please note that when the loci column contains the keyword 
\begin_inset Quotes eld
\end_inset

All
\begin_inset Quotes erd
\end_inset

, it still refers to only marker loci; trait loci are left untouched.
 You may also use a locus named 
\begin_inset Quotes eld
\end_inset

All
\begin_inset Quotes erd
\end_inset

 in your input data so long as you do not use 
\begin_inset Quotes eld
\end_inset

All
\begin_inset Quotes erd
\end_inset

 as a loci in the omit file.
\end_layout

\begin_layout Standard

\emph on
Default name:
\emph default
 omit.##, where ## is the number of the chromosome (01, 02, ..., 23) or omit.ex,
 where ex is the input file extension.
 So if the chromosome number chosen is 2, then Mega2 looks for the file
 omit.02 in the current directory.
 NOTE: Since a person who breaks a loop is indicated twice in a post-Makeped
 pedigree file, if you want to untype a loop breaker, you must explicitly
 untype both occurrences of this loop breaker person.
 Mega2 checks to see if loop-breakers have the same genotypes, and will
 flag an error otherwise.
\end_layout

\begin_layout Standard
Hint: See the section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:omit-file"

\end_inset

 on creating omit files based on errors found by running the pedigree-checking
 program Pedcheck.
\end_layout

\begin_layout Subsubsection
Header-less Names file
\begin_inset CommandInset label
LatexCommand label
name "sub:Names-file"

\end_inset


\end_layout

\begin_layout Standard
The names file is an alternate way of specifying locus data.
 It consists of only locus names and types.
 If a names file is used, the pedigree file can contain 
\series bold
uncoded genotypes
\series default
 which could be base-pair sizes or non-numeric allele names.
 Mega2 will then read in the pedigree file, and, if needed, recode the pedigree
 data marker genotypes as numbered alleles.
 
\end_layout

\begin_layout Standard
Here is a names file, 'names.05', which corresponds to the locus datafile
 in the preceding section.
 
\end_layout

\begin_layout LyX-Code
A TRAIT
\end_layout

\begin_layout LyX-Code
T Q1
\end_layout

\begin_layout LyX-Code
M M1
\end_layout

\begin_layout LyX-Code
M M2
\end_layout

\begin_layout LyX-Code
M M3
\end_layout

\begin_layout Standard
Six locus types are recognized, autosomal numbered(M), x-linked numbered(X),
 binary trait with a single liability class(A), binary trait with multiple
 liability classes(L), quantitative traits(T) and covariates(C).
 The pedigree data file is then processed as follows:
\end_layout

\begin_layout Standard
An autosomal or X-linked numbered locus is read in as a pair of character
 strings, a binary trait is read in as a single number which has to be 0,
 1 or 2, a trait locus with multiple liability classes is read in as a 
\begin_inset Formula $<$
\end_inset

status, liability-class
\begin_inset Formula $>$
\end_inset

 pair, where status is 0, 1, or 2, and liability-class is any number greater
 than 0.
 
\end_layout

\begin_layout Paragraph
Names file and Mega2's RECODE facility
\end_layout

\begin_layout Standard
Mega2's 
\series bold
recoding facility
\series default
 eliminates the need for conversion of raw genotype data into consecutively
 numbered alleles which is required by the linkage format specification.
 This facility also eliminates the need to have allele frequencies for chromosom
al markers, instead estimating these from the pedigree data itself.
 
\end_layout

\begin_layout Standard
In the Mega2 file format, providing a frequency file will cause the allele-frequ
ency estimation to be skipped, only allele labels will be recoded.
 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "inp:vcf_or_bcf"

\end_inset

Variant Call Format (VCF, BCF, compressed VCF) input file formats
\begin_inset CommandInset label
LatexCommand label
name "sub:VCF-file-formats"

\end_inset


\end_layout

\begin_layout Standard
Variant Call Format (VCF) was designed to store information about genetic
 variants (See: 
\begin_inset CommandInset href
LatexCommand href
name "Wikipedia"
target "http://en.wikipedia.org/wiki/Variant_Call_Format"

\end_inset

).
 Mega2 currently uses source code from the popular VCFtools program (See:
 
\begin_inset CommandInset href
LatexCommand href
name "VCFtools"
target "http://vcftools.sourceforge.net"

\end_inset

) as its underlying engine for parsing VCF files.
 VCFtools (and so Mega2) currently supports VCF format v4.0 and VCF format
 v4.1 (See: 
\begin_inset CommandInset href
LatexCommand href
name "VCF Specification"
target "http://vcftools.sourceforge.net/specs.html"

\end_inset

), and BCF format v2.1 (See: 
\begin_inset CommandInset href
LatexCommand href
name "BCF (Binary VCF) version 2"
target "http://www.1000genomes.org/wiki/analysis/variant-call-format/bcf-binary-vcf-version-2"

\end_inset

).
 Mega2 supports only the 'filtering' options associated with the binary
 executable 'vcftools' file (See: 
\begin_inset CommandInset href
LatexCommand href
name "VCFtools Options"
target "http://vcftools.sourceforge.net/options.html"

\end_inset

).
 In particular, the options supported are: the Site Filtering Options, the
 Individual Filters, and the Genotype Filters.
 These options are specified to Mega2 as they would be to the 'vcftools'
 program in the form of a command line option string.
 In Mega2 interactive mode (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Common-Variant-Call-Format-menu-items"

\end_inset

) Mega2 allows the user to specify the filtering options via the input menu,
 and in batch file mode the VCF_Args batch file item is used (See: 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:VCF_Args"

\end_inset

).
\end_layout

\begin_layout Standard
VCF input format uses a subset of the PLINK parameters (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:VCF-Menu-item-PLINK-parameters"

\end_inset

) to allow the user to specify phenotype information.
 With these the user can: specify a name for the pedigree file trait column
 (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:VCF-Pedigree-File"

\end_inset

), indicate the trait to be affection status or quantitative, specify the
 missing value for quantitative traits, and specify how the affection status
 is coded.
\end_layout

\begin_layout Standard
Mega2 and the 'vcftools' program will accept variant call input files in
 one of three formats: text only, gzipped compressed text only, or binary
 file.
 The variant call file format is specified using the appropriate menu in
 Mega2 (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Common-Variant-Call-Format-menu-items"

\end_inset

) or using the batch file item Input_Format_Type (See: 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Input_Format_Type"

\end_inset

) set to the values of: 5 for a .bcf (binary) file, 6 for a .vcf.gz (compressed
 text) file, and 7 for a .vcf (text) file.
\end_layout

\begin_layout Standard
\noindent
In addition to variant information, Mega2 needs additional information (i.e.,
 about family structure, genetic map positions, etc.) depending on the output
 analysis chosen (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:The-analysis-menu"

\end_inset

).
 The VCF file format allows for the possibility of user-defined fields,
 which could in theory specify this additional information within the VCF
 file.
 However, in many instances there is no consistent method for representing
 this information, and so Mega2 instead takes the approach of specifying
 additional information in separate files, which is consistent with other
 input file formats.
 As the VCF file standard evolves, we will revisit this decision.
 For example, the map position information in the variant file does not
 include genetic position information.
 Genetic position information can be easily input by providing a Mega2-format
 map file.
\end_layout

\begin_layout Standard
When using VCF-format input files, one needs to provide several files, which
 are described below.
 At a minimum, two files are required: 1) the VCF file containing the marker
 genotypes, and 2) the PLINK-format family file containing the family structure
 information.
 Optional files include a phenotype file, a map file, an omit file, an allele
 frequency file, and a penetrance file.
 The phenotype file may include a SAMPLEID column specifying the key mapping
 individuals in the family file to the samples in the VCF file.
\end_layout

\begin_layout Subsubsection
Variant Call File
\begin_inset CommandInset label
LatexCommand label
name "sub:VCF-File"

\end_inset


\end_layout

\begin_layout Standard
The Variant Call File (See: 
\begin_inset CommandInset href
LatexCommand href
name "VCF Specification"
target "http://vcftools.sourceforge.net/specs.html"

\end_inset

) is divided into three sections.
 The first section contains the meta information (lines from the beginning
 of the file that begin with the double hash mark '##').
 The second section contains only one line which is the header line (this
 line follows the last meta information line and begins with a single hash
 mark '#').
 The third section follows the header line, and contains all of the variant
 call information.
 The header line contains a number of required fields, followed by sample
 identifiers (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:VCF-Phenotype-File"

\end_inset

 for rules on mapping individual identifiers to sample identifiers).
 In interactive mode the VCF file is specified through the 
\begin_inset Quotes eld
\end_inset

Variant file
\begin_inset Quotes erd
\end_inset

 menu item.
 In batch file input the VCF file is specified using the Input_Aux_File
 batch file item (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Input_Aux_File"

\end_inset

).
\end_layout

\begin_layout Standard
A simple example VCF file is as follows:
\end_layout

\begin_layout LyX-Code

\size footnotesize
##fileformat=VCFv4.0
\end_layout

\begin_layout LyX-Code

\size footnotesize
##fileDate=20131205
\end_layout

\begin_layout LyX-Code

\size footnotesize
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
\end_layout

\begin_layout LyX-Code

\size footnotesize
##FILTER=<ID=PASS,Description="Passed variant FILTERs">
\end_layout

\begin_layout LyX-Code

\size footnotesize
#CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT 
 1_3     1_4     1_5     1_6     1_7
\end_layout

\begin_layout LyX-Code

\size footnotesize
5       2       M1      A       T       .
       PASS    .
       GT      1/1     0/1     1/1     1/1     1/1
\end_layout

\begin_layout LyX-Code

\size footnotesize
5       4       M3      G       C       .
       PASS    .
       GT      0/1     0/1     0/1     0/1     0/1
\end_layout

\begin_layout LyX-Code

\size footnotesize
5       6       M2      T       A       .
       PASS    .
       GT      0/1     0/1     0/1     0/0     0/1
\end_layout

\begin_layout Standard
The file continues off of right of the page with the following header and
 marker data.
\end_layout

\begin_layout LyX-Code

\size footnotesize
1_8     1_9     1_10    1_11    2_3     2_4     2_5     2_6     2_7    
 2_8     2_9     2_10
\end_layout

\begin_layout LyX-Code

\size footnotesize
1/1     1/1     1/1     1/1     0/0     0/0     0/0     1/1     0/0    
 0/1     0/0     0/0
\end_layout

\begin_layout LyX-Code

\size footnotesize
0/0     0/0     0/0     0/1     0/1     0/1     0/1     0/1     0/1    
 0/1     0/1     0/1
\end_layout

\begin_layout LyX-Code

\size footnotesize
0/0     0/0     0/0     0/1     0/1     0/1     0/1     0/1     0/1    
 0/1     0/1     0/1
\end_layout

\begin_layout Standard
This simple example VCF file specifies three biallelic markers (M1, M3,
 and M2).
 It should be noted that Mega2 is not restricted to biallelic markers.
 The markers and their information is as follows:
\end_layout

\begin_layout Description
M1 chromosome: 5; physical position: 2; reference allele: 1; alternate allele:
 2
\end_layout

\begin_layout Description
M3 chromosome: 5; physical position: 4; reference allele: 2; alternate allele:
 1
\end_layout

\begin_layout Description
M2 chromosome: 5; physical position: 6; reference allele: 1; alternate allele:
 2
\end_layout

\begin_layout Standard
This VCF file contains seventeen (17) sample IDs (1_3, 1_4, ..., 2_10).
 If the sample IDs do not correspond to the person IDs in the family file,
 they can be mapped to individual IDs using a SAMPLEID column in the phenotype
 file (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:VCF-Phenotype-File"

\end_inset

).
\end_layout

\begin_layout Standard
The map information from the VCF File is parsed and made available by Mega2.
 In interactive mode the map is selectable as 'VCF.p'.
 In batch file mode this map is specified by setting the value of Value_Base_Pai
r_Position_Index (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Value_Base_Pair_Position_Index"

\end_inset

) equal to 0 if no Mega2 Map File is specified (See: 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Annotated-map-file"

\end_inset

), or to one greater than the number of maps available in the Mega2 Map
 File.
 The map file (VCF.p) that is derived from the VCF file will contain all
 of the markers that have passed the vcftools filtering criteria.
 The Mega2 Map File may contain the same number of markers or less in which
 case it will provide additional filtering.
 That is, markers will be dropped if they do not appear in a map that is
 selected from a Mega2 Map File.
\end_layout

\begin_layout Standard
In many instances a Mega2 analysis option may require a genetic map.
 When using a VCF file, a genetic map can be specified using a optional
 Mega2 Map File (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Annotated-map-file"

\end_inset

).
 However, if an analysis option requires a genetic map and a Mega2 Map File
 is not specified or if a map is selected that contains no genetic maps,
 then a dummy Sex Average genetic map (whose values are all 0) will be used
 for the required genetic map.
 For example, this would allow one to convert from VCF input format to PLINK
 output format (with a dummy genetic map) when only physical map positions
 are known.
 
\end_layout

\begin_layout Standard
The marker associated with a line in the VCF file can be specified as the
 string associated with the 'ID' field of the VCF file (as in the above
 example), or as the value associated with a key in the 'INFO' field.
 This key can be specified in interactive mode, or in batch mode through
 the batch file identifier VCF_Marker_Alternative_INFO_Key.
 For a full description of how this is done please see 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:VCF_Marker_Alternative_INFO_Key"

\end_inset

.
\end_layout

\begin_layout Standard

\series bold
Converting from a VCF to a BCF file
\end_layout

\begin_layout Standard
It is possible to use the standalone VCFtools program to convert from a
 VCF file to a BCF file using the following command:
\end_layout

\begin_layout LyX-Code
$ vcftools --vcf my_study.vcf --recode-bcf-to-stream > my_study.bcf
\end_layout

\begin_layout Standard
For other uses of VCFtools and its options please see 
\begin_inset CommandInset href
LatexCommand href
name "vcftools: Usage and Options2"
target "http://vcftools.sourceforge.net/options.html"

\end_inset

.
\end_layout

\begin_layout Subsubsection
PLINK family File
\begin_inset CommandInset label
LatexCommand label
name "sub:VCF-Pedigree-File"

\end_inset


\end_layout

\begin_layout Standard
A PLINK family file is used to specify pedigree information.
 See 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:PLINK-family-file"

\end_inset

 for a PLINK family file associated with the simple example given here.
 In a family base study, it is possible (if not likely) that some of the
 individuals found in the family file will not have been genotyped, and
 therefore will have no corresponding samples mapped to them in the VCF
 file.
 In this case, Mega2 will assign these individuals with the missing genotype,
 and included them in the list of individuals available for processing.
 If on the other hand, an individual in the VCF file is excluded from the
 family file, then they are not considered for processing by Mega2.
 In this manner the family file drives individual selection.
\end_layout

\begin_layout Subsubsection
Augmented PLINK Phenotype File
\begin_inset CommandInset label
LatexCommand label
name "sub:VCF-Phenotype-File"

\end_inset


\end_layout

\begin_layout Standard
The PLINK Phenotype file (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Alternated-Phenotype-file"

\end_inset

) lists the family identifier (FID), the individual identifier (IID), and
 any traits that can be considered.
 In addition, the Phenotype file is used to map the sample identifiers from
 the header line in a VCF file (See: 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:VCF-File"

\end_inset

) to the family and individual identifiers.
 It is possible for these sample identifiers to correspond to individuals,
 but this is generally not the case.
 The sample identifiers correspond to individuals if they have the same
 string values associated with individuals.
 For family based data analysis a sample identifier must be associated with
 an individual and family information.
 To effect this, the approach that was chosen was to allow an additional
 column (SAMPLEID) to be specified in the PLINK format Input_Phenotype_File
 (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Alternated-Phenotype-file"

\end_inset

) that would allow mapping of sample identifier to the individual (IID)
 and family (FID).
\end_layout

\begin_layout Standard
An example of a phenotype file corresponding to the simple example VCF file
 (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:VCF-File"

\end_inset

) could look like this:
\end_layout

\begin_layout LyX-Code
FID  IID  TRAIT SAMPLEID
\end_layout

\begin_layout LyX-Code
1    1    2     NA
\end_layout

\begin_layout LyX-Code
1    2   NA     NA
\end_layout

\begin_layout LyX-Code
1    3   NA     1_3
\end_layout

\begin_layout LyX-Code
1    4    2     1_4
\end_layout

\begin_layout LyX-Code
1    5    2     1_5
\end_layout

\begin_layout LyX-Code
1    6   NA     1_6
\end_layout

\begin_layout LyX-Code
1    7    2     1_7
\end_layout

\begin_layout LyX-Code
1    8    2     1_8
\end_layout

\begin_layout LyX-Code
1    9    0     1_9
\end_layout

\begin_layout LyX-Code
1   10    2     1_10
\end_layout

\begin_layout LyX-Code
1   11    2     1_11
\end_layout

\begin_layout LyX-Code
2    1   NA     NA
\end_layout

\begin_layout LyX-Code
2    2    2     NA
\end_layout

\begin_layout LyX-Code
2    3   NA     2_3
\end_layout

\begin_layout LyX-Code
2    4    2     2_4
\end_layout

\begin_layout LyX-Code
2    5    2     2_5
\end_layout

\begin_layout LyX-Code
2    6   NA     2_6
\end_layout

\begin_layout LyX-Code
2    7    2     2_7
\end_layout

\begin_layout LyX-Code
2    8    2     2_8
\end_layout

\begin_layout LyX-Code
2    9    2     2_9
\end_layout

\begin_layout LyX-Code
2   10    2     2_10
\end_layout

\begin_layout Standard
Note that four individuals (FID IID 1 1; 1 2; 2 1; 2 2) do not have sample
 information in the VCF file in the example above.
\end_layout

\begin_layout Subsubsection
Map File (Optional)
\end_layout

\begin_layout Standard
A Mega2 Map File (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Annotated-map-file"

\end_inset

) is not required, but may be specified.
 The maps in the map file may be used in addition to the map found in the
 VCF file (VCF.p).
 When used with a VCF file, the Mega2 Map file may not contain a map with
 the name VCF.p.
\end_layout

\begin_layout Subsubsection
Omit File (Optional)
\end_layout

\begin_layout Standard
An omit file may be specified.
 Please see 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Input_Omit_File"

\end_inset

.
\end_layout

\begin_layout Subsubsection
Frequency File (Optional)
\end_layout

\begin_layout Standard
A Mega2 frequency file may be specified.
 Please see 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Annotated-frequency-file"

\end_inset

.
 The following file could be used with the example VCF file shown in 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:VCF-File"

\end_inset

.
 Note that corresponding REF and ALT alleles are used.
\end_layout

\begin_layout LyX-Code
Name Allele Frequency
\end_layout

\begin_layout LyX-Code
A1 1 0.990000
\end_layout

\begin_layout LyX-Code
A1 2 0.010000
\end_layout

\begin_layout LyX-Code
M1 A 0.500000
\end_layout

\begin_layout LyX-Code
M1 T 0.500000
\end_layout

\begin_layout LyX-Code
M2 A 0.500000
\end_layout

\begin_layout LyX-Code
M2 T 0.500000
\end_layout

\begin_layout LyX-Code
M3 G 0.500000
\end_layout

\begin_layout LyX-Code
M3 C 0.500000
\end_layout

\begin_layout Subsubsection
Penetrance File (Optional)
\end_layout

\begin_layout Standard
A Mega2 penetrance file may be specified.
 Please see 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Annotated-penetrance-file"

\end_inset

.
\end_layout

\begin_layout Section
Genetic Map Interpolator (GMI)
\begin_inset CommandInset label
LatexCommand label
name "sec:Genetic-Map-Interpolator"

\end_inset


\end_layout

\begin_layout Standard
Given a list of markers, one may easily create a map file containing both
 genetic and physical positions for these markers using our Genetic Map
 Interpolator (GMI) program, which is available from 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/register/
\end_layout

\end_inset

.
\end_layout

\begin_layout Standard
The Genetic Map Interpolator (GMI) program is designed to create interpolated
 genetic maps of single nucleotide polymorphism (SNP) markers.
 Starting from a list of single nucleotide polymorphism (SNP) 
\series bold
rs
\series default
 numbers, GMI fetches the most up-to-date SNP and microsatellite physical
 positions from Ensembl, and then combines these with the Rutgers combined
 genetic and physical map (Matise et al., 2007; Kong et al., 2004; Kong and
 Matise, 2004) to estimate the corresponding Kosambi genetic positions by
 linear interpolation for these SNPs.
 The resulting information is then output in map files formatted to be read
 in by Mega2 (Mukhopadhyay et al., 2005; 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/register/
\end_layout

\end_inset

) .
\end_layout

\begin_layout Standard
GMI has a number of useful features:
\end_layout

\begin_layout Itemize
GMI automatically looks up and uses the physical positions for each marker
 from the 
\emph on
most recent
\emph default
 Ensembl build.
\end_layout

\begin_layout Itemize
For each SNP that is not initially found in Ensembl, GMI automatically checks
 to see if that SNP has been assigned a new rs number.
\end_layout

\begin_layout Itemize
GMI automatically figures out which chromosome each marker is on, so knowledge
 of a marker's chromosome is not required to run GMI.
\end_layout

\begin_layout Standard
GMI is available from 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/register/
\end_layout

\end_inset

 and documentation for GMI is available at 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/register/docs/gmi.html
\end_layout

\end_inset

.
\end_layout

\begin_layout Section
Converting to Mega2's format 
\begin_inset CommandInset label
LatexCommand label
name "sec:Converting-to-annotated-format"

\end_inset


\end_layout

\begin_layout Standard
We have provided a Python script, l2a.py, to convert linkage format files
 to Mega2's format.
 This is included within the Mega2 distribution package.
 
\end_layout

\begin_layout Standard
This format is strongly encouraged as it is less prone to data errors, although
 it is a more complicated format.
 
\end_layout

\begin_layout Standard
Usage: 
\begin_inset Newline newline
\end_inset


\series bold
 l2a.py
\series default
 without any arguments for help with input options and arguments 
\end_layout

\begin_layout Standard

\series bold
\begin_inset VSpace defskip
\end_inset


\end_layout

\begin_layout Standard

\series bold
l2a.py -p pedfile -d locusfile -m mapfile -o omitfile -x output-extension
 
\begin_inset Newline newline
\end_inset


\begin_inset VSpace defskip
\end_inset


\end_layout

\begin_layout Standard
Output files are named pedin.conv, names.conv, penetrance.conv, frequency.conv,
 map.conv and omit.conv, if no output extension is specified via the -x option.
 Otherwise, the user-specified extension is used.
\end_layout

\begin_layout Standard

\series bold
Inputs to l2a.py:
\series default

\begin_inset Newline newline
\end_inset

 The user is prompted twice for missing value indicators: 
\end_layout

\begin_layout LyX-Code
Missing quantitative phenotype value
\end_layout

\begin_deeper
\begin_layout LyX-Code
   To enter a string value, enclose within "",
\end_layout

\begin_layout LyX-Code
   otherwise entered value will be interpreted numerically.
\end_layout

\begin_layout LyX-Code
Enter missing value indicator > 
\end_layout

\begin_layout LyX-Code

\end_layout

\end_deeper
\begin_layout Standard
Entering a value without quotes (e.g.
 -99) will allow you to interpret all phenotypes numerically evaluating
 to -99 (-99.00000, -99.0 etc.) to be considered missing.
 
\end_layout

\begin_layout Standard
Affection and unknown allele values are always interpreted as strings: 
\end_layout

\begin_layout LyX-Code
 Unknown allele value string > 0
\end_layout

\begin_deeper
\begin_layout LyX-Code
----Unknown allele 0----
\end_layout

\end_deeper
\begin_layout Subsection
Pedigree file conversion
\end_layout

\begin_layout Standard
The converter can detect pre- or post-makeped pedigree formats, by checking
 if the 5th column contains 0s; for a pre-makeped format file, this should
 contain only 1s and 2s, since it is the sex indicator.
 
\end_layout

\begin_layout Standard
If your data contains unique individual identifiers as specified by the
 
\begin_inset Quotes eld
\end_inset

ID:
\begin_inset Quotes erd
\end_inset

 field, then these will be used for individual IDs.
 
\series bold
NOTE
\series default
: Mega2 checks if your unique IDs are unique over the entire set of individuals
 inside the pedigree file.
 If not, Mega2 gives you the option to generate unique IDs by prepending
 the pedigree name to the ID.
 Uniqueness is generally not required except for the Cranefoot pedigree
 drawing option, so Mega2 will automatically create new unique IDs if needed
 for this option.
 For the PAP option, Mega2 numbers individuals sequentially from 1 through
 the total number of individuals, thus it neither checks, nor generates
 unique IDs.
 
\end_layout

\begin_layout Standard
If your pedigree file contains 
\begin_inset Quotes eld
\end_inset

Ped:
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

Per:
\begin_inset Quotes erd
\end_inset

 fields, these are filled in as 
\begin_inset Quotes eld
\end_inset

PedID
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

PerID
\begin_inset Quotes erd
\end_inset

 columns.
 
\end_layout

\begin_layout Standard
The linkage pedigree and person IDs (1st and second columns respectively)
 are stored as 
\begin_inset Quotes eld
\end_inset

LinkPedID
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

LinkPerID
\begin_inset Quotes erd
\end_inset

 respectively, and these can be used as output individual and pedigree IDs
 if you select menu items 1 from the output identifier selection menus described
 below.
\end_layout

\begin_layout Standard

\series bold
Missing value indicators in pedigree file:
\series default
 Usually pedigree data contains unknown genotypes and phenotypes.
 The l2a.py script prompts the user to enter two missing value indicators,
 one for marker alleles and affection status, and another one for missing
 quantitative.
 If you started off from a linkage format file, unknown alleles and affection
 status is usually coded as 0 whereas missing quantitative traits are coded
 as some unlikely number such as -99.
 All missing genotype and phenotype values are coded as NA in the converted
 Mega2 file.
\end_layout

\begin_layout Standard

\series bold
Missing fields inside pedigree records:
\series default
 The converter decides the number of fields required inside each line by
 looking at the pedigree-file format (post- or pre- makeped), the number
 of loci defined inside the names file, and whether extra fields such as
 Ped:, Per: and ID: are present.
 It flags an errors and terminates if there are not enough fields on one
 or more lines.
 If there are extra columns, it warns the users and proceeds.
 However, such variations could be indicative of problems with the input
 data, therefore, even if the conversion continued, the resulting output
 file could have wrong values.
\end_layout

\begin_layout Subsection
Locus file conversion 
\end_layout

\begin_layout Standard
If you are using a names-format file, then only a names file will be created.
 If you convert a linkage format locus data file with frequencies and trait
 penetrances, then Mega2 format frequency and penetrance files are also
 written.
\end_layout

\begin_layout Subsection
Map file conversion
\end_layout

\begin_layout Standard
The converter checks the map function type and male or female-specific maps
 from the map file headers, and creates the appropriate Mega2 map file.
\end_layout

\begin_layout Section
The input menu
\begin_inset CommandInset label
LatexCommand label
name "sec:The-input-menu"

\end_inset


\end_layout

\begin_layout Standard
When you first started up Mega2, it will present a menu for entering input
 file names in Mega2 native format:
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
              Mega2 4.7.1 input menu:
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed
\end_layout

\begin_layout LyX-Code
 1) Select input file format:                   Mega2 format with header
\end_layout

\begin_layout LyX-Code
 2) Input file suffix:                          01
\end_layout

\begin_layout LyX-Code
 3) Locus file:       (Mega2 datain.)[required] _
\end_layout

\begin_layout LyX-Code
 4) Pedigree file:    (Mega2 pedin.) [required] _
\end_layout

\begin_layout LyX-Code
 5) Map file:         (Mega2 map.)   [required] _
\end_layout

\begin_layout LyX-Code
 6) Omit file:        (Mega2 omit.)  [optional] _
\end_layout

\begin_layout LyX-Code
 7) Frequency file:   (Mega2 freq.)  [optional] _
\end_layout

\begin_layout LyX-Code
 8) Penetrance file:  (Mega2 pen.)   [optional] _
\end_layout

\begin_layout LyX-Code
 9) Output Directory:                           [ Current directory ]
\end_layout

\begin_layout LyX-Code
10) Simulate genotyping errors:                 [ no ]
\end_layout

\begin_layout LyX-Code
11) Include all pedigrees whether typed or not 
\end_layout

\begin_layout LyX-Code
12) Maximum number of alleles per marker:       2 alleles
\end_layout

\begin_layout LyX-Code
Select from options 0-12 >
\end_layout

\begin_layout Standard
Each line that selects an input file indicates the type of file, the format
 of the file (here Mega2), the prefix (when prepended to the suffix) [ or
 the suffix (when appended to a stem)] and whether the file is required
 or optional.
 Whether the file type is embedded in the suffix or prefix depends on the
 convention used for the particular input class.
 Additional menu lines are used to set operational parameters.
\end_layout

\begin_layout Standard
\begin_inset Quotes eld
\end_inset

Line 1
\begin_inset Quotes erd
\end_inset

 (Select input file format) introduces a special menu that lets you select
 a specific input type from Linkage, Mega2, PLINK (choosing among various
 subtypes) and Variant Call Format (VCF) (choosing among various subtypes).
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
Mega2 4.7.1 input file type menu:
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed
\end_layout

\begin_layout LyX-Code
*1) Mega2 format with header
\end_layout

\begin_layout LyX-Code
 2) Linkage format
\end_layout

\begin_layout LyX-Code
 3) Linkage with Mega2 names file
\end_layout

\begin_layout LyX-Code
 4) PLINK binary PED format (bed)
\end_layout

\begin_layout LyX-Code
 5) PLINK PED format (ped)
\end_layout

\begin_layout LyX-Code
 6) BCF format (bcf)
\end_layout

\begin_layout LyX-Code
 7) VCF compressed format (vcf.gz)
\end_layout

\begin_layout LyX-Code
 8) VCF format (vcf) 
\end_layout

\begin_layout LyX-Code
Select from options 0-8 >
\end_layout

\begin_layout Standard
For example, selecting 
\begin_inset Quotes eld
\end_inset

Line 6
\begin_inset Quotes erd
\end_inset

 (BCF format (bcf)) replaces the old input menu with a new menu:
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
              Mega2 4.7.1 input menu:
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed
\end_layout

\begin_layout LyX-Code
 1) Select input file format:                 BCF format (bcf)
\end_layout

\begin_layout LyX-Code
 2) Enter VCF parameters:                     --remove-indels
\end_layout

\begin_layout LyX-Code
 3) Enter PLINK parameters:                    --missing-phenotype -9 --trait
 default
\end_layout

\begin_layout LyX-Code
 4) Input file stem:                          study
\end_layout

\begin_layout LyX-Code
 5) Variant file:     (binary .bcf)[required] _
\end_layout

\begin_layout LyX-Code
 6) Pedigree file:    (PLINK .fam) [required] _
\end_layout

\begin_layout LyX-Code
 7) Phenotype file:   (PLINK .phe) [optional] _
\end_layout

\begin_layout LyX-Code
 8) Map file:         (Mega2 .map) [optional] _
\end_layout

\begin_layout LyX-Code
 9) Omit file:        (Mega2 .omit)[optional] _
\end_layout

\begin_layout LyX-Code
10) Frequency file:   (Mega2 .freq)[optional] _
\end_layout

\begin_layout LyX-Code
11) Penetrance file:  (Mega2 .pen) [optional] _
\end_layout

\begin_layout LyX-Code
12) Output Directory:                         [ Current directory ]
\end_layout

\begin_layout LyX-Code
13) Simulate genotyping errors:               [ no ]
\end_layout

\begin_layout LyX-Code
14) Include all pedigrees whether typed or not
\end_layout

\begin_layout LyX-Code
15) Maximum number of alleles per marker:     2 alleles
\end_layout

\begin_layout LyX-Code
Select from options 0-15 >
\end_layout

\begin_layout Standard
Here you see that some (actually one) of the files are intrinsic Variant
 Call Format files (.bcf), but other files are in PLINK format, and other
 files are in Mega2 native format.
 The reason for this varied assortment of file formats will be explained
 later.
 Below, we will discuss the input-specific files first, then the other menu
 items.
\end_layout

\begin_layout Standard
Note: Mega2, by default, starts with the 
\begin_inset Quotes eld
\end_inset

Mega2 format with header
\begin_inset Quotes erd
\end_inset

 input type.
 It is possible using the flags in the table below to have Mega2 start with
 a different input type.
\end_layout

\begin_layout LyX-Code
\begin_inset Tabular
<lyxtabular version="3" rows="9" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="left" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Mega2 Argument
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Initial Input File Type
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
--mega2
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Mega2 format with header
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
--linkage
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Linkage format
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
--extend_linkage
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Linkage with Mega2 names file
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
--bed
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
PLINK binary PED format (bed)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
--ped
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
PLINK PED format (ped)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
--bcf
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
BCF format (vcf)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
--vcf.gz
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
VCF compressed format (vcf.gz)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
--vcf
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
VCF format (vcf)
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
Note: Batch files created with Mega2 version 4.6.1 or earlier will not have
 an input type.
 In this case, Mega2 will look at the inputs and try to decide what the
 input type was choosing from the Mega2, Linkage, and PLINK types.
\end_layout

\begin_layout Subsection
Input formats: Mega2 and Linkage
\end_layout

\begin_layout Paragraph
Input menu item 1: Input file extension:
\end_layout

\begin_layout Standard
The first item is a file extension.
 When the input file extension (ext) is specified, Mega2 will search through
 the current directory and retrieve files named datain.ext (or names.ext),
 pedin.ext, map.ext, omit.ext, frequency.ext and penetrance.ext, if they exist.
 So it is a good idea to use the default file naming schemes, as then many
 items of the input menu are automatically populated once the correct extension
 has been chosen.
\end_layout

\begin_layout Paragraph

\series bold
Locus, Pedigree and Map datafile: 
\end_layout

\begin_layout Standard
The locus, pedigree, and map file are required files.
 In future versions, for the Mega2 format, the names file will be made optional,
 since locus names and types are already specified in the first line of
 the pedigree file.
 
\end_layout

\begin_layout Paragraph
Input menu item: Locus datafile:
\end_layout

\begin_layout Standard
This specifies the locus file name.
 
\end_layout

\begin_layout Paragraph
Input menu item: Pedigree datafile:
\end_layout

\begin_layout Standard
This specifies the pedigree file name.
 
\end_layout

\begin_layout Paragraph
Input menu item: Map datafile:
\end_layout

\begin_layout Standard
This specifies the name of map file.
 The locus datafile, pedigree datafile and the map datafile are now mandatory
 for all Mega2 options.
 If the input pedigree and locus data do not contain mapped loci, then a
 dummy map file should be created with a single marker, which need not be
 present in the pedigree and locus files.
 See the locus reordering section for more details.
 
\end_layout

\begin_layout Subsection
Common PLINK menu items
\end_layout

\begin_layout Paragraph
Menu item: PLINK parameters
\begin_inset CommandInset label
LatexCommand label
name "sub:PLINK-parameters"

\end_inset


\end_layout

\begin_layout Standard
This menu item is displayed mainly for PLINK PED and PLINK binary PED input.
 As discussed previously in section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:PLINK-file-formats"

\end_inset

, the 
\series bold
\emph on
plink
\series default
\emph default
 program will accept input files with omitted columns if an appropriate
 flag is specified.
 Mega2 also respects these flags and allows them to be set.
 Selecting this option displays the available feature flags:
\end_layout

\begin_layout LyX-Code
PLINK options: --no-fid --no-parents --no-pheno --1 --map3 ...
\end_layout

\begin_layout LyX-Code
    --missing-phenotype <value> --cM --kosambi/--haldane ...
\end_layout

\begin_layout LyX-Code
    --trait <value> --affectionstatus/--quantitative
\end_layout

\begin_layout Standard
Most of these flags are familiar from the previous PLINK file format discussion
 in Section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:PLINK-file-formats"

\end_inset

.
 The new flags will be explained below: 
\end_layout

\begin_layout Standard
\noindent
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="6" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
flag
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
kosambi
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
genetic distance in map file is in Kosambi units (default)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
haldane
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
genetic distance in map file is in Haldane units
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
trait
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
specify a trait name for the pedigree file trait column (the default trait
 name is 'default')
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-affectionstatus
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
indicate that the trait is a dichotomous affection status trait locus (default)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-quantitative
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
indicate that the trait is a quantitative trait locus
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
For reference, we will repeat the PLINK related flags from section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:PLINK-file-formats"

\end_inset


\end_layout

\begin_layout Quotation
\begin_inset Tabular
<lyxtabular version="3" rows="9" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="left" valignment="top" width="4in">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
flag
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
no-fid
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
The two columns pedigree & person are replaced by one column, specifying
 a unique identifier
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
no-parents
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
The father and mother column are not present; Mega2 will assign the missing
 value zero '0' to the entries in these two columns.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
no-sex
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
The sex column is not present; 0 is used as the value.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
no-pheno
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
The trait column is not present.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
map3
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
The genetic position column is not present.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
cM
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
The genetic position is specified in centiMorgans.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
missing-phenotype
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Specifies the missing value for quantitative traits (default -9)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
1
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Affection status is coded 0 (unaffected) / 1 (affected) / -9 (missing,)
 vs.
 0 (missing) / 1 (unaffected) / 2 (affected) / -9 (missing)
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
You type the desired flags for the PLINK parameters menu item line and hit
 enter to have the flags (validated and) recorded.
\end_layout

\begin_layout Paragraph
Menu item: Input file stem
\end_layout

\begin_layout Standard
This field becomes the file stem.
 If the stem is set to 'plink', then Mega2 attempts to fill in the menu
 items that require file names by searching for plink.ped, plink.bed, plink.bam,
 plink.fam, plink.map, and plink.phe and additionally plink.omit, plink.frequency,
 and plink.penetrance.
\end_layout

\begin_layout Subsection
Input format: PLINK binary PED
\end_layout

\begin_layout Paragraph
Pedigree, Map and Binary datafile:
\end_layout

\begin_layout Standard
The pedigree (.fam), map (.bim) and binary (.bed) files are required for PLINK
 binary PED input.
 The phenotype file as well as the omit, frequency and penetrance files
 are optional.
\end_layout

\begin_layout Paragraph
Input menu item: Pedigree datafile:
\end_layout

\begin_layout Standard
This specifies the pedigree file name (six column 
\begin_inset Quotes eld
\end_inset

fam
\begin_inset Quotes erd
\end_inset

 file).
 
\end_layout

\begin_layout Paragraph
Input menu item: Map datafile:
\end_layout

\begin_layout Standard
This specifies the extended map file with allele data (six column 
\begin_inset Quotes eld
\end_inset

bim
\begin_inset Quotes erd
\end_inset

 file).
\end_layout

\begin_layout Paragraph
Input menu item: Binary PED datafile:
\end_layout

\begin_layout Standard
This specifies the binary allele data.
\end_layout

\begin_layout Subsection
Input format: PLINK ped
\end_layout

\begin_layout Paragraph
Pedigree and Map datafile:
\end_layout

\begin_layout Standard
The pedigree (.ped), and map (.map) files are required for PLINK PED input.
 The phenotype file as well as the omit, frequency and penetrance files
 are optional.
\end_layout

\begin_layout Paragraph
Input menu item: Pedigree datafile:
\end_layout

\begin_layout Standard
This specifies the pedigree file name (.ped file).
\end_layout

\begin_layout Paragraph
Input menu item: Map datafile:
\end_layout

\begin_layout Standard
This specifies the four column map file (.map file).Common PLINK menu items
\end_layout

\begin_layout Subsection
Common Variant Call Format menu items
\begin_inset CommandInset label
LatexCommand label
name "sub:Common-Variant-Call-Format-menu-items"

\end_inset


\end_layout

\begin_layout Standard
The Variant Call Format file (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:VCF-file-formats"

\end_inset

) can be presented as text (.vcf), compressed text (.vcf.gz) or binary format
 (.bcf).
 Conceptually, this file is a combination of the PLINK .bed/.ped file (for
 genotype information) and the PLINK .map file (for chromosome and physical
 position).
 The variant file is missing the pedigree information (.fam) and phenotype
 information (.phe) that we customarily need for linkage analysis.
 Hence, we allow the user to supply these two additional files in PLINK
 format.
 Then we need to allow a few of the PLINK parameters introduced above for
 these PLINK files.
\end_layout

\begin_layout Paragraph
Menu item: PLINK parameters
\begin_inset CommandInset label
LatexCommand label
name "par:VCF-Menu-item-PLINK-parameters"

\end_inset


\end_layout

\begin_layout Standard
Restricted list of available PLINK parameters.
 Selecting this option displays the available feature flags:
\end_layout

\begin_layout LyX-Code
PLINK options: --missing-phenotype <value> --trait <value> ...
\end_layout

\begin_deeper
\begin_layout LyX-Code
--affectionstatus/--quantitative
\end_layout

\end_deeper
\begin_layout Standard
The flags are a subset of the flags allowed for PLINK input: 
\end_layout

\begin_layout Standard
\noindent
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="4" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
flag
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
trait
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
specify a name for the pedigree file trait column
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-affectionstatus
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
indicate that trait is a binary affection status
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-quantitative
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
indicate that trait is an arbitrary number
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
Again, we will repeat the supplementary PLINK related flags from section
 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:PLINK-file-formats"

\end_inset


\end_layout

\begin_layout Quotation
\begin_inset Tabular
<lyxtabular version="3" rows="3" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="left" valignment="top" width="4in">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
flag
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
meaning
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
missing-phenotype
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Specifies the missing value for quantitative traits (default -9)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
1
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Affection status is coded 0 (unaffected) / 1 (affected) / -9 (missing,)
 vs.
 0 (missing) / 1 (unaffected) / 2 (affected) / -9 (missing)
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Paragraph
Menu item: Variant Call Format parameters
\end_layout

\begin_layout Standard
Mega2 supports only the 'filtering' options associated with the binary executabl
e 'vcftools' file (See: 
\begin_inset CommandInset href
LatexCommand href
name "VCFtools Options"
target "http://vcftools.sourceforge.net/options.html"

\end_inset

).
 In particular, the options supported are the: Site Filtering Options, the
 Individual Filters, and the Genotype Filters.
\end_layout

\begin_layout Standard
Note that filtering must be done using position information and sample IDs
 from the input VCF file.
\end_layout

\begin_layout Subsection
Input format: Variant Call Format files
\end_layout

\begin_layout Paragraph
Pedigree and Map datafile
\end_layout

\begin_layout Standard
The variant file in the selected format and the pedigree (.fam) are required
 for Variant input files.
 The phenotype file as well as the Mega2 map, omit, frequency and penetrance
 files are optional.
\end_layout

\begin_layout Paragraph
Input menu item: Variant Call Format datafile:
\end_layout

\begin_layout Standard
This specifies the vcf file name as .bcf, .vcf, or .vcf.gz as appropriate to
 the input type chosen.
\end_layout

\begin_layout Paragraph
Input menu item: Pedigree datafile:
\end_layout

\begin_layout Standard
This specifies the pedigree file name (.fam file).
\end_layout

\begin_layout Paragraph
Input menu item: Map datafile:
\end_layout

\begin_layout Standard
This specifies a Mega2 map file to provide genetic position information
 for analysis modes.
\end_layout

\begin_layout Subsection
Input menu items: Omit, frequency and penetrance data files (optional):
\end_layout

\begin_layout Standard
This specifies the names of the omit file, allele-frequency file and trait
 penetrance file respectively.
 The omit, frequency and penetrance input data files are all optional files.
 The frequency and penetrance files are read in only for the Mega2 file
 format.
 These files were created to support the Mega2 native file format, but we
 allow these files to be specified for PLINK and VCF file formats.
\end_layout

\begin_layout Subsection
Input menu item: Output Directory: 
\end_layout

\begin_layout Standard
This specifies the name of the directory where Mega2 creates the output
 files.
 By default, this is set to the directory from which Mega2 is invoked.
 The output directory can be specified either as an absolute path (e.g., /home/use
r/mega2_results/example) or a relative path.
 Mega2 checks to see if the specified directory exists, if not, the user
 is asked if this directory should be created before proceeding.
 
\end_layout

\begin_layout Subsection
Input menu item: Simulating genotyping errors: 
\begin_inset CommandInset label
LatexCommand label
name "sub:Simulate-errors"

\end_inset


\end_layout

\begin_layout Standard
This option can be toggled between 
\emph on
yes
\emph default
 and 
\emph on
no
\emph default
 by simply selecting option 8 of the input menu.
 The default value is no.
 Setting this option to 
\begin_inset Quotes eld
\end_inset

yes
\begin_inset Quotes erd
\end_inset

 will cause Mega2 to execute a genotyping error simulation step after selection
 and reordering of marker loci.
 In this step, genotypes of individuals are changed at user-selected marker
 loci, according to a user-specified error-probability model.
 
\end_layout

\begin_layout Subsection*
Genotyping error simulation 
\end_layout

\begin_layout Paragraph
Overview 
\end_layout

\begin_layout Standard
This option was created in order to evaluate Genotyping error detection
 software.
 This allows the user to introduce errors at a certain percentage of genotypes
 within a marker, by changing the input genotype subject to certain requirements
 (such as allele frequencies, whether to select a homozygous or heterozygous
 genotype, etc.).
 This option can be turned on and off using in the Mega2 input menu.
 
\end_layout

\begin_layout Subsection*
Parameter selection menu 
\end_layout

\begin_layout Standard
The mistyping simulation step requires selection of loci at which errors
 should be introduced, the probability model for introducing errors, and
 names of the output files which contain lists of changed genotypes, and
 the percentage of genotypes changed.
 
\end_layout

\begin_layout Standard
The error simulation menu is as follows: 
\end_layout

\begin_layout LyX-Code
Error model and loci selection menu 
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed.
 
\end_layout

\begin_layout LyX-Code
1) Apply error model to selected loci.
 
\end_layout

\begin_layout LyX-Code
2) Apply error to all except selected loci.
 
\end_layout

\begin_layout LyX-Code
3) Select error model Uniform 
\end_layout

\begin_layout LyX-Code
4) Change error probability [0.050] 
\end_layout

\begin_layout LyX-Code
5) Mistyping genotypes file name error_genos.06 [new] 
\end_layout

\begin_layout LyX-Code
6) Mistyping summary file name error_sum.06 [new] 
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard

\series bold
Marker selection
\series default
 
\begin_inset Newline newline
\end_inset

 Loci can be selected by two methods: (a) by specifying loci that should
 have errors, or, (b) specifying loci that should NOT have errors.
\end_layout

\begin_layout Standard

\series bold
Error model selection
\series default
 
\begin_inset Newline newline
\end_inset

 Currently input error probabilities can follow any one of three models:
 
\end_layout

\begin_layout Itemize
One uniform error rate for all selected markers
\end_layout

\begin_deeper
\begin_layout Standard
A uniform rate means that alternate genotypes are selected with a uniform
 probability).
 The value of this probability is set to 0.05 by default, and can be changed
 via the menu.
\end_layout

\end_deeper
\begin_layout Itemize
Separate uniform error rates for each selected marker:
\end_layout

\begin_deeper
\begin_layout Standard
These error rates have to be specified inside the map file as a 4th column
 under the heading 
\begin_inset Quotes eld
\end_inset

error
\begin_inset Quotes erd
\end_inset

.
 These rates cannot be changed once Mega2 has started running.
\end_layout

\end_deeper
\begin_layout Itemize
SimWalk2's error model:
\end_layout

\begin_deeper
\begin_layout Standard
This involves the specification of 5 separate error probabilities, which
 can be changed using the menu.
 For an explanation of these probability values, refer to the paper: 
\begin_inset Newline newline
\end_inset

 
\series bold
Detection and Integration of Genotyping Errors in Statistical Genetics
\series default
 
\begin_inset Newline newline
\end_inset

 by Sobel et al.
 in AJHG, Vol 70: pages 496-508.
\end_layout

\end_deeper
\begin_layout Subsection*
Error simulation output files
\end_layout

\begin_layout Standard
Two output files and a log file is created for each run of Mega2 with the
 mistyping simulation option.
 The log file is named 
\series bold
MEGA2.ERR
\series default
 and behaves like the other log files.
 It contains details on the options selected by the user via the menu, and
 a log of each genotype changed in the process.
 
\end_layout

\begin_layout Standard
Two other output files are created which are in table formatted for easy
 reading, a genotypes file, and a summary file.
 Here is a part of a genotypes file created with the SimWalk2 error model:
 
\end_layout

\begin_layout LyX-Code
Locus   Pedigree Person Orig1 Orig2  Mis1  Mis2    Error type
\end_layout

\begin_layout LyX-Code
D06G025        1     10     6     6      1     1   E3 Homozygote
\end_layout

\begin_layout LyX-Code
D06G025        1    460     5     6      6     6              E1
\end_layout

\begin_layout LyX-Code
D06G025        1    461     5     6      3     3 E5 Heterozygote
\end_layout

\begin_layout LyX-Code
D06G025        1    685     5     5      1     3   E5 Homozygote
\end_layout

\begin_layout LyX-Code
D06G025        2     18     4     6      4     4              E1
\end_layout

\begin_layout LyX-Code
D06G025        2     25     6     6      5     6              E4
\end_layout

\begin_layout LyX-Code
D06G025        2    469     4     6      2     5 E3 Heterozygote
\end_layout

\begin_layout LyX-Code
D06G025        3     52     4     6      6     6              E1
\end_layout

\begin_layout LyX-Code
 
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
And here is the corresponding summary file: 
\end_layout

\begin_layout LyX-Code
Locus    Genotypes  Errors  Overall_rate Obs_E1 Obs_E2 Obs_E3 Obs_E4 Obs_E5
\end_layout

\begin_layout LyX-Code
D06G025       1497      59         0.039  0.020  0.034  0.004  0.059  0.004
\end_layout

\begin_layout Standard
The last 5 columns refer to the percentage of errors actually introduced
 in each error category.
\end_layout

\begin_layout Subsection
Input menu item: Untyped pedigree exclusion option:
\end_layout

\begin_layout Standard
This specifies the minimum number of typed members a pedigree should have
 in order to be included in the output.
 Selecting this option displays the following sub-menu: 
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
Untyped pedigree exclusion options:
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed.
\end_layout

\begin_layout LyX-Code
 1) Omit any completely untyped pedigrees
\end_layout

\begin_layout LyX-Code
*2) Include all pedigrees whether typed or not
\end_layout

\begin_layout LyX-Code
 3) Exclude pedigrees not fully typed at one or more markers
\end_layout

\begin_layout LyX-Code
 4) Exclude any pedigree with 1 or less marker-typed people
\end_layout

\begin_layout Subsection
Input menu item: Upper limit for squared deviation between input and observed
 allele frequencies 
\end_layout

\begin_layout Standard
This is a floating-point value that defines when to flag discrepancies between
 observed and input allele-frequencies.
 The smaller this value, the more sensitive it is to such differences.
 Since the squared sum of differences between input and observed frequencies
 is expected to be less than 1.0, any value 1 and above would automatically
 disable flagging.
 By default flagging is turned off.
 
\series bold
Note:
\series default
 This menu item is not displayed unless a frequency file is specified in
 the input menu.
\end_layout

\begin_layout Standard
See also Mega2's error checking procedure for allele-frequencies.
 
\end_layout

\begin_layout Subsection
Input menu item: Unknown allele and affection definition 
\end_layout

\begin_layout Standard
This is read in as a string value and compared against affection phenotypes
 and marker genotypes for an exact match.
 The unknown allele and affection status indicator is used only for Mega2
 files.
\end_layout

\begin_layout Subsection
Input menu item: Maximum number of alleles per marker 
\begin_inset CommandInset label
LatexCommand label
name "sub:Input-menu-item:"

\end_inset


\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
              Mega2 4.7.1 Maximum alleles per marker menu:
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed 
\end_layout

\begin_layout LyX-Code
*1) 2 alleles (2 bits/marker) 
\end_layout

\begin_layout LyX-Code
 2) 255 alleles (2 bytes/marker)  
\end_layout

\begin_layout LyX-Code
 3) 256 or more alleles (16 bytes/marker) 
\end_layout

\begin_layout LyX-Code
Select from options 0-3 > 
\end_layout

\begin_layout Standard
In the first case, each genotype is represented internally with two bits;
 this is the same as the PLINK compressed binary 
\begin_inset Quotes eld
\end_inset

bed
\begin_inset Quotes erd
\end_inset

 representation.
 This technique does not provide enough space to represent microsatellite
 markers or half-typed genotypes (where one allele is unknown).
 For these data sets, the second compression option should be adequate.
 It provides for up to 255 alleles.
 The final compression option is left for historical comparisons - it should
 never be necessary.
\end_layout

\begin_layout Standard
Note that in the 2 byte mode, if the input data are in Linkage format, all
 allele labels are integers used as is.
 This means that an allele with the label '256' would not be allowed.
 However, if the input data are in Mega2 format, then allele labels are
 treated as strings, and will be recoded to sequential integers; so '256'
 might be allowed if the labeling is sparse.
\end_layout

\begin_layout Subsection
Errors in input data 
\end_layout

\begin_layout Subsubsection
Problems with locus data 
\end_layout

\begin_layout Enumerate
Incomplete locus records and invalid entries:
\end_layout

\begin_deeper
\begin_layout Standard
Mega2 checks the locus file for invalid and incomplete locus data, following
 the linkage format specifications.
 If a names file is used, it checks the marker codes, and that there are
 at least two entries on each line.
 
\begin_inset Newline newline
\end_inset

 Incomplete records are considered to be fatal errors, i.e.
 Mega2 will terminate upon encountering such errors.
\end_layout

\end_deeper
\begin_layout Enumerate
Sum of input allele frequencies for each marker
\end_layout

\begin_deeper
\begin_layout Standard
Mega2 checks the total allele-frequency for each marker to check that the
 sum is 1.0 (or a tiny fraction of 1.0).
\end_layout

\end_deeper
\begin_layout Enumerate
Total squared deviation between observed and input allele frequencies
\end_layout

\begin_deeper
\begin_layout Standard
Mega2 scans the observed genotype data and computes observed allele frequencies
 over full-typed as well as half-typed individuals to see if these match
 input frequencies within a certain tolerance.
 The tolerance value is decided by item 10 of the input menu.
 
\begin_inset Newline newline
\end_inset

 This tolerance value can be set to a large value to avoid warnings.
\end_layout

\begin_layout Standard
Both these errors are considered to be non-fatal, i.e., mega2 will stop and
 warn the user, with the option to continue.
\end_layout

\end_deeper
\begin_layout Enumerate
Markers without locus positions
\end_layout

\begin_deeper
\begin_layout Standard
Marker loci in the map file are matched against those in the locus file
 for missing names from either file.
 A warning is issued in this case.
 This is also a non-fatal error.
 Since many options require map positions, recombination fractions, and
 some even require loci to be ordered from the closest to the furthest from
 the p-ter, Mega2 will notify users if marker loci do not have non-zero
 map locations.
\begin_inset Newline newline
\end_inset

 Depending on the analysis, this can cause mega2 to terminate, but such
 errors are usually considered to be non-fatal.
\end_layout

\end_deeper
\begin_layout Subsubsection
Problems with pedigree data.
\end_layout

\begin_layout Standard
Mega2 reports problems such as incomplete pedigree records, invalid sex
 and proband fields, and missing parent records.
 In most cases, Mega2 will read in the entire pedigree file, and attempt
 to identify as many errors as it can.
 Here are a list of errors flagged by Mega2.
 
\end_layout

\begin_layout Enumerate
Father is not male or mother is not female
\end_layout

\begin_deeper
\begin_layout Standard
Linkage format pedigree file format assigns the first parent to be the father,
 and the second parent to be the mother.
 Thus, Mega2 will check for the necessary gender according to this rule.
 This is flagged as a fatal error because in most cases, subsequent analysis
 with the output data may not run.
\end_layout

\end_deeper
\begin_layout Enumerate
One or both parents are missing
\end_layout

\begin_deeper
\begin_layout Standard
Most pedigree analysis programs require that individual records for both
 parents are included within the pedigree data, therefore, so does Mega2.
 Missing parental records are fatal errors.
\end_layout

\end_deeper
\begin_layout Enumerate
Unknown sex
\end_layout

\begin_deeper
\begin_layout Standard
1 and 2 are the only values allowed in the sex field, any other value is
 flagged as a fatal error.
\end_layout

\end_deeper
\begin_layout Enumerate
Corrupt or incomplete records
\end_layout

\begin_deeper
\begin_layout Standard
Depending on the number and type of loci given in the locus data file, Mega2
 expects each line of the pedigree file to have a certain number of entries.
 It does allow extra entries at the end, which are skipped.
 Thus, if The record does not have all the necessary fields, Mega2 will
 generate error messages like: 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset

 
\end_layout

\begin_layout Standard
Pedigree 100: entry record 3 is corrupt or incomplete
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset


\end_layout

\end_deeper
\begin_layout Enumerate
Mendelian inconsistencies
\end_layout

\begin_deeper
\begin_layout Standard
Mega2 performs a set of simple checks to identify inconsistent genotypes
 such as more than 4 unique allele labels within a sibship (3 unique labels
 for a sex-linked marker), and obvious Mendelian inheritance rule violations,
 e.g.
 offspring's alleles do not match the parent's alleles, or a male is a heterozyg
ote at a sex-linked marker.
\begin_inset Newline newline
\end_inset

 These checks do not guarantee that the pedigree data is free of genotype
 inconsistencies, specially if one or more parents are untyped, however,
 these ensure that the output files are acceptable to many of the target
 analysis programs.
 The user is encouraged to use a more rigorous testing program such as Pedcheck
 or Mendel once Mega2 has tested for the simpler errors.
\begin_inset Newline newline
\end_inset

 The user is offered the choice of setting inconsistent genotypes to unknowns.
\end_layout

\end_deeper
\begin_layout Enumerate
Half-typed individuals
\end_layout

\begin_deeper
\begin_layout Standard
Individuals with only one known allele are detected, and the user has the
 choice of setting these individuals' genotypes to unknown.
\end_layout

\begin_layout Standard
Genotypes on mitochondrial markers: Although an individual is expected to
 be homozygous at mitochondrial markers, and also have inherited the mother's
 genotype exclusively, there have been known to be deviations from this
 inheritance pattern.
 Therefore, for the present, Mega2 only reports genotypes which are heterozygous
, or different from the maternal genotype, it does not flag these as Mendelian
 inheritance errors, nor are these reset along with other Mendelian inconsistenc
ies.
\end_layout

\end_deeper
\begin_layout Enumerate
Unconnected pedigrees with the same pedigree ID
\end_layout

\begin_deeper
\begin_layout Standard
Mega2 checks that the entire pedigree is one connected structure, i.e.
 each individual has either a parent or an offspring in that pedigree.
 Unconnected pedigrees are considered non-fatal errors when processing a
 post-makeped format pedigree file, and a fatal error if the file is a pre-makep
ed format file, and the selected output option requires Mega2 to break loops.
\end_layout

\end_deeper
\begin_layout Subsubsection
Genotype reset menu 
\end_layout

\begin_layout Standard
This menu is displayed for Mega2 to look for problems with the pedigree
 data.
 It will display all four options or a subset depending on which problems
 were detected.
 
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
Specify whether to reset poorly typed individuals and families: ================
==========================================
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed
\end_layout

\begin_layout LyX-Code
 1) Set half-typed genotypes to unknown [no ].
\end_layout

\begin_layout LyX-Code
    If "no" is indicated, half-typed genotypes
\end_layout

\begin_layout LyX-Code
    will not be looked for.
\end_layout

\begin_layout LyX-Code
 2) Set all genotypes to unknown within entire pedigrees
\end_layout

\begin_layout LyX-Code
    at each Mendelianly-inconsistent locus? [no ]
\end_layout

\begin_layout LyX-Code
    If "no" is indicated, Mendelianly-inconsistent loci
\end_layout

\begin_layout LyX-Code
    will not be looked for.
\end_layout

\begin_layout LyX-Code
 3) Set out-of-bound genotypes to unknown? [no ]
\end_layout

\begin_layout LyX-Code
    If "no" is indicated, out-of-bound genotypes
\end_layout

\begin_layout LyX-Code
    will not be looked for.
 
\end_layout

\begin_layout LyX-Code
 4) EXIT Mega2.
  
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
Item 3) only appears for linkage format inputs.
 In addition item 1) is not possible for PLINK binary inputs that do not
 allow half-typed genotypes to be represented.
 If you have already run your data through a program that checks for these
 consistency issues and not there are none, it will be faster to not request
 that Mega2 also look for these issues.
\end_layout

\begin_layout Section
The analysis menu
\begin_inset CommandInset label
LatexCommand label
name "sec:The-analysis-menu"

\end_inset


\end_layout

\begin_layout Standard
After all the input files and the chromosome number have been specified,
 then one proceeds to the Analysis menu, which presents a variety of different
 conversion options: 
\begin_inset Newline newline
\end_inset

 
\end_layout

\begin_layout LyX-Code
===========================================================
\end_layout

\begin_layout LyX-Code
                 ANALYSIS MENU  
\end_layout

\begin_layout LyX-Code
========================================================== 
\end_layout

\begin_layout LyX-Code
 1 SimWalk2 format                 21 MLBQTL format
\end_layout

\begin_layout LyX-Code
 2 Vintage Mendel format           22 SAGE format
\end_layout

\begin_layout LyX-Code
 3 ASPEX format                    23 Pre-makeped format
\end_layout

\begin_layout LyX-Code
 4 GeneHunter-Plus format          24 Merlin/SimWalk2-NPL format
\end_layout

\begin_layout LyX-Code
 5 GeneHunter format               25 PREST format
\end_layout

\begin_layout LyX-Code
 6 APM format [DISABLED]           26 PAP format
\end_layout

\begin_layout LyX-Code
 7 APM-MULT format [DISABLED]      27 Merlin format
\end_layout

\begin_layout LyX-Code
 8 Create nuclear families         28 Loki format
\end_layout

\begin_layout LyX-Code
 9 SLINK format                    29 Mendel format
\end_layout

\begin_layout LyX-Code
10 SPLINK format                   30 SUP format
\end_layout

\begin_layout LyX-Code
11 Homogeneity analyses            31 PLINK format
\end_layout

\begin_layout LyX-Code
12 SIMULATE format                 32 CRANEFOOT format
\end_layout

\begin_layout LyX-Code
13 Create summary files            33 Mega2  format
\end_layout

\begin_layout LyX-Code
14 Old SAGE format                 34 IQLS/Idcoefs format
\end_layout

\begin_layout LyX-Code
15 TDTMax analyses [DISABLED]      35 FBAT format
\end_layout

\begin_layout LyX-Code
16 SOLAR format                    36 PANGAEA MORGAN format
\end_layout

\begin_layout LyX-Code
17 Vitesse format                  37 Beagle format
\end_layout

\begin_layout LyX-Code
18 Linkage format                  38 Eigenstrat format
\end_layout

\begin_layout LyX-Code
19 Test loci for HWE               39 Structure format
\end_layout

\begin_layout LyX-Code
20 Allegro format                  40 PSEQ format
\end_layout

\begin_layout LyX-Code
                                 
\end_layout

\begin_layout LyX-Code
Select an option between 1-40 > 
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard

\series bold
Overview:
\series default

\begin_inset Newline newline
\end_inset

 Note that we can not provide in depth documentation for each of the programs
 for which Mega2 can create files; in fact, we assume that the user will
 read the documentation of the appropriate program.
 Also, since many of these external programs are written by others, it is
 possible (and perhaps likely) that Mega2 will be out of sync with a newly
 updated version of one of these programs.
 If you notice this, please notify us as soon as possible.
 
\end_layout

\begin_layout Standard
In brief, the various options in the Analysis menu are listed below.
 Note that in most cases, in addition to generating appropriately re-formatted
 files, Mega2 also generates a C-shell script that will automatically run
 the desired program.
 However, these C-shell scripts will only function correctly if the needed
 programs (with the appropriate names) are in your path and installed properly
 on your workstation.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Create SimWalk2 format files
\end_layout

\begin_layout Standard
This Analysis Menu option creates the files needed for haplotyping, parametric
 analysis, non-parametric analysis, or IBD estimation via the SIMWALK2 program.
 
\begin_inset Newline newline
\end_inset

 Name: SIMWALK2 2.82
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/register
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Primary reference(s): (Sobel and Lange 1996)
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to Vintage Mendel format
\end_layout

\begin_layout Standard
This Analysis Menu option creates output files in the old Vintage Mendel
 format.
\begin_inset Newline newline
\end_inset

 NOTE: This option will also place the chromosome and map position information
 into the locus data file, as required by the RELPAIR program by Michael
 Boehnke and William L.
 Duren (Boehnke and Cox 1997).
 
\begin_inset Newline newline
\end_inset

 Name: Vintage Mendel
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.genetics.ucla.edu/software/
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Primary reference(s): (Lange et al.
 1988)
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to ASPEX format
\end_layout

\begin_layout Standard
This Analysis Menu option creates files in the appropriate format for analysis
 via the many modules (sib_ibd, sib_tdt, sib_phase, sib_map) of the ASPEX
 program.
 There is an option to convert larger pedigrees to their component nuclear
 families if needed.
\begin_inset Newline newline
\end_inset

 Name: ASPEX
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://aspex.sourceforge.net/
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Primary reference(s): (Hinds and Risch 1996)
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to GeneHunter-Plus format
\end_layout

\begin_layout Standard
This Analysis Menu option creates the files needed for analysis via the
 GeneHunter-Plus program.
\begin_inset Newline newline
\end_inset

 Name: GeneHunter-Plus
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://galton.uchicago.edu/genehunterplus/
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Primary reference(s): (Kong and Cox 1997)
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to GeneHunter format
\end_layout

\begin_layout Standard
This Analysis Menu option creates the files needed for analysis via the
 GeneHunter program.
\begin_inset Newline newline
\end_inset

 Name: GeneHunter
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.broadinstitute.org/ftp/distribution/software/genehunter/
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Primary reference(s): (Kruglyak et al.
 1996)
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to APM format [DISABLED]
\end_layout

\begin_layout Standard
This Analysis Menu option creates the files needed for analysis via the
 Affected Pedigree Member method (single marker analyses).
\begin_inset Newline newline
\end_inset

 Name: APM and APM Mult
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/register
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Primary reference(s): (Weeks and Lange 1988)
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to APM MULT multiple locus format [DISABLED]
\end_layout

\begin_layout Standard
This Analysis Menu option creates the files needed for analysis via the
 multilocus version of the Affected Pedigree member method.
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Create nuclear families
\end_layout

\begin_layout Standard
This Analysis Menu option breaks down larger pedigrees into their component
 nuclear families (parents plus children), and output the resulting locus
 and pedigree files in LINKAGE format.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to SLINK format
\end_layout

\begin_layout Standard
This Analysis Menu option creates the files needed for input into the simulation
 program SLINK.
\begin_inset Newline newline
\end_inset

 Name: SLINK, FASTSLINK (Use FASTSLINK instead of SLINK)
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/register
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Primary reference(s): (Ott 1989; Weeks et al.
 1990)
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to SPLINK format
\end_layout

\begin_layout Standard
This Analysis Menu option creates the files needed for linkage analyses
 using affected sib-pairs as implemented in the SPLINK program by David
 Clayton.
\begin_inset Newline newline
\end_inset

 Name: SPLINK
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www-gene.cimr.cam.ac.uk/clayton/software/
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Primary reference(s): (Holmans 1993)
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Set up for homogeneity analyses
\end_layout

\begin_layout Standard
This Analysis Menu option creates the files needed to compute lod scores
 under heterogeneity, using component programs from the ANALYZE package.
\begin_inset Newline newline
\end_inset

 Name: ANALYZE package
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.helsinki.fi/~tsjuntun/linkage/analyze/
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Primary reference(s): (Terwilliger 1996)
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to SIMULATE format
\end_layout

\begin_layout Standard
This Analysis Menu option creates the files needed for input into the simulation
 program SIMULATE.
\begin_inset Newline newline
\end_inset

 Name: SIMULATE
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

ftp://linkage.rockefeller.edu/
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Primary reference(s): (Terwilliger et al.
 1993)
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Create summary files
\end_layout

\begin_layout Standard
This Analysis Menu option creates summary files providing information about
 the segregation of the trait, counts of affected relative pairs and affected
 sibling pairs, marker allele frequencies (including observed and expected
 heterozygosity), genotyping success rate, and phenotype counts summaries.
 There is also an option to create counts of alleles and genotypes within
 categories (affection status categories or liability class categories).
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 The different summary options can be selected using the Summary file option
 sub-menu: 
\end_layout

\begin_layout LyX-Code
Selection Menu: Summary file options
\end_layout

\begin_layout LyX-Code
1) Create segregation and relative count summary files.
\end_layout

\begin_layout LyX-Code
2) Create allele frequency summary table.
\end_layout

\begin_layout LyX-Code
3) Count alleles and genotypes within groups.
\end_layout

\begin_layout LyX-Code
4) Create genotyping success rate summary.
\end_layout

\begin_layout LyX-Code
5) Create quantitative phenotype summary.
\end_layout

\begin_layout LyX-Code
Enter selection: 1 - 5 >
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Subsection
Convert to Old SAGE format
\end_layout

\begin_layout Standard
This Analysis Menu option creates the files needed for analysis via the
 SAGE package.
 This supports the old FORTRAN-like SAGE format (rather than the new more
 elegant format now available in beta-version).
 
\begin_inset Newline newline
\end_inset

 Name: SAGE
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://darwin.cwru.edu/sage/index.php
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Primary reference(s):
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Set up for TDTMax analyses[DISABLED]
\end_layout

\begin_layout Standard
This Analysis Menu option creates the files needed for analysis via the
 TDTMax program.
\begin_inset Newline newline
\end_inset

 Name: TDTMax
\begin_inset Newline newline
\end_inset

 Web: Current location unknown 
\begin_inset Newline newline
\end_inset

 used to be 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.rdg.ac.uk/AcaDepts/sn/wsn1/dept/APM.html
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Primary reference(s): (Morris et al.
 1997)
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to SOLAR format
\end_layout

\begin_layout Standard
This Analysis Menu option creates the files needed for analysis via the
 SOLAR package.
\begin_inset Newline newline
\end_inset

 Name: SOLAR
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://txbiomed.org/departments/genetics_detail.aspx?p=37
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Primary reference(s): (Blangero and Almasy 1997; Almasy and Blangero 1998)
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to Vitesse format
\end_layout

\begin_layout Standard
This Analysis Menu option creates files in LINKAGE format for analysis with
 Vitesse.
 Note it also sets up shell-scripts that automate MLINK-like and LINKMAP-like
 analyses.
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Name: Vitesse
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/register
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Primary reference(s): (O'Connell and Weeks 1995)
\begin_inset Newline newline
\end_inset


\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to Linkage format
\end_layout

\begin_layout Standard
This Analysis Menu option creates files in LINKAGE format.
 This is useful for reordering loci or selecting subsets of loci from large
 files.
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Name: LINKAGE
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

ftp://linkage.rockefeller.edu/
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Primary reference(s): (Lathrop and Lalouel 1984; Lathrop et al.
 1986; Lathrop and Lalouel 1988)
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Test loci for Hardy-Weinberg Equilibrium
\end_layout

\begin_layout Standard
This Analysis Menu option permits one to test markers for Hardy-Weinberg
 equilibrium using either the 
\begin_inset Quotes eld
\end_inset

hwe
\begin_inset Quotes erd
\end_inset

 program by Guo and Thompson (1992) or the 
\begin_inset Quotes eld
\end_inset

Gen
\begin_inset Quotes erd
\end_inset

 program by Lazzeroni and Lange (1997).
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Name: hwe
\begin_inset Newline newline
\end_inset

 Web:
\begin_inset Newline newline
\end_inset

 Authors: Guo and Thompson
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Name: Gen
\begin_inset Newline newline
\end_inset

 Web:
\begin_inset Newline newline
\end_inset

 Authors: Lazzeroni and Lange
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Name: Exact test for bialleleic markers from the R genetics library
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://cran.r-project.org/web/packages/genetics/index.html
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Authors: Gregory Warnes and Friedrich Leisch 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Name: Chi-sq test for bi- and multi-allelic markers from the R genetics
 library
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://cran.r-project.org/web/packages/genetics/index.html
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Authors: Gregory Warnes and Friedrich Leisch 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Name: Hardy-Weinberg equilibrium test from Mendel 
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.genetics.ucla.edu/software/
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Authors: Lange et al.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to Allegro format
\end_layout

\begin_layout Standard
This Analysis Menu option creates the files needed for analysis via the
 Allegro program.
 Further information is available at the URL below.
 
\begin_inset Newline newline
\end_inset

 Name: Allegro
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.decode.com/software/
\end_layout

\end_inset

 
\begin_inset Newline newline
\end_inset

 Primary reference(s): Allegro, a new computer program for multipoint linkage
 analysis; (May 2000, Gudbjartsson DF, Jonasson K, Frigge ML, Kong A) 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to MLBQTL format
\end_layout

\begin_layout Standard
This Analysis Menu option creates the files needed for the analysis of quantitat
ive traits as well as affection status loci via the Maximum-Likelihood-Binomial
 extension of the GENEHUNTER program.
 Please make sure that quantitative data are normalized, as required by
 the MLBQTL program.
 
\begin_inset Newline newline
\end_inset

 Name: MLBQTL
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.hgid.net/hgid/site/site.php?rubr=9
\end_layout

\end_inset

 
\begin_inset Newline newline
\end_inset

 Primary reference(s): (Alcais A, Abel L.
 1999)
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to SAGE format
\end_layout

\begin_layout Standard
This Analysis Menu option creates the files needed for using SAGE 4.0 and
 up version.
 Currently, the user has to manually add sections required for running various
 SAGE programs to the bottom of the parameter file.
 The pedinfo program can be run as is.
 
\begin_inset Newline newline
\end_inset

 Name: S.A.G.E.
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://darwin.cwru.edu/
\end_layout

\end_inset

 
\begin_inset Newline newline
\end_inset

 Primary reference(s): 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to pre-makeped format
\end_layout

\begin_layout Standard
This Analysis Menu option will output pedigree and locus files where the
 pedigrees are in pre-makeped format.
 If the input pedigree file was in a post-makeped format, this option will
 also connect together loops in the output.
 
\end_layout

\begin_layout Subsection
Setup for Merlin-SimWalk2 combined analysis
\end_layout

\begin_layout Standard
This Analysis Menu option sets up one set of output data files which can
 be run through Merlin's NPL analysis option, and a second set which can
 be run through SimWalk's NPL option.
 It also sets up the requisite scripts that run these two programs in tandem,
 feeding in NPL results from Merlin to SimWalk2.
 To use this option, the latest versions of Merlin (0.10.2 or higher) and
 Simwalk2 (2.89 or higher) are required.
 
\begin_inset Newline newline
\end_inset

 Name: Merlin and SimWalk2
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.sph.umich.edu/csg/abecasis/Merlin
\end_layout

\end_inset

 and 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/register
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to PREST format
\end_layout

\begin_layout Standard
This Analysis Menu option sets up pedigree, chromosome, control and script
 files for analyzing with PREST (Pedigree RElationship Statistical Test)
 version 3.0.
 
\begin_inset Newline newline
\end_inset

 Name: PREST
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://galton.uchicago.edu/~mcpeek/software/prest/
\end_layout

\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to PAP format
\end_layout

\begin_layout Standard
This Analysis Menu option sets up the files necessary for running PAP (Pedigree
 Analysis Package) including the triplets file (trip.dat), the phenotypes
 file (phen.dat), the control file (header.dat), and the locus file (popln.dat).
 
\begin_inset Newline newline
\end_inset

 Name: PAP
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://hasstedt.genetics.utah.edu/
\end_layout

\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to Merlin format
\end_layout

\begin_layout Standard
This Analysis Menu option sets up the files necessary for running Merlin
 including the pedigree, locus and map files.
 
\begin_inset Newline newline
\end_inset

 Name: Merlin
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.sph.umich.edu/csg/abecasis/Merlin
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Please note that Merlin requires a sex-averaged map as well when the user
 sets up for sex-specific analysis (Value_Genetic_Distance_SexTypeMap =
 1
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Value_Genetic_Distance_SexTypeMa"

\end_inset

).
\end_layout

\begin_layout Subsection
Convert to LOKI format
\end_layout

\begin_layout Standard
This Analysis Menu option sets up the files necessary for running LOKI including
 the pedigree file, control files, and link files.
 
\begin_inset Newline newline
\end_inset

 Name: Loki 
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.stat.washington.edu/thompson/Genepi/Loki.shtml
\end_layout

\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to Mendel format
\end_layout

\begin_layout Standard
This Analysis Menu option sets up the files necessary for running Mendel
 (version 7 and later) including per-chromosome pedigree file, locus, map,
 penetrance, variable and control files.
 
\begin_inset Newline newline
\end_inset

 Name: Mendel 
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.genetics.ucla.edu/software/
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

 Primary reference(s): (Lange et al.
 1988) 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to SUP format
\end_layout

\begin_layout Standard
This Analysis Menu option sets up files for simulation of marker data with
 the SUP simulation program.
 It sets up a SLINK format pedigree and locus file which act as templates
 to simulate inheritance patterns, and a SUP formatted locus file which
 contain the actual marker loci to be simulated.
 An C-shell script is created to run the analysis.
 
\begin_inset Newline newline
\end_inset

 If the pedigree data contains either loops (premakeped format) or loop-breakers
 (post-makeped format), then the SLINK pedigree file will have its loops
 broken.
 However, SUP requires loops to be reconnected so that the simulated genotypes
 reflect the fact that some individuals are in fact copies of other individuals.
 Therefore a set of Mega2 formatted files are created to reconnect loops
 inside the pedigree output file 
\begin_inset Quotes eld
\end_inset

pedfile.dat
\begin_inset Quotes erd
\end_inset

 that is created by SLINK, and output a new pedigree file for SUP.
 The analysis script contains commands to invoke Mega2 to reconnect loops.
 
\end_layout

\begin_layout Standard

\series bold
Caution:
\series default
 Files created for SUP should not have loops reconnected, but the loops
 do need to be reconnected after running SLINK and before running SUP.
\end_layout

\begin_layout Standard
If the loops are broken, then 'slink' is happy, but SUP itself does not
 do the correct thing, because the 'sup.*.sh' script now needs another step,
 which is to use Mega2 to reconnect the loops 
\shape italic
after
\shape default
 running SLINK and 
\shape italic
before
\shape default
 running SUP, as the SUP documentation states:
\end_layout

\begin_layout Standard
"LOOPS:
\end_layout

\begin_layout Standard
If there are inbreeding loops in your pedigrees, you have to select loop-breaker
s prior to creating the simped.dat file that SLINK needs (by use of makeped
 if you have a list of loop breakers, or maybe by use of Mega2, which can
 select them for you).
 In SLINK's output traitfile.dat, the loops are still broken, and prior to
 using SUP, you need to reconnect them.
 Following the suggestion of a reviewer, by far the easiest way is to use
 Mega2.
 The file traitfile.dat can be used as one of Mega2's required input file,
 and by choosing to create, say, a "Pre-makeped" format file in the analysis
 menu, Mega2 takes care of reconnecting the pedigrees.
 You can then use the output created by Mega2 along with the -pre <pedfile>
 flag."
\end_layout

\begin_layout Standard
Name: SUP
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://mlemire.freeshell.org/software.html
\end_layout

\end_inset

 
\begin_inset Newline newline
\end_inset

 Primary reference(s): Lemire M (2006) SUP: An extension to SLINK to allow
 a larger number of marker loci to be simulated in pedigrees conditional
 on trait values.
 BMC Genet.
 7:40 
\begin_inset Newline newline
\end_inset

 SLINK and FASTSLINK references 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to PLINK format 
\begin_inset CommandInset label
LatexCommand label
name "sub:Analysis-PLINK-option"

\end_inset


\end_layout

\begin_layout Standard
This Analysis Menu options sets up pedigree, genotype, phenotype and map
 files in PLINK format.
 If output consists of a single trait, then this would be included inside
 the pedigree file, and phenotype file is created.
 For multiple traits, the pedigree file contains a dummy trait column, and
 phenotypes are written out into a separate file.
 When the 'lgen' PLINK output file option is chosen, the genotype file is
 in 
\series bold
long format
\series default
 (lgen) with a single genotype in every line.
 There are two binary output file options, which produce files that are
 much more compact than the lgen format.
 PLINK requires a physical map, and only our Mega2 format allows physical
 maps, therefore this option can only be used with Mega2 format files.
 
\begin_inset Newline newline
\end_inset

Name: PLINK
\begin_inset Newline newline
\end_inset

Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://pngu.mgh.harvard.edu/~purcell/plink/
\end_layout

\end_inset

 
\begin_inset Newline newline
\end_inset

Primary reference: Purcell S, Neale B, Todd-Brown K, Thomas L, Ferreira
 MAR, Bender D, Maller J, Sklar P, de Bakker PIW, Daly MJ & Sham PC (2007)
 PLINK: a toolset for whole-genome association and population-based linkage
 analysis.
 American Journal of Human Genetics, 81.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Convert to CRANEFOOT format 
\end_layout

\begin_layout Standard
This Analysis Menu option sets up pedigree and control files for each chromosome
 in Cranefoot format for drawing pedigree diagrams using the Cranefoot program.
 The user can select affection status or quantitative traits as well as
 markers in order to display phenotypes and genotypes along with each individual.
 Each individual can also be shaded according to her affected status based
 on their primary affection trait (as selected by the user via a menu).
 In addition, you can choose to shade the individuals according to their
 genotyped status (black = genotyped, unshaded = not genotyped).
 A shell script is also created to run Cranefoot on all output files, or
 you can choose to have separate shell scripts created for each chromosome.
 
\begin_inset Newline newline
\end_inset

 Name: Cranefoot
\begin_inset Newline newline
\end_inset

 Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.finndiane.fi/software/cranefoot/
\end_layout

\end_inset

 
\begin_inset Newline newline
\end_inset

 Primary reference: Mäkinen et al.
 (2005) High-throughput pedigree drawing.
 Eur J Hum Gen 13:987-989.
 
\end_layout

\begin_layout Subsection
Convert to Mega2 format
\end_layout

\begin_layout Standard
This Analysis Menu option creates pedigree, names, map, frequency, and penetranc
e files in Mega2 format.
 If the input pedigree file is pre-makeped, then so is the output file,
 and vice-versa.
 This can be used instead of l2a.py, provided that your pedigree and person
 identifiers are all integers, since Mega2 makes this assumption when reading
 in Linkage format files.
 It possesses a few advantages over the Python converter, namely, you can
 make use of Mega2's allele-frequency and recoding functionalities in order
 to produce frequency and penetrance files, there is no omit file, since
 the output was already produced using one, and the corresponding genotypes
 reset.
 Additionally, You can use Mega2's chromosome, locus and trait selection
 functions to slice and dice the data, to create chromosome and trait-specific
 output files instead of creating a single set of files.
 
\end_layout

\begin_layout Subsection
Convert to IQLS/Idcoefs format
\begin_inset CommandInset label
LatexCommand label
name "sub:IQLS-Idcoefs"

\end_inset


\end_layout

\begin_layout Standard
This Analysis Menu option creates pedigree, marker, and parameter files
 for the IQLS program, as well as pedigree and study files for the Idcoefs
 program.
 In addition, it creates an executable shell file that will first run the
 Idcoefs program, and then run the IQLS program.
 Note that IQLS only supports two-allele markers and needs to know the physical
 positions of the markers.
 Thus, this option should only be run on input data in Mega2 format that
 contains two-allele markers, at least one affection status trait, and where
 a physical map has been specified.
 The output IQLS marker file has to contain only character allele names,
 so if your input marker has numbered alleles 1 and 2, these will be remapped
 to character alleles A and G respectively.
\end_layout

\begin_layout Standard
If a marker was originally input with text allele labels in the input Mega2
 pedigree file, then those original allele labels are used on output into
 the IQLS marker file, and the strand orientation is set to '+'.
\end_layout

\begin_layout Standard
If a marker was originally input with numeric allele labels, then it is
 output using the dummy alleles 'A' and 'G', and the strand orientation
 is set to '-'.
\end_layout

\begin_layout Standard
As far as I can tell, it appears that the orientation information is not
 used by the IQLS program.
 
\end_layout

\begin_layout Standard
IQLS requires that for each run, all the markers should be on a single chromosom
e.
 So to analyze more than one chromosome, a separate run must be performed
 for each chromosome.
 Accordingly, when multiple chromosomes are selected, Mega2 will set up
 chromosome-specific sets of files.
\end_layout

\begin_layout Standard
Name: IQLS Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://galton.uchicago.edu/~mcpeek/software/IQLS/index.html
\end_layout

\end_inset

 
\begin_inset Newline newline
\end_inset

 Primary references: Wang, Z., and McPeek, M.S.
 (2009).
 An incomplete-data quasi-likelihood approach to haplotype-based genetic
 association studies on related individuals.
 J.
 Am.
 Stat.
 Assoc.
 104, 1251-1260; Wang, Z., and McPeek, M.S.
 (2009).
 ATRIUM: Testing untyped SNPs in case-control association studies with related
 individuals.
 Am.
 J.
 Hum.
 Genet.
 85, 667-678.
\begin_inset Newline newline
\end_inset

 Name: Idcoefs Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://home.uchicago.edu/~abney/abney_web/Software.html
\end_layout

\end_inset

 
\begin_inset Newline newline
\end_inset

 Primary reference: Abney M, McPeek MS, Ober C (2000) Estimation of variance
 components of quantitative traits in inbred populations.
 Am J Hum Genet 66:629–650.
\end_layout

\begin_layout Subsection
Convert to FBAT format 
\begin_inset CommandInset label
LatexCommand label
name "sub:Analysis-FBAT-option"

\end_inset


\end_layout

\begin_layout Standard
This Analysis Menu option creates files for analysis with FBAT.
 By default, Mega2 chooses to use FBAT with an explicit 
\begin_inset Quotes eld
\end_inset

map
\begin_inset Quotes erd
\end_inset

 file.
 The additional marker position information in the 
\begin_inset Quotes eld
\end_inset

map
\begin_inset Quotes erd
\end_inset

 file is needed for the plots that will be produced.
 Note: Mega2 also sets up shell-scripts that automate running various analyses
 available under the FBAT program.
 Several scripts may be produced: one to perform the analysis commands (See
 the FBAT manual for more details.) and others to load into FBAT the files
 required for a particular (or several) chromosome(s), traits and phenotypes.
 The user is expected to revise the primary script with the analysis commands
 for his/her particular needs, but should not need to change any of the
 other scripts.
 There is also a script that will run all the other scripts.
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

Name: FBAT
\begin_inset Newline newline
\end_inset

Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.biostat.harvard.edu/fbat/default.html
\end_layout

\end_inset


\begin_inset Newline newline
\end_inset

Primary reference(s): Laird, N., Horvath, S.
 and Xu, X.
 (2000) "Implementing a unified approach to family based tests of association."
 Genet Epidemiol 19(Suppl 1): S36-S42
\begin_inset Newline newline
\end_inset

Documentation reference(s): Nan M.
 Laird (laird@hsph.harvard.edu), Family-Based Association Tests and the FBAT-toolk
it, Horvbath_FBAT_Manual_2009.pdf
\end_layout

\begin_layout Subsection
Convert to Morgan format 
\begin_inset CommandInset label
LatexCommand label
name "sub:Analysis-Morgan-option"

\end_inset


\end_layout

\begin_layout Standard
\begin_inset Quotes eld
\end_inset

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.
\begin_inset Quotes erd
\end_inset

 (Taken from the tutorial introduction.) More details are provided in section
 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Detailed-info-Pangaea-Morgan"

\end_inset

,
\end_layout

\begin_layout Standard
The suboption to the Morgan analysis request specifies which analysis of
 those listed below is desired.
 Mega2 produces the 
\begin_inset Quotes eld
\end_inset

ped
\begin_inset Quotes erd
\end_inset

, 
\begin_inset Quotes eld
\end_inset

marker
\begin_inset Quotes erd
\end_inset

 and a template 
\begin_inset Quotes eld
\end_inset

par
\begin_inset Quotes erd
\end_inset

 file to perform the selected analysis.
 The user is expected to improve/change the 
\begin_inset Quotes eld
\end_inset

par
\begin_inset Quotes erd
\end_inset

 file to his/her specific needs.
 Shell scripts are created to run the analysis on the 
\begin_inset Quotes eld
\end_inset

par
\begin_inset Quotes erd
\end_inset

 file for all the traits and chromosomes selected.
\end_layout

\begin_layout Standard
Name: Morgan: pedcheck, kin, translink, lm_linkage, lm_bayes, lm_ibdtests,
 ...
\end_layout

\begin_layout Standard
Web: 
\begin_inset Flex URL
status open

\begin_layout Plain Layout

http://www.stat.washington.edu/thompson/Genepi/MORGAN/Morgan.shtml
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Primary references: 
\end_layout

\begin_layout Standard
E.
 A.
 Thompson (1995) Monte Carlo in Genetic Analysis.
 Technical report No.
 294, Department of Statistics, University of Washington.
 
\end_layout

\begin_layout Standard
E.
 A.
 Thompson (2000) Statistical Inferences from Genetic Data on Pedigrees NSF-CBMS
 Regional Conference Series in Probability and Statistics.
 Volume 6.
 IMS, Beachwood, OH.
 
\end_layout

\begin_layout Standard
Thompson, E.
 A.
 (2005) MCMC in the Analysis of Genetic Data on Pedigrees.
 In Markov Chain Monte Carlo: Innovations and Applications.
 Pp.
 183--216.
 F.
 Liang, J-S Wang, and W.
 Kendall (eds).
 Lecture Note Series of the IMS, National University of Singapore.
 World Scientific Co Pte Ltd, Singapore.
\end_layout

\begin_layout Standard
Documentation: 
\end_layout

\begin_layout Standard
HTML: 
\begin_inset Flex URL
status open

\begin_layout Plain Layout

http://www.stat.washington.edu/thompson/Genepi/MORGAN/morgan311-tut-html/morgan-tut.
html
\end_layout

\end_inset


\end_layout

\begin_layout Standard
PDF: 
\begin_inset Flex URL
status open

\begin_layout Plain Layout

http://faculty.washington.edu/eathomp/Anonftp/PANGAEA/MORGAN/morgan-tut/morgan311-
tut.pdf
\end_layout

\end_inset


\end_layout

\begin_layout Subsection
Convert to Beagle format 
\begin_inset CommandInset label
LatexCommand label
name "sub:Analysis-BEAGLE-option"

\end_inset


\end_layout

\begin_layout Standard
This option creates files for analysis with Beagle.
 For further information please see the section concerning detailed information
 on Beagle Analysis 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Detailed-info-Beagle"

\end_inset

.
\end_layout

\begin_layout Standard

\series bold
Important:
\series default
 Note that to get correct results when converting to Beagle, your input
 data must contain the appropriate data.
 If you wish to set up data in the 
\begin_inset Quotes eld
\end_inset

unphased unrelated
\begin_inset Quotes erd
\end_inset

 Beagle format, then your input data must consist of unrelated case/control
 individuals.
 If you wish to set up data in the 
\begin_inset Quotes eld
\end_inset

unphased trio
\begin_inset Quotes erd
\end_inset

 Beagle format, then your input data must consist of parent-child trio families
 with unaffected parents and affected children.
 
\end_layout

\begin_layout Standard
Name: Beagle
\end_layout

\begin_layout Standard
Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://faculty.washington.edu/browning/beagle/beagle.html
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Primary references:
\end_layout

\begin_layout Standard
If you use BEAGLE in a published analysis, please report the BEAGLE version
 used and cite the appropriate publication or publications listed below.
 Please check 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://faculty.washington.edu/browning/beagle/beagle.html
\end_layout

\end_inset

 for the most up-to-date citations.
\end_layout

\begin_layout Standard
BEAGLE's fastIBD method is described in
\end_layout

\begin_layout Standard
B L Browning and S R Browning (2011) A fast, powerful method for detecting
 identity by descent.
 The American Journal of Human Genetics 88:173-182.
 
\end_layout

\begin_layout Standard
BEAGLE's methods for detecting homozygosity-by-descent and identity-by-descent
 are described in
\end_layout

\begin_layout Standard
S R Browning and B L Browning (2010) High-resolution detection of identity
 by descent in unrelated individuals.
 The American Journal of Human Genetics 86:526-539.
 
\end_layout

\begin_layout Standard
BEAGLE's methods for calling genotypes from genotype likelihood data are
 described in
\end_layout

\begin_layout Standard
B L Browning and Z Yu (2009) Simultaneous genotype calling and haplotype
 phase inference improves genotype accuracy and reduces false positive associati
ons for genome-wide association studies.
 The American Journal of Human Genetics 85:847-861.
 
\end_layout

\begin_layout Standard
BEAGLE's methods for imputing ungenotyped markers and phasing parent-offspring
 trios are described in
\end_layout

\begin_layout Standard
B L Browning and S R Browning (2009) A unified approach to genotype imputation
 and haplotype phase inference for large data sets of trios and unrelated
 individuals.
 Am J Hum Genet 84:210-223.
 
\end_layout

\begin_layout Standard
BEAGLE's methods for inferring haplotype phase or sporadic missing data
 in unrelated individuals are described in
\end_layout

\begin_layout Standard
S R Browning and B L Browning (2007) Rapid and accurate haplotype phasing
 and missing data inference for whole genome association studies using localized
 haplotype clustering.
 Am J Hum Genet 81:1084-1097.
 
\end_layout

\begin_layout Standard
BEAGLE's methods for association testing are described in
\end_layout

\begin_layout Standard
B L Browning and S R Browning (2007) Efficient multilocus association mapping
 for whole genome association studies using localized haplotype clustering.
 Genet Epidemiol 31:365-375.
 
\end_layout

\begin_layout Standard
BEAGLE's haplotype frequency model was first described in:
\end_layout

\begin_layout Standard
S R Browning (2006) Multilocus association mapping using variable-length
 Markov chains.
 Am J Hum Genet 78:903-13.
 
\end_layout

\begin_layout Standard
Documentation: See 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://faculty.washington.edu/browning/beagle/beagle.html#download
\end_layout

\end_inset


\end_layout

\begin_layout Subsection
Convert to Eigenstrat format 
\begin_inset CommandInset label
LatexCommand label
name "sub:Analysis-Eigenstrat-option"

\end_inset


\end_layout

\begin_layout Standard
This Analysis Menu option creates files for analysis with Eigenstrat.
 For further information please see the section concerning detailed information
 on Eigenstrat Analysis 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Detailed-info-Eigenstrat"

\end_inset

.
\end_layout

\begin_layout Standard
Name: Eigenstrat, part of the Eigensoft package
\end_layout

\begin_layout Standard
Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.hsph.harvard.edu/alkes-price/software/
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Primary references:
\end_layout

\begin_layout Standard
Price AL, Patterson NJ, Plenge RM, Weinblatt ME, Shadick NA, Reich D.
 Principal components analysis corrects for stratification in genome-wide
 association studies.
 Nat Genet.
 2006 Aug;38(8):904-9.
 Epub 2006 Jul 23.
 PubMed PMID: 16862161.
\end_layout

\begin_layout Standard
Patterson N, Price AL, Reich D (2006) Population Structure and Eigenanalysis.
 PLoS Genet 2(12): e190.
 doi:10.1371/journal.pgen.0020190
\end_layout

\begin_layout Standard
Documentation: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.hsph.harvard.edu/alkes-price/software/
\end_layout

\end_inset


\end_layout

\begin_layout Subsection
Convert to Structure format 
\begin_inset CommandInset label
LatexCommand label
name "sub:Analysis-Structure-option"

\end_inset


\end_layout

\begin_layout Standard
This Analysis Menu option creates files for analysis with Structure.
 For further information please see the section concerning detailed information
 on Structure Analysis 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Detailed-info-Structure"

\end_inset

.
\end_layout

\begin_layout Standard
Name: Structure
\end_layout

\begin_layout Standard
Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://pritch.bsd.uchicago.edu/structure.html
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Primary references:
\end_layout

\begin_layout Standard
Pritchard JK, Stephens M, Donnelly P.
 Inference of population structure using multilocus genotype data.
 Genetics.
 2000 Jun;155(2):945-59.
 PubMed PMID: 10835412; PubMed Central PMCID: PMC1461096.
\end_layout

\begin_layout Standard
Falush D, Stephens M, Pritchard JK.
 Inference of population structure using multilocus genotype data: linked
 loci and correlated allele frequencies.
 Genetics.
 2003 Aug;164(4):1567-87.
 PubMed PMID: 12930761; PubMed Central PMCID: PMC1462648.
\end_layout

\begin_layout Standard
Falush D, Stephens M, Pritchard JK.
 Inference of population structure using multilocus genotype data: dominant
 markers and null alleles.
 Mol Ecol Notes.
 2007 Jul 1;7(4):574-578.
 PubMed PMID: 18784791; PubMed Central PMCID: PMC1974779.
\end_layout

\begin_layout Standard
Hubisz MJ, Falush D, Stephens M, Pritchard JK.
 Inferring weak population structure with the assistance of sample group
 information.
 Mol Ecol Resour.
 2009 Sep;9(5):1322-32.
 doi: 10.1111/j.1755-0998.2009.02591.x.
 Epub 2009 Apr 1.
 PubMed PMID: 21564903; PubMed Central PMCID: PMC3518025.
\end_layout

\begin_layout Standard
Documentation: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://pritch.bsd.uchicago.edu/structure.html
\end_layout

\end_inset


\end_layout

\begin_layout Subsection
Convert to PSEQ (PLINK/SEQ) format 
\begin_inset CommandInset label
LatexCommand label
name "sub:Analysis-PSEQ-option"

\end_inset


\end_layout

\begin_layout Standard
This Analysis Menu option creates files for analysis with PLINK/SEQ.
 For further information please see the section concerning detailed information
 on PLINK-SEQ Analysis 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Detailed-info-PSEQ"

\end_inset

.
\end_layout

\begin_layout Standard
Name: PSEQ
\end_layout

\begin_layout Standard
Web: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://atgu.mgh.harvard.edu/plinkseq/
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Primary references:
\end_layout

\begin_layout Standard
TBD
\end_layout

\begin_layout Standard
Documentation: 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://atgu.mgh.harvard.edu/plinkseq/pseq.shtml
\end_layout

\end_inset


\end_layout

\begin_layout Section
The Missing Value Menu 
\begin_inset CommandInset label
LatexCommand label
name "sec:The-Value-Missing-menu"

\end_inset


\end_layout

\begin_layout Standard
This menu is used to indicate what values in the input data represents a
 missing value.
 Quantitative traits may have a different missing value for this purpose
 than Affection Status traits.
 In addition, when Mega2 produces outputs for analysis programs, it allows
 you to specify what missing value code should be used.
 Again a different value can be used for Quantitative traits vs.
 Affection Status traits.
 Typically, the input dictates the default missing values.
 Below is what one would see if the input files are in LINKAGE format.
 Mega2 input format would use 
\begin_inset Quotes eld
\end_inset

NA
\begin_inset Quotes erd
\end_inset

 for both input missing values, and PLINK input format uses -9 by default.
 Output missing values can present problems.
 Some analysis programs dictate the value to be used to represent a missing
 value.
 In this case, the options 
\begin_inset Quotes eld
\end_inset

3)
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

4)
\begin_inset Quotes erd
\end_inset

 in the Missing Value menu would be written 
\begin_inset Quotes eld
\end_inset

#)
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

#)
\begin_inset Quotes erd
\end_inset

 respectively indicating that you can not change these output missing values.
 All four values are copied to the batch file that is generated.
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
              Mega2 4.7.1 Missing Value menu:
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
If it is necessary, specify a different value to indicate that a trait is
 missing 
\end_layout

\begin_layout LyX-Code
both for input to Mega2 and/or output from Mega2.
\end_layout

\begin_layout LyX-Code
Note: Output entries that are marked with a "#" can not be changed.
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed
\end_layout

\begin_layout LyX-Code
 1) Specify input missing value for Quantitative traits:     -999
\end_layout

\begin_layout LyX-Code
 2) Specify input missing value for Affection status:           0
\end_layout

\begin_layout LyX-Code
 3) Specify output missing value for Quantitative traits:       x
\end_layout

\begin_layout LyX-Code
 4) Specify output missing value for Affection status:          x
\end_layout

\begin_layout LyX-Code
Select from options 0-4 > 0
\end_layout

\begin_layout Standard
You may edit these values as you desire in keeping with what is allowed
 by the analysis program.
 Mega2 will verify if the value is constrained to be numeric.
\end_layout

\begin_layout Standard
After 
\begin_inset Quotes eld
\end_inset

0)
\begin_inset Quotes erd
\end_inset

 is typed to exit the menu, a summary is written to the logs as shown below
 (This case indicates no changes from the default):
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
Quantitative  Input Missing Value  -999
\end_layout

\begin_layout LyX-Code
Affection     Input Missing Value "0"
\end_layout

\begin_layout LyX-Code
Quantitative Output Missing Value "x"
\end_layout

\begin_layout LyX-Code
Affection    Output Missing Value "x" 
\end_layout

\begin_layout Section
The allele frequency menu
\end_layout

\begin_layout Standard
Allele frequencies for marker loci are estimated from a subset of genotyped
 individuals in the pedigree file.
 The user can select which individuals will be selected from the following
 menu: 
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
0) Done with this menu, please proceed.
\end_layout

\begin_layout LyX-Code
 1) Genotyped founders only.
\end_layout

\begin_layout LyX-Code
*2) Genotyped founders + a randomly chosen genotyped person
\end_layout

\begin_layout LyX-Code
    from pedigrees without genotyped founders.
\end_layout

\begin_layout LyX-Code
 3) Genotyped founders + genotyped individuals with unique alleles.
\end_layout

\begin_layout LyX-Code
 4) All genotyped individuals.
\end_layout

\begin_layout LyX-Code
 5) Count half-typed individuals' alleles.
 [no]
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
Option 2 is the default choice for individual selection.
 The selection option takes effect after pedigrees have been excluded as
 per the 
\begin_inset Quotes eld
\end_inset

Untyped pedigree selection option
\begin_inset Quotes erd
\end_inset

 as well as after genotypes have been set to unknown as per the omit file,
 if one is provided.
 Note that this was not the case before, recoding took place before these
 two steps.
 
\end_layout

\begin_layout Standard
For X-linked loci, males have to be represented as homozygotes, as only
 the first allele is counted.
 
\end_layout

\begin_layout Standard
The meanings of options 2 and 3 are explained below:
\end_layout

\begin_layout Standard

\series bold
Option 2: 
\series default
Genotyped founders + randomly chosen genotyped person: If a pedigree does
 not contain at any genotyped founder, then a random person is selected
 from the list of genotyped individuals.
 If a pedigree has only one genotyped person, that person is selected.
\end_layout

\begin_layout Standard
Please note that the behavior of option 3 has changed as described below:
\end_layout

\begin_layout Standard

\series bold
Option 3:
\series default
 Count all genotyped founders + genotyped individuals with unique alleles:
 In the presence of untyped founders and rare alleles, non-founders may
 possess alleles which are not counted by option 2.
 In this case, the output locus file contains alleles with zero frequencies,
 which may cause some of the analysis programs to reject the output locus
 file.
 Vitesse is one such program.
 Thus, menu option 3 first goes through all genotyped founders, then randomly
 selects a genotyped person from each pedigree without genotyped founders,
 then identifies alleles with 0 counts for each marker.
 Previously, it did not go through the random-selection process.
 For each allele with 0 counts, it counts the first person with that allele
 encountered in each pedigree.
 The other allele of that person is also counted if that person if the marker
 is autosomal, or if the person is a female.
 
\end_layout

\begin_layout Standard

\series bold
Option 5
\series default
 is a toggle item, and has to do with whether half-typed individuals should
 be included in the allele-frequency computation.
 Half-typed individuals are excluded , i.e.
 menu item 5 is set to 
\begin_inset Quotes eld
\end_inset

no
\begin_inset Quotes erd
\end_inset

 by default.
 
\end_layout

\begin_layout Subsection
The recoding process 
\end_layout

\begin_layout Standard
Affection status and quantitative trait phenotypes are not recoded.
 For now, it is assumed that these are numeric following the linkage format
 convention.
\begin_inset Newline newline
\end_inset

 Marker genotypes can be non-numeric.
 However, many of the analysis options handle only consecutively numbered
 alleles, therefore, the original genotypes are converted to alleles with
 numeric labels.
 The analysis-specific output pedigree and locus files contain recoded allele
 numbers.
 Non-numeric allele names are lexically sorted by their value and assigned
 allele numbers.
 If, for a marker, the original allele names are numbers from 1 though N
 , and Mega2 encounters all N alleles within the genotype data, the resulting
 alleles are NOT recoded, i.e., the original allele numbers are maintained
 in the output.
 However, if any allele is missing from the data, renumbering is done to
 create consecutively numbered alleles.
 
\end_layout

\begin_layout Subsection
The recode log file
\end_layout

\begin_layout Standard
A summary of the recoding process is stored in the MEGA2.RECODE log file.
 The option selected from the individual-selection menu is logged.
 For each marker, the number of individuals counted is recorded, as well
 as the frequency and number of each allele within the selected subset of
 individuals.
 The recode summary file also records the number of half-typed individuals
 for each marker if this is set to 
\begin_inset Quotes eld
\end_inset

yes
\begin_inset Quotes erd
\end_inset

.
 
\end_layout

\begin_layout Subsection
Penetrances for affection status loci
\end_layout

\begin_layout Standard
Starting from version 2.5.3, Mega2 also allows the user to specify one disease
 allele frequency and 3 autosomal penetrance values or 6 sex-specific penetrance
 values for an affection status locus with a single liability class.
 The frequency is taken to refer to the second allele, which is considered
 to be the disease allele.
 The first three penetrances are assumed to be the female penetrances for
 genotypes 1/1, 1/2 and 2/2, and the following three are assigned to the
 male penetrance values.
 If male penetrances are not specified, female penetrances are used in their
 place.
 If frequency and penetrances are not provided, equal allele frequencies
 (i.e.
 0.5 for both alleles), and an incomplete dominant disease model are used
 (1/1=0.05, 1/2=0.90, 2/2=0.90).
 
\begin_inset Newline newline
\end_inset

 Affection status loci with multiple penetrance classes: Trait loci denoted
 type 
\begin_inset Quotes eld
\end_inset

L
\begin_inset Quotes erd
\end_inset

 are considered to have more than one liability classes and Mega2 assigns
 default penetrance values in each class.
 If the user wishes to apply her own penetrance values in this case, she
 would first need to create a linkage format locus file via the Pre-makeped
 format option (analysis option 23) or the Linkage format option (analysis
 option 18), change the penetrance values within the resulting linkage format
 locus file (Pdatain.* or Ldatain.*), then run Mega2 again with the edited
 locus data file in order to create the desired output format.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Section
The locus reordering menu 
\end_layout

\begin_layout Standard
The locus reordering menu allows the user to reorder the loci into the map
 order as specified in the map file, or into a user-chosen order.
 The user can also select subsets of loci from a list of loci.
 
\end_layout

\begin_layout Standard
The reordering menu in version 4.0 allows the user to select and change selection
s as many times as necessary before she decides to proceed.
 It has only three ways to select loci.
 The 4th item allows the user top choose which map to use, if the input
 map file contains more than one map.
 
\end_layout

\begin_layout LyX-Code
       Locus Reordering Menu
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed.
\end_layout

\begin_layout LyX-Code
*1) Select all loci in map order on chromosome: 5
\end_layout

\begin_layout LyX-Code
 2) Select by locus number.
\end_layout

\begin_layout LyX-Code
 3) Select loci on multiple chromosomes[]
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Subsection
Locus reordering option 1) Select all loci in map order on chromosome.
\end_layout

\begin_layout Standard
Option 1 is used to select a single chromosome.
 By default, it is set to the first chromosome encountered in the input
 data.
 If the user selects this item, then the user is prompted to enter a new
 chromosome number.
 
\end_layout

\begin_layout Standard
If the user hits 0 at this point to proceed, then loci present on this chromosom
e will be included in the output file, arranged as per their map positions
 as specified by the input map file.
\end_layout

\begin_layout Subsection
Locus reordering option 2) Select by locus number.
\end_layout

\begin_layout Standard
Option 2 permits the user to select a set of loci from a numbered list by
 entering their numbers in the desired order.
 The user may at any time during the selection process type in the character
 ‘v’ to review the original loci list or ‘o’ to view all the loci he/she
 has selected.
 To finalize the selection process the user will include an ‘e’ at the end
 of the string or on the next input line (e.g.
 ‘1 3 8-11 e’ is a typical input string and will select the loci at the
 1, 3, 8 through 11th positions in the original locus order).
 
\end_layout

\begin_layout Standard
In previous versions of Mega2, during the display of loci via the 'v' input,
 the user had to type 'q' to end the display, then enter locus numbers.
 In the new version of Mega2, instead of typing 'q', locus numbers can be
 entered followed by the carriage-return.
 This will save the selections from the current screen, then continue onto
 the display of the next screen-full of loci.
 This is useful if selections have to be made from different regions on
 the chromosome, out of many loci, as is often the case with SNP data.
\begin_inset Newline newline
\end_inset

 HINT: 
\begin_inset Newline newline
\end_inset

 Several of the output options will complain if markers are not ordered
 according to their map positions, so this has to be kept track of while
 re-ordering the loci manually.
\end_layout

\begin_layout Subsection
Locus reordering option 3) Select marker loci on multiple chromosomes.
\end_layout

\begin_layout Standard
Option 3 is used to set up multiple sets of files, one for each chromosome.
 When Option 4 is chosen, this sub menu appears, if the input map file includes
 sex-linked markers, allowing users to select markers on human autosomal
 chromosomes 1-22, all autosomal and sex-linked chromosomes, or specific
 chromosomes:
\end_layout

\begin_layout LyX-Code
1) Select all autosomes.
 
\end_layout

\begin_layout LyX-Code
2) Select all chromosomes.
 
\end_layout

\begin_layout LyX-Code
3) Select markers on specific chromosomes.
 
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
Otherwise, only options 2 and 3 are shown: 
\end_layout

\begin_layout LyX-Code
 1) Select all marker loci on all chromosomes.
 
\end_layout

\begin_layout LyX-Code
 2) Select marker loci on specific chromosomes.
 
\end_layout

\begin_layout Standard
As before, the second option lists the available chromosome numbers and
 allows the user to select specific ones from this list.
 
\end_layout

\begin_layout Standard
The asterisk indicates the current selection.
 Once you enter a number indicating which map should be used in the output,
 you will be taken back to the locus reordering menu.
 The map names are read in from the header of the Mega2 map file.
\end_layout

\begin_layout Section
Map Selection Menus
\end_layout

\begin_layout Standard
When a map file (see section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Annotated-map-file"

\end_inset

) contains multiple genetic or physical maps, the user needs to be able
 to specify which map is to be used for processing.
 When running with a batch file, this is done through the use of batch file
 parameters (see section 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Map_Index"

\end_inset

).
 When running in interactive mode, the user will be presented with menus
 that will allow them to select an input map.
 If only one genetic map is specified in the map file, then this map will
 be automatically used and no menu will be presented to the user (as there
 is no choice to be made).
\end_layout

\begin_layout Subsection
The Genetic Map Selection Menu
\end_layout

\begin_layout Standard
When using a map file, there are three possible types of genetic maps: sex-avera
ged, sex-specific (male and female), or female (see section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Annotated-map-file"

\end_inset

; Map file).
\end_layout

\begin_layout Standard
If sex-averaged, male, and female maps for a map name exist in the input
 map file, the user will be given the option to use the sex-averaged, sex-specif
ic, or female map.
 If only the sex-averaged map for a map name exists in the input map file,
 the user will be given the option to select a sex-averaged map.
 If the male and female map for a map name exists in the input map file,
 the user will be given the option to select a sex-specific or female map.
 If only the female map for a map name exists in the input map file, the
 user will be given the option to select a female map.
 For the physical map only one map can be specified per map name.
\end_layout

\begin_layout Standard
As an example, if the input map file that is discussed in section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Annotated-map-file"

\end_inset

 is used,
\end_layout

\begin_layout LyX-Code
Chromosome M.h.a    Name   M.h.m   M2.p    M.h.f  M3.p   M4.k.a   M4.k.m
\end_layout

\begin_layout LyX-Code
1          0.0     rs101   0.0     543     0.0    304    0.0       0.0 
\end_layout

\begin_layout LyX-Code
1          5.0     rs102   2.0     678     7.0    821    5.0       2.0 
\end_layout

\begin_layout LyX-Code
X          0.0     rs231   0.0     743     0.0    912    0.0       0.0 
\end_layout

\begin_layout LyX-Code
X          4.0     rs232   1.0     862     6.0    954    4.0       0.0 
\end_layout

\begin_layout Standard
then the following genetic map selection menu would be presented to the
 user:
\end_layout

\begin_layout LyX-Code
Genetic map selection menu: 
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed 
\end_layout

\begin_layout LyX-Code
*1) M: sex-averaged Haldane 
\end_layout

\begin_layout LyX-Code
 2) M: sex-specific Haldane
\end_layout

\begin_layout LyX-Code
 3) M: female Haldane
\end_layout

\begin_layout LyX-Code
 4) M4: sex-averaged Kosambi
\end_layout

\begin_layout LyX-Code
With the current option, any X-chromosome processing will 
\end_layout

\begin_layout LyX-Code
                         be done with a sex-averaged genetic map 
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
Select from options 0 - 4 >
\end_layout

\begin_layout Standard
The input map file has three columns for map ‘M’ (sex-averaged, female,
 and male).
 Because of this it is possible for the user to select among three different
 map types.
 
\end_layout

\begin_layout Standard
The input map file has two columns for map ‘M4’ (sex-averaged, and male).
 Here, it is only possible for the user to select one map type (sex-averaged),
 since the male map cannot be used by itself.
\end_layout

\begin_layout Standard
There are processing implications for selecting a specific genetic map.
 A sex-averaged map can be used in processing only the autosomes and the
 X chromosome.
 In this case the sex-averaged map positions will be used on the X chromosome
 as if they were female map positions.
\end_layout

\begin_layout Standard
If a sex-specific map is selected, then the male and female positions are
 used for all autosomal markers, and the female positions are used for all
 markers on the X chromosome.
 
\end_layout

\begin_layout Standard
If only a female map is selected, then that female map can only be used
 in processing only markers on the X chromosome.
 
\end_layout

\begin_layout Subsection
The Physical Map Selection Menu
\end_layout

\begin_layout Standard
As an example, if the input map file that is discussed in 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Annotated-map-file"

\end_inset

 is used, 
\end_layout

\begin_layout LyX-Code
Chromosome M.h.a    Name   M.h.m   M2.p    M.h.f  M3.p   M4.k.a   M4.k.m
\end_layout

\begin_layout LyX-Code
1          0.0     rs101   0.0     543     0.0    304    0.0       0.0 
\end_layout

\begin_layout LyX-Code
1          5.0     rs102   2.0     678     7.0    821    5.0       2.0 
\end_layout

\begin_layout LyX-Code
X          0.0     rs231   0.0     743     0.0    912    0.0       0.0 
\end_layout

\begin_layout LyX-Code
X          4.0     rs232   1.0     862     6.0    954    4.0       0.0 
\end_layout

\begin_layout Standard
then the following physical map selection menu would be presented to the
 user:
\end_layout

\begin_layout LyX-Code
Physical map selection menu: 
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed 
\end_layout

\begin_layout LyX-Code
 1) M2 
\end_layout

\begin_layout LyX-Code
 2) M3 
\end_layout

\begin_layout LyX-Code
*3) None
\end_layout

\begin_layout LyX-Code
Select from options 0 - 3 >
\end_layout

\begin_layout Standard
If the analysis mode does not require a physical map, the user will be presented
 with the ‘None’ option.
\end_layout

\begin_layout Section
The trait selection menu
\end_layout

\begin_layout Standard
The trait selection menu allows the user to select one or more traits and
 place them before or after the marker loci inside the output files.
 Some analysis options allow only a single traits locus at a time, in which
 case the third option is not available.
 In other cases, only affection status loci are allowed, and the trait selection
 process will not terminate unless a valid set of traits have been chosen.
 (See More details on trait selection for specific analysis options.) 
\end_layout

\begin_layout Standard
Here is what the menu would look like when entered for the first time for
 the Mendel option which allows more than one trait to be output together.
 
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
Trait and covariate selection menu:
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed.
\end_layout

\begin_layout LyX-Code
 1) Create trait-specific files or combine: [Order as specified in item
 2]
\end_layout

\begin_layout LyX-Code
 2) Trait loci selected: [aff [MARKERS]]
\end_layout

\begin_layout LyX-Code
Enter option 0 - 2 > 
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Subsection
Select multiple trait loci to loop across.
\end_layout

\begin_layout Standard
If Option 1 is set to 
\begin_inset Quotes eld
\end_inset

one trait at a time
\begin_inset Quotes erd
\end_inset

, the analysis is carried out with one trait and all marker loci at a time.
 The output for each trait is stored in a sub-directory (see Output directory
 selection menu).
 Trait loci are selected via option 1, and the order in which they are selected
 does not affect the output, except the order in which each trait is analyzed.
 to the traits.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Use trait loci in specified order.
\end_layout

\begin_layout Standard
If Option 2 is set to 
\begin_inset Quotes eld
\end_inset

Order specified in option 2
\begin_inset Quotes erd
\end_inset

, all traits are combined into a single set of output files.
 Trait loci appear in the output files in the order they are selected in,
 with the marker loci inserted at the 
\begin_inset Quotes eld
\end_inset

[MARKERS]
\begin_inset Quotes erd
\end_inset

 position .
 Thus, this option controls the positioning of trait loci with respect to
 the marker loci.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
List of selected trait loci
\end_layout

\begin_layout Standard
Option 2 allows to user to specify zero or more trait loci to be used in
 the analysis.
 If there is only a single trait locus, and the analysis option requires
 at least one trait locus, then this menu is skipped, and the trait locus
 automatically selected.
 For these options, if no trait loci are present, or the trait locus is
 not of the correct type (e.g.
 SimWalk2-NPL requires at least one affection locus, and the data has only
 QTLs), then Mega2 will stop with an error message.
 
\end_layout

\begin_layout Standard
If option 2 is set to 
\begin_inset Quotes eld
\end_inset

one locus at a time
\begin_inset Quotes erd
\end_inset

, a list of trait loci are displayed, and the user enters 0 or more correspondin
g numbers.
 If option 2 is set to 
\begin_inset Quotes eld
\end_inset

combine
\begin_inset Quotes erd
\end_inset

, then the trait list also includes a [MARKER] item.
 In this case the order of the loci decides the order in which they appear
 in the output files.
 
\end_layout

\begin_layout Subsection
Selection of covariates 
\end_layout

\begin_layout Standard
The trait selection menu includes a covariate selection item if the data
 includes QTLs for GeneHunter, Merlin and SOLAR.
 Here is what the trait menu looks like with the covariates item: 
\end_layout

\begin_layout LyX-Code
Trait and covariate selection menu:
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed.
\end_layout

\begin_layout LyX-Code
 1) Trait loci selected: [Q1]
\end_layout

\begin_layout LyX-Code
 2) Covariates selected: []
\end_layout

\begin_layout LyX-Code
 3) Loop over traits or combine traits: [Loop   ]
\end_layout

\begin_layout LyX-Code
Enter option 0 - 3 >
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
Traits appearing in the list in option 1 is automatically excluded from
 the list of covariates.
 
\end_layout

\begin_layout Subsection
More details on trait selection.
 
\end_layout

\begin_layout Standard
The following options require at least one affection status trait locus:
\end_layout

\begin_layout Standard
Simwalk2: Parametric (Location scores) and Non-parametric linkage 
\begin_inset Newline newline
\end_inset

 Aspex
\begin_inset Newline newline
\end_inset

 GeneHunter, GeneHunter-Plus, Allegro, and MLBQTL
\begin_inset Newline newline
\end_inset

 APM and APM-Mult
\begin_inset Newline newline
\end_inset

 SPLINK
\begin_inset Newline newline
\end_inset

 Segregation and liability group counts
\begin_inset Newline newline
\end_inset

 TDTMax
\begin_inset Newline newline
\end_inset

 Vitesse
\begin_inset Newline newline
\end_inset

 FBAT
\end_layout

\begin_layout Standard
Thus, if there is only a single trait locus in the input data, this trait
 locus is automatically selected and the trait selection menu skipped.
\end_layout

\begin_layout Standard
The following do not allow quantitative trait loci:
\end_layout

\begin_layout Standard
Simwalk2 options
\begin_inset Newline newline
\end_inset

 Aspex
\begin_inset Newline newline
\end_inset

 GeneHunter-Plus and Allegro
\begin_inset Newline newline
\end_inset

 APM and APM-Mult
\begin_inset Newline newline
\end_inset

 SIMULATE
\begin_inset Newline newline
\end_inset

 Segregation and liability group counts
\begin_inset Newline newline
\end_inset

 TDTMax
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Standard
Therefore, selecting a quantitative locus for output generates an error
 message, and the user asked to re-select traits.
\end_layout

\begin_layout Standard
The following options can handle quantitative trait loci but require at
 least one affection status locus.
 For these options if the user doesn't specify an affection status locus,
 a dummy locus is inserted in the output files.
\end_layout

\begin_layout Standard
GeneHunter
\begin_inset Newline newline
\end_inset

 MLBQTL
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Affection status labels
\end_layout

\begin_layout Standard
If one or more affection trait locus has multiple liability classes, then
 a separate menu lets you choose which status-class combinations to label
 as 
\begin_inset Quotes eld
\end_inset

affected
\begin_inset Quotes erd
\end_inset

.
 This is so that options, which do not recognize multiple liability classes
 can analyze such affection status loci.
 The list of such options includes SimWalk2, Aspex, Segregation summary,
 Slink, Splink, PAP, Mendel7+, S.A.G.E.
 3.0 and S.A.G.E.
 4.0, combined Merlin/SimWalk2 non-parametric linkage, Merlin, and PLINK.
 
\end_layout

\begin_layout Standard
Here is what the menu looks like, for two traits with multiple liability
 classes: 
\end_layout

\begin_layout LyX-Code
Affection label menu:
\end_layout

\begin_layout LyX-Code
     0) Done with this menu - please proceed
\end_layout

\begin_layout LyX-Code
     1) TRAIT [2-*]
\end_layout

\begin_layout LyX-Code
     2) trt2 [2-*]
\end_layout

\begin_layout LyX-Code
     Enter 0 or a trait item between 1-2 >
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
Selecting a trait item allows the user to specify one or more status-class
 combinations for that trait locus.
 The default which implies that any person with a status 2 is to be treated
 as affected, irrespective of the class value.
 
\end_layout

\begin_layout Standard
For example, if the user enters 1, this prompt appears: 
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
Found these status-class pairs:
\end_layout

\begin_layout LyX-Code
                0-1  (7 entries)
\end_layout

\begin_layout LyX-Code
                2-1  (4 entries)
\end_layout

\begin_layout LyX-Code
                2-2  (6 entries)
\end_layout

\begin_layout LyX-Code
                2-3  (4 entries)
\end_layout

\begin_layout LyX-Code
Now enter the "trait status"-"liability class" pairs 
\end_layout

\begin_layout LyX-Code
you wish to be considered as "affected" by Mendel7+ format (e.g.
 2-1).
\end_layout

\begin_layout LyX-Code
You may enter a * in either field as a wild-card 
\end_layout

\begin_layout LyX-Code
e.g., 2-* means status 2 and all classes).
 
\end_layout

\begin_layout LyX-Code
Separate pairs with commas (e.g.
 2-1,2-3) > 
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
Please also consult the documentation on the corresponding batch item Value_Affe
cteds to specify affected labels inside the batch file.
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Section
Creating plots using Mega2 
\begin_inset CommandInset label
LatexCommand label
name "sec:Creating-plots"

\end_inset


\end_layout

\begin_layout Standard
Our R graphing package nplplot has been designed to generate PDF or postscript
 files containing statistical analysis results for markers along a chromosome.
 Thus, R is also required for this to function.
 Although Mega2 uses this package to plots of results for the four options
 listed in the Supported options section, it can conceivably be used to
 plot any type of scores along a set of positions along a chromosome.
 
\end_layout

\begin_layout Standard
The package consists of three functions which are related to the plotting
 itself, and three other functions that also create output files for adding
 custom tracks and Genome Graph plots within the UCSC genome browser interface.
 The three plot functions are nplplot, nplplot.multi and nplplot.old.
 The other three are functions for creating formatted files for the UCSC
 genome browser, namely bedplot, genomeplot and prepareplot.
 These are described in in the Custom tracks section of the documentation.
 
\end_layout

\begin_layout Standard
As mentioned in the installation instructions, the package nplplot should
 be installed along with the R libraries.
 Documentation on installing libraries in general is maintained at the CRAN
 web-site.
 
\end_layout

\begin_layout Standard
For users already familiar with nplplot, note that the nplplot.old function
 is the old nplplot function, provided only for backward compatibility,
 to support the old-style plot data file format.
 The function nplplot.multi replaces nplplot.old , and provides greater flexibilit
y to customize your plots.
 The new input files are of two types, a
\series bold
 Scores
\series default
 file that is strictly meant to contain a table of marker names, positions
 and scores, and a
\series bold
 Header
\series default
 file, which is an R-language file to set various plot parameters.
 Examples of these files are provided in the general usage section below.
 
\end_layout

\begin_layout Paragraph
Installing nplplot from CRAN 
\end_layout

\begin_layout Standard
The nplplot package is distributed from within CRAN (The Comprehensive R
 Archive Network).
 Like any other R add-on package, nplplot can be installed from within R.
 It does not depend on any other package.
 
\end_layout

\begin_layout Standard
In order to generate the plots from within Mega2, it is not necessary to
 invoke R.
 The scripts generated by Mega2 run R in batch mode to create the appropriate
 postscript or PDF files.
 Currently PDF files are the default; you need to go into the R plot menu
 and change output format to postscript, if you wish to generate postscript
 files.
 
\end_layout

\begin_layout Paragraph
Supported analysis options 
\end_layout

\begin_layout Standard
The following Mega2 options can currently create R plots: 
\end_layout

\begin_layout Itemize
SimWalk2 - Non-parametric analysis 
\end_layout

\begin_layout Itemize
Allegro 
\end_layout

\begin_layout Itemize
Merlin-SimWalk2 option 
\end_layout

\begin_layout Itemize
Merlin's npl, pairs, and vc analyses
\end_layout

\begin_layout Itemize
FBAT
\end_layout

\begin_layout Subsection
Statistics selection menu 
\end_layout

\begin_layout Paragraph
SimWalk2 statistic selection menu
\end_layout

\begin_layout Standard
SimWalk2 computes 5 statistics for the NPL LOD score computation (see the
 SimWalk2 output file STATS-*.ALL for a description).
 This is also true of the Merlin-SimWalk2 option.
 Allegro computes LOD scores separately for 12 different non-parametric
 statistics.
 Each is stored in a separate output file named appropriately (e.g.
 allegro_linpairs_spt.01).
 Therefore, for each analysis option there is a specific statistic selection
 menu where the user can specify the ones to be included in the plots.
\end_layout

\begin_layout Standard
Please note that running SimWalk2 or Allegro will still compute all of their
 statistics, however, only those selected via this menu will be plotted.
 Further instructions on how to subsequently modify the selections are provided
 below.
\end_layout

\begin_layout Standard
SimWalk2 statistic selection menu: 
\end_layout

\begin_layout LyX-Code
========================================================== 
\end_layout

\begin_layout LyX-Code
R plot statistic selection menu: 
\end_layout

\begin_layout LyX-Code
NPL statistics will be automatically plotted into a 
\end_layout

\begin_layout LyX-Code
PDF file using R after Simwalk2-NPL 
\end_layout

\begin_layout LyX-Code
has been run.
 
\end_layout

\begin_layout LyX-Code
Please select the statistics to be included in this R plot.
 
\end_layout

\begin_layout LyX-Code
This list can be later modified in the shell script Rsimwalk2.sh before 
\end_layout

\begin_layout LyX-Code
running this script.
 
\end_layout

\begin_layout LyX-Code
========================================================== 
\end_layout

\begin_layout LyX-Code
1) BLOCKS 
\end_layout

\begin_layout LyX-Code
2) MAX-TREE 
\end_layout

\begin_layout LyX-Code
3) ENTROPY 
\end_layout

\begin_layout LyX-Code
4) NPL_PAIRS 
\end_layout

\begin_layout LyX-Code
5) NPL_ALL 
\end_layout

\begin_layout LyX-Code
========================================================== 
\end_layout

\begin_layout LyX-Code
Enter string of statistic numbers (’e’ to terminate) > 1 2 3 e 
\end_layout

\begin_layout LyX-Code
Selected statistics: BLOCKS MAX_TREE ENTROPY 
\end_layout

\begin_layout LyX-Code
========================================================== 
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
In the above example, the user has selected statistic BLOCKS, MAX-TREE,
 and ENTROPY for plotting.
 For the Merlin-SimWalk2 option, only statistics NPL_PAIRS and NPL_ALL,
 which correspond to Merlin's Pairs and All statistics respectively, can
 be selected.
\end_layout

\begin_layout Paragraph
Merlin statistics selection menu
\end_layout

\begin_layout Standard
For Merlin, the statistics list is : 
\end_layout

\begin_layout LyX-Code
========================================================== 
\end_layout

\begin_layout LyX-Code
1) ALL 
\end_layout

\begin_layout LyX-Code
2) Pairs 
\end_layout

\begin_layout LyX-Code
3) VC 
\end_layout

\begin_layout LyX-Code
========================================================== 
\end_layout

\begin_layout Standard
Plotting is still restricted to the 
\begin_inset Quotes eld
\end_inset

one trait at a time
\begin_inset Quotes erd
\end_inset

 mode of analysis.
\end_layout

\begin_layout Paragraph
Allegro statistics selection menu
\end_layout

\begin_layout Standard
The Allegro statistics selection menu is: 
\end_layout

\begin_layout LyX-Code
========================================================== 
\end_layout

\begin_layout LyX-Code
R plot statistic selection menu: 
\end_layout

\begin_layout LyX-Code
NPL statistics will be automatically plotted into a 
\end_layout

\begin_layout LyX-Code
PDF file using R after Allegro 
\end_layout

\begin_layout LyX-Code
has been run.
 
\end_layout

\begin_layout LyX-Code
Please select the statistics to be included in this R plot.
 
\end_layout

\begin_layout LyX-Code
This list can be later modified in the shell script Rallegro.sh before 
\end_layout

\begin_layout LyX-Code
running this script.
 
\end_layout

\begin_layout LyX-Code
========================================================== 
\end_layout

\begin_layout LyX-Code
1) exppairs_mpt Exponential multi-point pairs 
\end_layout

\begin_layout LyX-Code
2) exppairs_spt Exponential single-point pairs 
\end_layout

\begin_layout LyX-Code
3) expall_mpt Exponential multi-point all 
\end_layout

\begin_layout LyX-Code
4) expall_spt Exponential single-point all 
\end_layout

\begin_layout LyX-Code
5) linpairs_mpt Linear multi-point pairs 
\end_layout

\begin_layout LyX-Code
6) linpairs_spt Linear single-point pairs 
\end_layout

\begin_layout LyX-Code
7) linall_mpt Linear multi-point all 
\end_layout

\begin_layout LyX-Code
8) linall_spt Linear single-point all 
\end_layout

\begin_layout LyX-Code
9) par_mpt:LOD Parametric multi-point LOD scores 
\end_layout

\begin_layout LyX-Code
10) par_spt:LOD Parametric single-point LOD scores 
\end_layout

\begin_layout LyX-Code
11) par_mpt:HLOD Parametric multi-point heterogeneity LOD scores 
\end_layout

\begin_layout LyX-Code
12) par_spt:HLOD Parametric single-point heterogeneity LOD scores 
\end_layout

\begin_layout LyX-Code
========================================================== 
\end_layout

\begin_layout LyX-Code
Enter string of statistic numbers (’e’ to terminate) > 
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Subsection
R-plot parameters menu 
\end_layout

\begin_layout Standard
This menu allows to user to define what to plot, where and how.
 Here is an example of what the menu looks like: 
\end_layout

\begin_layout LyX-Code
========================================================== 
\end_layout

\begin_layout LyX-Code
Customization of graphical output:
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
** Y-axis min and max values can be enforced by setting "enforce" to yes
\end_layout

\begin_layout LyX-Code
   otherwise, these will be set according to the plot data.
\end_layout

\begin_layout LyX-Code
** Plot orientation can be toggled between 
\end_layout

\begin_layout LyX-Code
   portrait or landscape.
\end_layout

\begin_layout LyX-Code
** Format of output file (ps/pdf) is decided by file-name extension (.ps/.pdf).
\end_layout

\begin_layout LyX-Code
   If no extension is provided, a pdf file will be created.
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
R plot parameter selection menu:
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed
\end_layout

\begin_layout LyX-Code
 1) PDF output file name          RMerlin.06.pdf 	[new]
\end_layout

\begin_layout LyX-Code
 2) Minimum Y-axis value                    0.00
\end_layout

\begin_layout LyX-Code
 3) Maximum Y-axis value                    3.00
\end_layout

\begin_layout LyX-Code
 4) Horizontal cut-off line at              2.00
\end_layout

\begin_layout LyX-Code
 5) Plot orientation             [landscape]
\end_layout

\begin_layout LyX-Code
 6) Enforce Y-axis bounds even if data does not fit [no ]
\end_layout

\begin_layout LyX-Code
Select from options 0-6 (5,6 to toggle, 2,3,4 to change values) > 
\end_layout

\begin_layout Standard
In this example, data containing marker loci on chromosomes 1, 2, and 3
 and traits AFF1 and AFF2 is analyzed with the Merlin 
\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
npl and 
\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
pairs option.
 Here, the user has chosen to combine the LOD score curves for the two traits
 AFF1 and AFF2 on a single plot, and plot the three chromosomes in separate
 output files.
 
\end_layout

\begin_layout Standard
If you choose to combine the chromosomes into one file, by typing 3 at the
 prompt, the resulting menu would have some additional choices: 
\end_layout

\begin_layout LyX-Code
========================================================== 
\end_layout

\begin_layout LyX-Code
R plot parameter selection menu: 
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed 
\end_layout

\begin_layout LyX-Code
1) Plot output file name stem RMerlin 
\end_layout

\begin_layout LyX-Code
2) Plot traits together in same graph [yes ] 
\end_layout

\begin_layout LyX-Code
3) Combine chromosomes into one file [yes] 
\end_layout

\begin_layout LyX-Code
4) Minimum Y-axis value 0.00 
\end_layout

\begin_layout LyX-Code
5) Maximum Y-axis value 3.00 
\end_layout

\begin_layout LyX-Code
6) Horizontal cut-off line at 2.00 
\end_layout

\begin_layout LyX-Code
7) Plots per page: number of rows 1 
\end_layout

\begin_layout LyX-Code
8) Plots per page: number of columns 1 
\end_layout

\begin_layout LyX-Code
9) Plot orientation [portrait] 
\end_layout

\begin_layout LyX-Code
10) Enforce Y-axis bounds even if data does not fit [no ] 
\end_layout

\begin_layout LyX-Code
Select from options 0-10 (2,3,9,10 to toggle, 4,5,6,8,7 to change values)
 > 
\end_layout

\begin_layout LyX-Code
Options 7 and 8 control the number of columns and rows on a page.
 
\end_layout

\begin_layout LyX-Code
 Creating plots 
\end_layout

\begin_layout Standard
For each of the three analysis options listed above, the output file name
 selection menu now includes a switch that can turn the plot creation on
 or off.
 If is it turned on, these additional files are created : 
\begin_inset Newline newline
\end_inset

 
\end_layout

\begin_layout Itemize
Rsimwalk2.pl or Rallegro.pl (perl file to format SimWalk's or Allegro's output
 appropriately for nplplot.
 
\end_layout

\begin_layout Itemize
Rsimwalk2.sh or Rallegro.sh (C-shell file to run R and create the plots).
 
\end_layout

\begin_layout Itemize
Rsimwalk2.R or Rallegro.R (R-script run by the shell script to generate the
 plots).
\end_layout

\begin_layout Standard
Thus, first the user has to execute either the 
\emph on
npl.*.sh
\emph default
 or 
\emph on
al_script.*.sh
\emph default
 files (these could reside in separate trait directories, if multiple traits
 are analyzed), then run 
\emph on
Rsimwalk2.sh
\emph default
 or 
\emph on
Rallegro.sh
\emph default
 respectively.
 
\end_layout

\begin_layout Paragraph
Output 
\end_layout

\begin_layout Standard
The SimWalk2 output file is called SW2NPL.##.ps where ## stands for the chromosome
 number or SW2NPL.all.ps if multiple chromosomes are plotted into one file.
 
\end_layout

\begin_layout Standard
The Allegro output file is called Allegro.##.ps.
 These files can be viewed using a PDF viewing utility such as ghostscript,
 or printed on a printer directly.
 
\end_layout

\begin_layout Paragraph
Re-using old Merlin analysis results with the new Rmerlin.pl
\end_layout

\begin_layout Standard
You can manually change the Rmerlin.*.sh scripts by replacing the arguments
 to the Rmerlin.pl command.
 The arguments following the -c switch need to be changed as follows: 
\begin_inset Newline newline
\end_inset

 -c 2,1 or -c 1,2 need to be changed to -c All,Pairs or -cPairs,All respectively.
 
\begin_inset Newline newline
\end_inset

 -c1 needs to be replaced by -cPairs or -cAll, depending on what the analysis
 was.
\end_layout

\begin_layout Itemize
Run Mega2 to re-generate the scripts.
 Then, being careful not to run the merlin.*.sh scripts simply re-run the
 Rmerlin.*.sh scripts.
\end_layout

\begin_layout Subsection
General usage of nplplot and nplplot.multi 
\end_layout

\begin_layout Standard
Nplplot functions can also be used from within R.
 Start R, load in the library, using the command library(nplplot), and you
 are ready to create your own plots.
 
\end_layout

\begin_layout Standard
Example data files and code is included with the nplplot and nplplot.multi
 functions.
 These can be run using the example command available in R.
 Use these examples to create your own data files for plotting or use the
 example files given below.
 
\end_layout

\begin_layout Paragraph
Scores file
\end_layout

\begin_layout LyX-Code
marker location score1 score2 score3 
\end_layout

\begin_layout LyX-Code
d1s228 0.00 0.546 0.345 0.142 
\end_layout

\begin_layout LyX-Code
d1s429 1.00 0.346 0.335 0.252 
\end_layout

\begin_layout LyX-Code
d1s347 2.00 0.446 0.245 0.342 
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Paragraph
Header file for nplplot.multi
\end_layout

\begin_layout LyX-Code
# reference line, y-axis minimum and y-axis maximum 
\end_layout

\begin_layout LyX-Code
yline <- 2.00 
\end_layout

\begin_layout LyX-Code
ymin <- -1.0 
\end_layout

\begin_layout LyX-Code
ymax <- 3.00 
\end_layout

\begin_layout LyX-Code
# Enforce y-axis bounds? 
\end_layout

\begin_layout LyX-Code
yfix <- FALSE 
\end_layout

\begin_layout LyX-Code
# Plot subtitle 
\end_layout

\begin_layout LyX-Code
title <- "Chromosome 2" 
\end_layout

\begin_layout LyX-Code
# Score units 
\end_layout

\begin_layout LyX-Code
ylabel <- "LOD Score" 
\end_layout

\begin_layout LyX-Code
# Font scaling for legend 
\end_layout

\begin_layout LyX-Code
cex.legend <- 0.7000 
\end_layout

\begin_layout LyX-Code
# Font scaling for axis 
\end_layout

\begin_layout LyX-Code
cex.axis <- 0.9000 
\end_layout

\begin_layout LyX-Code
# Tick length for marker labels at the top of plots 
\end_layout

\begin_layout LyX-Code
tcl <- -0.3000 
\end_layout

\begin_layout LyX-Code
# Use colors 
\end_layout

\begin_layout LyX-Code
bw <- FALSE 
\end_layout

\begin_layout LyX-Code
# Remove NAs before plotting each curve 
\end_layout

\begin_layout LyX-Code
na.rm <- TRUE 
\end_layout

\begin_layout LyX-Code
lgndtxt <- c("Trait1", "Trait2", "Trait3") 
\end_layout

\begin_layout LyX-Code
ltypes <- c(1,1,1) 
\end_layout

\begin_layout LyX-Code
my.colors <- c("black", "red", "green") 
\end_layout

\begin_layout LyX-Code
ptypes <- c(0, 0, 0) 
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
If you wish to use nplplot only, then these parameters can be passed in
 as arguments to nplplot.
 The table of scores can be supplied as a file as well as an R data-frame
 to nplplot.
\end_layout

\begin_layout Section
Custom tracks for the UCSC Browser
\begin_inset CommandInset label
LatexCommand label
name "sec:Custom-tracks-for"

\end_inset


\end_layout

\begin_layout Paragraph*
Overview 
\end_layout

\begin_layout Standard
The nplplot package now has functions to create custom track files that
 then can be uploaded into the UCSC Genome Browser for further visualization.
 From within Mega2, the creation of custom track files is done automatically
 under the following conditions: 1) an option has been chosen where the
 creation of R plots is supported; 2) the input files are in Mega2 format;
 and 3) the map file contains a physical map giving the physical positions
 of the markers.
 When these conditions hold, the running of the C shell script to do the
 analyses and to create the R plots will also automatically create a set
 of custom track files for the UCSC Genome Browser.
 
\end_layout

\begin_layout Paragraph
Custom track output files
\end_layout

\begin_layout Standard
Mega2 will create four types of output files: 
\end_layout

\begin_layout Enumerate
BED.01 - this track indicates the names and positions of the markers.
 
\end_layout

\begin_layout Enumerate
BedGraph.01 - this track creates a bar graph of the results.
 
\end_layout

\begin_layout Enumerate
GG.markers.all - this is a Genome Graph file that can be loaded in via the
 'Genome Graphs' interface.
 This contains results for all chromosomes and uses the marker name and
 so only lists results at each named marker.
 
\end_layout

\begin_layout Enumerate
GG.positions.all - this is a Genome Graph file that can be loaded in via the
 'Genome Graphs' interface.
 This contains results for all chromosomes and uses the 'chromosome base'
 (e.g.
 chr1 130000) format style, and so lists results at every position for which
 a statistic was calculated.
\end_layout

\begin_layout Standard

\series bold
Notes:
\end_layout

\begin_layout Standard
The BED.* and BedGraph.* files are named using extensions indicating the chromosom
e (e.g., .01, .02, .03, etc).
 They come in pairs, one pair per chromosome.
\end_layout

\begin_layout Standard
The GG.positions.all file will upload much faster into the UCSC Genome Browser
 than the GG.markers.all file.
 Presumably this is because the UCSC Genome Browser has to look up positions
 for each of the markers named in the GG.markers.all file.
\end_layout

\begin_layout Standard
When creating your input physical map, it is important to use physical positions
 from the exact same build that you will be using within the UCSC Genome
 Browser to display your results.
 This is particularly important and vital when uploading results from the
 BED.*, BedGraph.*, and GG.positions.all files, as all of these files use and
 rely on the physical positions as originally provided in the input map
 file.
 In contrast, the GG.markers.all file does not contain any physical positions
 and so is not vulnerable to mismatches between your input physical map
 positions and the positions used in the UCSC Genome Browser.
 However, the UCSC Genome Browser will only display results from the GG.markers.al
l for which it was able to look up the marker name.
 If it fails to find a marker name for a record, that record will be dropped
 and not displayed.
 
\end_layout

\begin_layout Paragraph
Supported analysis options 
\end_layout

\begin_layout Standard
The following options can currently create R-plots, and, if run on Mega2
 input files with a map file containing a physical map, will also create
 UCSC Custom Track files: 
\end_layout

\begin_layout Itemize
SimWalk2 - Non-parametric linkage analysis 
\end_layout

\begin_layout Itemize
Allegro 
\end_layout

\begin_layout Itemize
Merlin-SimWalk2 option 
\end_layout

\begin_layout Itemize
Merlin's npl, pairs and vc analyses
\end_layout

\begin_layout Paragraph
Creation details
\end_layout

\begin_layout Standard
The creation of the custom track files is done using R functions that are
 part of the nplplot package.
 For further details, please see the R help pages for these functions.
 
\end_layout

\begin_layout Enumerate
bedplot - BED and BedGraph plotting 
\end_layout

\begin_layout Enumerate
genomeplot - Genome Graph plotting 
\end_layout

\begin_layout Enumerate
prepareplot - Prepare input data files for plotting
\end_layout

\begin_layout Paragraph
General usage
\end_layout

\begin_layout Standard
To use the three track-related functions independently from within R, first
 run prepareplot.
 This function can be used to process multiple nplplot format scores datafile,
 by specifying a common prefix, a list of chromosomes, and a single Mega2-annota
ted format map file with physical positions for all the required markers
 and chromosomes.
 You can then run bedplot or genomeplot on the resulting files to further
 reformat the data for uploading into the UCSC genome browser.
\end_layout

\begin_layout Section
Additional Mega2 Output Files
\end_layout

\begin_layout Standard
Mega2 produces these additional output files, containing further details
 of the current run.
 These files are either stored in a special directory described below, or
 tagged with the date and time of the run, if Mega2 terminated abnormally
 in the very early stages of its execution, e.g.
 if you ran Mega2 at 2:30 pm on June 15, 2004, then you may end up with
 a files named MEGA2.LOG.2004-6-15-14-30, MEGA2.ERR.2004-6-15-14-30 etc.
 
\end_layout

\begin_layout Subsection
Summary file directory 
\end_layout

\begin_layout Standard
The summary file directory (also referred to as the run-directory), contains
 the summary files created by Mega2, along with html-versions of these files.
 This directory is created within the output folder specified in the input
 menu, and identified by the date and time of the run.
 For example, in the previous example, if Mega2 ran without problems, you
 should see a directory named 2004-6-15-14-30.
\end_layout

\begin_layout Standard
To turn off saving summary files in a separate directory run mega2 with
 the 
\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
nosave option, i.e.
 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
mega2 
\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
nosave 
\end_layout

\begin_layout Standard
mega2 -x
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
If saving is turned off, then the MEGA2.LOG, MEGA2.ERROR, MEGA2.KEYS and MEGA2.RECOD
E files are left within the folder from which Mega2 was run.
 If you run Mega2 again from within this folder with the 
\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
nosave option, these files will be overwritten.
\end_layout

\begin_layout Standard
This may seem undesirable for normal use, but is a useful space-saving feature
 when you are running many consecutive runs of Mega2 from within the same
 folder, as would be the case when running replicates for a simulation study.
 
\end_layout

\begin_layout Subsection
MEGA2.LOG 
\end_layout

\begin_layout Standard
In addition to the sate and time of the last run and input file names, this
 file is a copy of Mega2's screen output including summary statistics on
 the input pedigrees and locus data, the analysis option name, what loci
 were selected for reordering, pedigree statistics after locus selection,
 and finally, what output files were produced.
 
\end_layout

\begin_layout Standard
It may also contain other important messages such as families and individuals
 excluded from analysis, breaking or re-connection of loops in inbred pedigrees,
 individuals whose genotypes were zeroed out, etc.
 If there were any warnings or error messages, they are written into this
 file in addition to the MEGA2.ERROR file.
 
\end_layout

\begin_layout Standard
Note that the backup copy MEGA2.LOG.old is no longer created.
 
\end_layout

\begin_layout Subsection
MEGA2.ERR 
\end_layout

\begin_layout Standard
This file contains all the error and warning messages produced during a
 single run of Mega2.
 These messages include problems encountered with the input files, such
 as inconsistent or invalid phenotype/genotype data (Mendelian inconsistencies,
 markers named in the locus file but missing from the map file and vice-versa
 etc.), and if there are problems with creating and writing new files, directorie
s during the execution.
 
\end_layout

\begin_layout Standard
For a detailed list of errors and warnings, see the trouble shooting section
 .
 It is a good idea to examine this file carefully and consult the Trouble-shooti
ng documentation, if Mega2 terminates abnormally.
 We have made all efforts to make the error and warning messages as informative
 as possible, in order to help the user debug her data.
 We always appreciate feedback and suggestions for improvement in this area.
 
\end_layout

\begin_layout Subsection
MEGA2.BATCH 
\end_layout

\begin_layout Standard
This is a default batch file created every time Mega2 is run in the interactive
 mode.
 See the section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:Batch-mode"

\end_inset

 on Running Mega2 in Batch Mode for details on the format and contents.
 
\end_layout

\begin_layout Subsection
MEGA2.KEYS 
\end_layout

\begin_layout Standard
This file contains a list of input and output pedigree and person identifiers.
 It relates each input pedigree record to its corresponding output pedigree
 record.
 Since, several of the output formats within Mega2 require reordering individual
s, or re-assigning pedigree and person IDs, it is difficult for the user
 to match up the output against the input.
 Therefore, it was felt necessary to create a mapping between input and
 output pedigree data.
 From the key file, the user can identify loops that were broken up or re-connec
ted, or which nuclear pedigrees were created from an extended pedigree.
 In the case of PAP, for instance, where individuals are assigned completely
 new IDs, the key file should help greatly.
 
\begin_inset Newline newline
\end_inset

 Here is an example MEGA2.KEYS file.
 
\end_layout

\begin_layout LyX-Code
---------------------
\end_layout

\begin_layout LyX-Code
Fri Oct 11 13:15:05 2002
\end_layout

\begin_layout LyX-Code
Input file names
\end_layout

\begin_layout LyX-Code
locus file:    datain.ex
\end_layout

\begin_layout LyX-Code
pedigree file: pedin.ex1
\end_layout

\begin_layout LyX-Code
map file:      map.ex
\end_layout

\begin_layout LyX-Code
omit file:     omit.ex
\end_layout

\begin_layout LyX-Code
Untyped pedigree option: Include all pedigrees whether typed or not
\end_layout

\begin_layout LyX-Code
---------------------
\end_layout

\begin_layout LyX-Code
 INPUT                                                OUTPUT
\end_layout

\begin_layout LyX-Code
 Pedigree    Person      Ped:       Per:    Loop id   Pedigree    Person
\end_layout

\begin_layout LyX-Code
         1          1        1          1                  1          1
\end_layout

\begin_layout LyX-Code
         1          2        1          2                  1          2
\end_layout

\begin_layout LyX-Code
         1          3        1          3                  1          3
\end_layout

\begin_layout LyX-Code
         1          4        1          4                  1          4
\end_layout

\begin_layout LyX-Code
         1          5        1          5                  1          5
\end_layout

\begin_layout LyX-Code
         1          6        1          6                  1          6
\end_layout

\begin_layout LyX-Code
         1          7        1          7                  1          7
\end_layout

\begin_layout LyX-Code
         1          8        1          8                  1          8
\end_layout

\begin_layout LyX-Code
         1          9        1          9                  1          9
\end_layout

\begin_layout LyX-Code
         1         10        1         10                  1         10
\end_layout

\begin_layout LyX-Code
         1         11        1         11                  1         11
\end_layout

\begin_layout LyX-Code
         2          1        2          1                  2          1
\end_layout

\begin_layout LyX-Code
         2          2        2          2                  2          2
\end_layout

\begin_layout LyX-Code
         2          3        2          3                  2          3
\end_layout

\begin_layout LyX-Code
         2          4        2          4                  2          4
\end_layout

\begin_layout LyX-Code
         2          5        2          5                  2          5
\end_layout

\begin_layout LyX-Code
         2          6        2          6                  2          6
\end_layout

\begin_layout LyX-Code
         2          7        2          7                  2          7
\end_layout

\begin_layout LyX-Code
         2          8        2          8     2            2          8
\end_layout

\begin_layout LyX-Code
         2         11        2          8     2            2          8
\end_layout

\begin_layout LyX-Code
         2          9        2          9                  2          9
\end_layout

\begin_layout LyX-Code
         2         10        2         10                  2         10
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Subsection
MEGA2.SIM 
\end_layout

\begin_layout Standard
This file is created if the user selects random-genotyping error generation
 in the input menu.
 Details on this file can be found in the Mistyping section .
 
\end_layout

\begin_layout Subsection
MEGA2.RECODE 
\end_layout

\begin_layout Standard
This file contains a list of recoded marker loci with the original allele
 names, recoded identifiers, allele frequencies, the type of individuals
 counted for the purpose of estimating allele frequencies, and total number
 of alleles counted for each allele and each marker.
 Given below is an excerpt for a recode summary file.
 
\end_layout

\begin_layout LyX-Code
----------------------------------------------
\end_layout

\begin_layout LyX-Code
        Mega2 version 3.0 R5
\end_layout

\begin_layout LyX-Code
Run date:                  2006-1-20-13-53
\end_layout

\begin_layout LyX-Code
This file created on       Fri Jan 20 13:53:20 2006
\end_layout

\begin_layout LyX-Code
Input file names
\end_layout

\begin_layout LyX-Code
  Locus file:              names.01
\end_layout

\begin_layout LyX-Code
  Pedigree file:           pedin.01
\end_layout

\begin_layout LyX-Code
  Map file:                map.01
\end_layout

\begin_layout LyX-Code
  Untyped pedigree option: Include all pedigrees whether typed or not
\end_layout

\begin_layout LyX-Code
Mendelianly-inconsistent genotypes included in output.
\end_layout

\begin_layout LyX-Code
Half-typed individuals' genotypes included in output.
\end_layout

\begin_layout LyX-Code
Allele frequency computed from:
\end_layout

\begin_layout LyX-Code
     Genotyped founders or a randomly chosen individual
\end_layout

\begin_layout LyX-Code
     excluding half-typed individuals.
\end_layout

\begin_layout LyX-Code
---------------------
\end_layout

\begin_layout LyX-Code
Recoded loci:
\end_layout

\begin_layout LyX-Code
---------------------------------------------
\end_layout

\begin_layout LyX-Code
Frequencies and counts:
\end_layout

\begin_layout LyX-Code
   1=Founders       2=1+Random       3=2+Unique     4=Everyone
\end_layout

\begin_layout LyX-Code
Marker 2: marker2 has 6 alleles; frequencies computed using 11 individuals:
\end_layout

\begin_layout LyX-Code
6 Founders and 5 randomly chosen individuals
\end_layout

\begin_layout LyX-Code
Allele  Code      Freq1     Count1  Freq2     Count2  Freq3     Count3 
 Freq4     Count4
\end_layout

\begin_layout LyX-Code
     1 10         0.25000        3  0.31818        7  0.31818        7  0.35714
       10
\end_layout

\begin_layout LyX-Code
     2 11         0.25000        3  0.13636        3  0.13636        3  0.10714
        3
\end_layout

\begin_layout LyX-Code
     3 12         0.25000        3  0.13636        3  0.13636        3  0.10714
        3
\end_layout

\begin_layout LyX-Code
     4 13         0.25000        3  0.31818        7  0.31818        7  0.35714
       10
\end_layout

\begin_layout LyX-Code
     5 14         0.00000        0  0.04545        1  0.04545        1  0.03571
        1
\end_layout

\begin_layout LyX-Code
     6 17         0.00000        0  0.04545        1  0.04545        1  0.03571
        1
\end_layout

\begin_layout LyX-Code
TOTAL                           12                22                22 
               28
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
Please note that Mega2 now computes and logs allele-frequencies for all
 4 subsets of individuals, but uses only the one specified by the user in
 the re-formatted output data files.
 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
hrule
\end_layout

\end_inset


\end_layout

\begin_layout Standard
At the start of the execution, existing error, log, key, and recode summary
 files are moved into MEGA2.ERR.old, MEGA2.LOG.old, MEGA2.KEYS.old and MEGA2.RECODE.old
 respectively.
 
\end_layout

\begin_layout Standard
The MEGA2.LOG and MEGA2.KEYS files are created each time Mega2 is executed.
 
\end_layout

\begin_layout Standard
The batch file MEGA2.BATCH is created only if Mega2 is run in the interactive
 mode.
 In this case the existing batch file is backed up into MEGA2.BATCH.old.
 
\end_layout

\begin_layout Standard
MEGA2.ERR is created only if there are warnings and messages for the current
 run.
 
\end_layout

\begin_layout Standard
MEGA2.SIM is created only in the error simulation mode.
 The existing MEGA2.SIM file is renamed into MEGA2.SIM.old.
 
\end_layout

\begin_layout Standard
MEGA2.RECODE is created only if a names file is used instead of a linkage
 format locus data file.
 
\end_layout

\begin_layout Subsection
MEGA2run.html and related files 
\begin_inset CommandInset label
LatexCommand label
name "sub:MEGA2run.html-and-related"

\end_inset


\end_layout

\begin_layout Standard
This file along with three other html files (MEGA2links.html, MEGA2outputfiles.htm
l, and MEGA2file.html) contains links to the relevant summary files, input
 and output files for easy reference.
 Please note this uses frames.
 In addition, the input and output files are all text files, but may not
 be recognized as such by the browser, unless its settings are modified.
 The run summary files point to links which are HTML-versions of the text
 format summaries, and should display correctly.
\end_layout

\begin_layout Standard
If you open the MEGA2run.html in a web-browser, it will provide you with
 a nicely organized view of the results of the most recent run of Mega2,
 with links to log files, input files, and output files.
\end_layout

\begin_layout Section
Mega2 command-line arguments 
\begin_inset CommandInset label
LatexCommand label
name "sec:Mega2-command-line-arguments"

\end_inset


\end_layout

\begin_layout Standard

\series bold
Usage:
\series default
\emph on
 mega2
\emph default
 [options] [batch-file-name] 
\end_layout

\begin_layout Subsection
Species options
\begin_inset CommandInset label
LatexCommand label
name "sub:Species-options"

\end_inset


\end_layout

\begin_layout Standard
Mega2 has modest support for different species.
 Its model is that all chromosomes up to some number are autosomes.
 The last autosome is then followed by sex chromosome, 
\begin_inset Quotes eld
\end_inset

X
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

Y
\begin_inset Quotes erd
\end_inset

, which have the next two numeric values.
 The pseudo XY chromosome number may be specified as well as the mitochondrial
 
\begin_inset Quotes eld
\end_inset

chromosome
\begin_inset Quotes erd
\end_inset

 (
\begin_inset Quotes eld
\end_inset

MT
\begin_inset Quotes erd
\end_inset

) number.
 For all chromosomes after the 
\begin_inset Quotes eld
\end_inset

last autosome
\begin_inset Quotes erd
\end_inset

, letter designations should be used in Mega2 files for clarity.
 Note: Mega2 reserves the letter designation 
\begin_inset Quotes eld
\end_inset

U
\begin_inset Quotes erd
\end_inset

 for an unknown chromosome.
\end_layout

\begin_layout LyX-Code
\begin_inset Tabular
<lyxtabular version="3" rows="7" columns="5">
<features rotate="0" tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
flag
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
species
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
last autosome
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
pseudo XY
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
mitochondrial
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-horse
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
horse
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
31
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-sheep
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
sheep
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
26
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-dog
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
dog
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
38
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
41
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-mouse
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
mouse
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
19
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-cow
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
cow
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
29
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
-
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-human
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
human
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
22
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
25
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
26
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
In addition, several flags allow the non-autosomal chromosomes to be specified:
\end_layout

\begin_layout LyX-Code
\begin_inset Tabular
<lyxtabular version="3" rows="4" columns="3">
<features rotate="0" tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="center" valignment="top">
<column alignment="left" valignment="top" width="4in">
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
flag
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
value
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
interpretation
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-autosome
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
chromosome
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
last autosomal chromosome number.
 The next two values are for 
\begin_inset Quotes eld
\end_inset

X
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

Y
\begin_inset Quotes erd
\end_inset

, respectively
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-pseudo
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
chromosome
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
chromosome number for pseudo XY region
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-mito
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
chromosome
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
chromosome number for mitochondrial DNA.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection

\series bold
Input format options 
\end_layout

\begin_layout Itemize

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset


\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
-mega2
\family default
\series default
\shape default
\size default
\emph default
\bar default
\strikeout default
\uuline default
\uwave default
\noun default
\color inherit

\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
	Mega2 format with header
\end_layout

\begin_layout Itemize

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset


\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
-linkage
\family default
\series default
\shape default
\size default
\emph default
\bar default
\strikeout default
\uuline default
\uwave default
\noun default
\color inherit

\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
	Linkage format
\end_layout

\begin_layout Itemize

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset


\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
-extend_linkage
\family default
\series default
\shape default
\size default
\emph default
\bar default
\strikeout default
\uuline default
\uwave default
\noun default
\color inherit

\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
	Linkage with Mega2 names file
\end_layout

\begin_layout Itemize

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset


\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
-bed
\family default
\series default
\shape default
\size default
\emph default
\bar default
\strikeout default
\uuline default
\uwave default
\noun default
\color inherit

\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
	PLINK binary PED format (bed)
\end_layout

\begin_layout Itemize

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset


\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
-ped
\family default
\series default
\shape default
\size default
\emph default
\bar default
\strikeout default
\uuline default
\uwave default
\noun default
\color inherit

\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
	PLINK PED format (ped)
\end_layout

\begin_layout Itemize

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset


\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
-bcf
\family default
\series default
\shape default
\size default
\emph default
\bar default
\strikeout default
\uuline default
\uwave default
\noun default
\color inherit

\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
	BCF format (vcf)-
\end_layout

\begin_layout Itemize

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset


\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
-vcf.gz
\family default
\series default
\shape default
\size default
\emph default
\bar default
\strikeout default
\uuline default
\uwave default
\noun default
\color inherit

\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
	VCF compressed format (vcf.gz)
\end_layout

\begin_layout Itemize

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset


\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
-vcf
\family default
\series default
\shape default
\size default
\emph default
\bar default
\strikeout default
\uuline default
\uwave default
\noun default
\color inherit

\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
	VCF format (vcf)
\end_layout

\begin_layout Subsection

\series bold
Missing Value options 
\end_layout

\begin_layout Standard
Several flags allow an override value to be supplied to specify the missing
 value code read as input or generated into output for the analysis program.
 Mega2 has rules that constrain the values; using these flags, allows you
 to break the built-in rules and enter any values you like.
\end_layout

\begin_layout LyX-Code
\begin_inset Tabular
<lyxtabular version="3" rows="5" columns="3">
<features rotate="0" tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="center" valignment="top">
<column alignment="left" valignment="top" width="4in">
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
flag
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
value
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
interpretation
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-quant_in
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
decimal number
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
override for batch item Value_Missing_Quant_On_Input and default for interactive
 menu for same item 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:value_missing"

\end_inset


\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-quant_out
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
decimal number
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
override for batch item Value_Missing_Quant_On_Output and default for interactiv
e menu for same item 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:value_missing"

\end_inset


\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-affect_in
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
integer number
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
override for batch item Value_Missing_Affect_On_Input and default for interactiv
e menu for same item 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:value_missing"

\end_inset


\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-affect_out
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
integer number
\end_layout

\end_inset
</cell>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
override for batch item Value_Missing_Affect_On_Output and default for interacti
ve menu for same item 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:value_missing"

\end_inset


\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection

\series bold
General options 
\end_layout

\begin_layout Itemize

\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-force_numeric_alleles
\emph default
 
\begin_inset CommandInset label
LatexCommand label
name "force_numeric_alleles_cmd_line"

\end_inset


\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 As of Mega2 version 4.7.1, if non-numeric alleles are found in the input,
 they will be passed through to the output and not recoded as numeric alleles.
 This is done for all input formats that allow letter alleles (i.e., all input
 formats except LINKAGE) and for the analysis options that support non-numeric
 alleles.
 To force the recoding of alleles to numeric alleles to take place, set
 this flag 
\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-force_numeric_alleles.
\end_layout

\begin_layout Itemize

\emph on
-x, -
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-nosave
\emph default
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Do not create a new run-folder.
 By default, Mega2 stores run-related summaries in a separate folder tagged
 with the date and time of the run (for details, see description of summary
 file directory ).
 The -x or 
\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
nosave option turns off this feature, and saves all run-related files with
 their default names in the folder from which Mega2 is run.
 
\end_layout

\begin_layout Itemize

\emph on
-w, -
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-noweb
\emph default
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Do not check for latest on-line version.
 From version 4.0 revision 1, we implemented an automatic check inside Mega2,
 which queries our distribution site to figure out whether the version being
 run is older than the released version.
 This requires that the computer is able to connect to the internet.
 This check may be turned off using the 
\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
noweb option.
 
\end_layout

\begin_layout Itemize

\emph on
-h, -
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-help
\emph default
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Prints the list of available command line options with short descriptions.
 
\end_layout

\begin_layout Itemize

\emph on
-v, -
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-version
\emph default
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Prints the mega2 version number.
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
Obsolete options
\end_layout

\begin_layout Itemize

\emph on
-nosave:
\emph default
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Note that the -nosave option is not valid any more.
 Mega2 will terminate with a message, if it matches any of its arguments
 to 
\begin_inset Quotes eld
\end_inset

-nosave
\begin_inset Quotes erd
\end_inset

.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection

\emph on
Other arguments
\emph default
 
\end_layout

\begin_layout Standard
The only other option accepted by Mega2 besides the switches listed above,
 is the batch file name.
 It checks to see that there is at most one such file name.
 If you mistakenly supplied one of the other valid options, Mega2 proceeds
 as normal.
\end_layout

\begin_layout Section
Running Mega2 in Batch mode
\begin_inset CommandInset label
LatexCommand label
name "sec:Batch-mode"

\end_inset


\end_layout

\begin_layout Subsection
Overview
\end_layout

\begin_layout Standard
Mega2 can be run in a batch-mode by invoking it with a single argument which
 is a batch file name: 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
> mega2 MEGA2.BATCH
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
This runs Mega2 in a non-interactive mode through the following steps: 
\end_layout

\begin_layout Itemize
Input Menu 
\end_layout

\begin_layout Itemize
Analysis Menu 
\end_layout

\begin_layout Itemize
Locus Reordering and Selection menu 
\end_layout

\begin_layout Itemize
Trait Selection Menu 
\end_layout

\begin_layout Itemize
Genotyping error simulation setup 
\end_layout

\begin_layout Itemize
Output file names menu 
\end_layout

\begin_layout Itemize
Input of default parameters
\end_layout

\begin_layout Standard
In the previous version, Mega2 started running in the interactive mode after
 the genotyping error simulation setup, and prompted the user to input analysis-
specific parameters, such as output file names etc.
 New batch file items have been implemented which makes user-interaction
 unnecessary for the bulk of the execution.
 Subsequent versions will be made fully automatic except for input data
 errors that cannot be ignored.
 
\end_layout

\begin_layout Standard
Each time you run Mega2 in interactive mode, a new batch file is created.
 This batch file is named MEGA2.BATCH, and the existing MEGA2.BATCH is moved
 into MEGA2.BATCH.old.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\end_layout

\begin_layout Subsection
Using the 
\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
nosave option 
\end_layout

\begin_layout Standard
The purpose of having a batch-execution mode is to enable Mega2 to be embedded
 within scripts, so as to be run automatically.
 A typical application of this feature would be running thousands of replicates
 of simulated data.
 In this case, mega2 should be run with the 
\emph on
-
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
/
\end_layout

\end_inset

-
\emph default
nosave (short option -x) option, so that summary files for each run are
 not saved in a separate directory as below: 
\end_layout

\begin_layout LyX-Code
         mega2 --nosave batch_file
\end_layout

\begin_layout LyX-Code
         mega2 -x batch_file
\end_layout

\begin_layout Standard
The online check for the latest release is automatically disabled in the
 batch mode.
 
\end_layout

\begin_layout Subsection
Batch file format 
\end_layout

\begin_layout Standard
The batch file is a text file which has a specific format.
 Each line is either a comment or a definition.
 Blank lines are ignored.
 Comment lines begin with a 
\series bold
#
\series default
 in the first column.
 A definition line has two parts, a name and a value.
 Each definition line is of the form: 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\emph on
Name=Value
\emph default
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Standard
Here is an example batch file 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
Input_Pedigree_File=pedin.06
\end_layout

\begin_layout LyX-Code
Input_Locus_File=datain.06
\end_layout

\begin_layout LyX-Code
Input_Map_File=map.06
\end_layout

\begin_layout LyX-Code
Input_Untyped_Ped_Option=2
\end_layout

\begin_layout LyX-Code
Input_Do_Error_Sim=0
\end_layout

\begin_layout LyX-Code
Analysis_Option=Solar
\end_layout

\begin_layout LyX-Code
Chromosome_Single=6
\end_layout

\begin_layout LyX-Code
Traits_Combine=8 9 10 11 12
\end_layout

\begin_layout LyX-Code
Value_Missing_Quant=-9.000000
\end_layout

\begin_layout LyX-Code
Output_Path=mega2_results
\end_layout

\begin_layout Subsection
Major classes of batch file options 
\end_layout

\begin_layout Standard
The batch file options are currently classified into 7 different classes
 which mirror the different menus of Mega2: 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Itemize
Input menu items 
\end_layout

\begin_deeper
\begin_layout Enumerate
Input_Format_Type
\end_layout

\begin_layout Enumerate
Input_Pedigree_File 
\end_layout

\begin_layout Enumerate
Input_Locus_File 
\end_layout

\begin_layout Enumerate
Input_Map_File 
\end_layout

\begin_layout Enumerate
Input_Omit_File 
\end_layout

\begin_layout Enumerate
Input_Untyped_Ped_Option
\end_layout

\begin_layout Enumerate
Input_Do_Error_Sim
\end_layout

\begin_layout Enumerate
Output_Path
\end_layout

\begin_layout Enumerate
Input_Frequency_File 
\end_layout

\begin_layout Enumerate
Input_Penetrance_File
\end_layout

\begin_layout Enumerate
Input_Binary_File
\end_layout

\begin_layout Enumerate
Input_Phenotype_File
\end_layout

\begin_layout Enumerate
Input_Aux_File
\end_layout

\begin_layout Enumerate
PLINK
\end_layout

\begin_layout Enumerate
VCF_Args
\end_layout

\begin_layout Enumerate
VCF_Marker_Alternative_INFO_Key
\end_layout

\end_deeper
\begin_layout Itemize
Analysis menu items 
\end_layout

\begin_deeper
\begin_layout Enumerate
Analysis_Option 
\end_layout

\begin_layout Enumerate
Analysis_Sub_option
\end_layout

\end_deeper
\begin_layout Itemize
Chromosome and marker selection items 
\end_layout

\begin_deeper
\begin_layout Enumerate
Chromosome_Single 
\end_layout

\begin_layout Enumerate
Chromosomes_Multiple_Num 
\end_layout

\begin_layout Enumerate
Chromosomes_Multiple
\end_layout

\begin_layout Enumerate
Loop_Over_Chromosomes
\end_layout

\begin_layout Enumerate
Loci_Selected_Num is no longer necessary 
\end_layout

\begin_layout Enumerate
Loci_Selected
\end_layout

\begin_layout Enumerate
Output map number
\end_layout

\begin_layout Enumerate
Value_Genetic_Distance_Index
\end_layout

\begin_layout Enumerate
Value_Base_Pair_Position_Index
\end_layout

\begin_layout Enumerate
Value_Genetic_Distance_SexTypeMap 
\end_layout

\end_deeper
\begin_layout Itemize
Trait-related items 
\end_layout

\begin_deeper
\begin_layout Enumerate
Trait_Single 
\end_layout

\begin_layout Enumerate
Traits_Loop_Over 
\end_layout

\begin_layout Enumerate
Traits_Combine 
\end_layout

\begin_layout Enumerate
Trait_Subdirs
\end_layout

\end_deeper
\begin_layout Itemize
Special phenotype and genotype indicators, i.e.
 missing quantitative phenotype, definition of affecteds (used only for
 multiple liability classes), and unknown allele and affection status indicators
 
\begin_inset CommandInset label
LatexCommand label
name "par:value_missing"

\end_inset


\end_layout

\begin_deeper
\begin_layout Enumerate
Value_Marker_Compression
\end_layout

\begin_layout Enumerate
Value_Missing_Quant_On_Input (formerly Value_Missing_Quant)
\end_layout

\begin_layout Enumerate
Value_Missing_Quant_On_Output
\end_layout

\begin_layout Enumerate
Value_Missing_Affect_On_Input
\end_layout

\begin_layout Enumerate
Value_Missing_Affect_On_Output
\end_layout

\begin_layout Enumerate
Value_Affecteds
\end_layout

\begin_layout Enumerate
Value_Missing_Allele_Aff
\end_layout

\end_deeper
\begin_layout Itemize
Mistyping simulation related items 
\end_layout

\begin_deeper
\begin_layout Enumerate
Error_Loci 
\end_layout

\begin_layout Enumerate
Error_Except_Loci 
\end_layout

\begin_layout Enumerate
Error_Loci_Num 
\end_layout

\begin_layout Enumerate
Error_Model 
\end_layout

\begin_layout Enumerate
Error_Probabilities
\end_layout

\end_deeper
\begin_layout Itemize
Default behavior related options 
\end_layout

\begin_deeper
\begin_layout Enumerate
Default_Outfile_Names 
\end_layout

\begin_layout Enumerate
Default_Reset_Invalid 
\end_layout

\begin_layout Enumerate
Default_Other_Values 
\end_layout

\begin_layout Enumerate
Default_Ignore_Nonfatal 
\end_layout

\begin_layout Enumerate
Default_Rplot_Options
\end_layout

\end_deeper
\begin_layout Itemize
Covariate selection items (for GeneHunter, SOLAR, Merlin) 
\end_layout

\begin_deeper
\begin_layout Enumerate
Covariates_Num 
\end_layout

\begin_layout Enumerate
Covariates_Selected
\end_layout

\end_deeper
\begin_layout Itemize
More options 
\end_layout

\begin_deeper
\begin_layout Enumerate
Xlinked_Analysis_Mode
\end_layout

\begin_layout Enumerate
Count_Genotypes 
\end_layout

\begin_layout Enumerate
Rplot_Statistics 
\end_layout

\begin_layout Enumerate
Count_Halftyped 
\end_layout

\begin_layout Enumerate
AlleleFreq_SquaredDev 
\end_layout

\begin_layout Enumerate
Count_HWE_genotypes
\end_layout

\begin_layout Enumerate
Value_Missing_Allele_Aff
\end_layout

\begin_layout Enumerate
Structure.PopDataPheno
\end_layout

\end_deeper
\begin_layout Paragraph
Special considerations 
\end_layout

\begin_layout Standard
The order in which these options appear in the batch file does not affect
 Mega2's behavior.
 Some options are dependent on the definition of others.

\series bold
 Each class is regarded as complete only if an adequate number of definitions
 in that class are provided.

\series default
 For example, in the Input menu items class, one has to have at least the
 three file names (pedigree, locus and map), the untyped-ped option and
 the error-simulation setup flag.
 If one or more of these are missing, Mega2 will stop and require the user
 to go through the input menu before proceeding through the other sections.
 These and other requirements are described below, and also in the batch
 file generated by Mega2.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Since the batch file is required to have a very specific format to run
 correctly, the user is advised to create several test runs in order to
 become familiar with different batch files.
 An existing batch file can then easily be adapted to create a new analysis,
 or a new set of markers, etc.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\end_layout

\begin_layout Subsection
Details on batch file items 
\end_layout

\begin_layout Paragraph
Input_Format_Type
\begin_inset CommandInset label
LatexCommand label
name "par:Input_Format_Type"

\end_inset


\end_layout

\begin_layout Standard
This item specifies the input file format type as follows:
\end_layout

\begin_layout Enumerate
Mega2 format with header
\end_layout

\begin_layout Enumerate
Linkage format
\end_layout

\begin_layout Enumerate
Linkage with Mega2 names file
\end_layout

\begin_layout Enumerate
PLINK binary PED format (bed)
\end_layout

\begin_layout Enumerate
PLINK PED format (ped)
\end_layout

\begin_layout Enumerate
BCF format (bcf)
\end_layout

\begin_layout Enumerate
VCF compressed format (vcf.gz)
\end_layout

\begin_layout Enumerate
VCF format (vcf)
\end_layout

\begin_layout Enumerate
Traditional (4.6.1) input file format
\end_layout

\begin_layout Paragraph
Input_Pedigree_File
\begin_inset CommandInset label
LatexCommand label
name "par:Input_Pedigree_File"

\end_inset


\end_layout

\begin_layout Standard
This item specifies the input pedigree file name.
 This is a required item.
 The value should be a string without any white-space characters.
 It will store the name of the pedigree file in 
\emph on
linkage, Mega2 and PLINK PED
\emph default
 input formats and the name of the 
\begin_inset Quotes eld
\end_inset

.fam
\begin_inset Quotes erd
\end_inset

 file for 
\emph on
PLINK Binary PED input
\emph default
.
\end_layout

\begin_layout Paragraph
Input_Map_File
\begin_inset CommandInset label
LatexCommand label
name "par:Input_Map_File"

\end_inset


\end_layout

\begin_layout Standard
This item specifies the name of the input map file.
 This is a required item.
 The value should be a string without white-space characters.
 It will store the map file in 
\emph on
linkage, Mega2 and PLINK PED
\emph default
 input formats and the 
\begin_inset Quotes eld
\end_inset

.bim
\begin_inset Quotes erd
\end_inset

 file for 
\emph on
PLINK Binary PED input
\emph default
.
 
\end_layout

\begin_layout Paragraph
Input_Locus_File
\begin_inset CommandInset label
LatexCommand label
name "par:Input_Locus_File"

\end_inset


\end_layout

\begin_layout Standard
This item specifies the name of the input locus data file.
 This is a required item for 
\emph on
linkage and Mega2 
\emph default
input format, but it is not used for either PLINK input format.
 The value should be a string without white-space characters.
 
\end_layout

\begin_layout Paragraph
Input_Binary_File
\begin_inset CommandInset label
LatexCommand label
name "par:Input_Binary_File"

\end_inset


\end_layout

\begin_layout Standard
This item specifies the name of the PLINK binary PED format file.
 The value should be a string without white-space characters.
 
\end_layout

\begin_layout Standard

\emph on
The first two file types above are always necessary and for PLINK PED format
 these two are sufficient.
 For Mega2 or linkage formats, the 
\series bold
Input_Locus_File
\series default
 must also be provided.
 While for PLINK binary PED files, the 
\series bold
Input_Binary_File
\series default
 must be present.
 Otherwise Mega2 will stop for user-input of the incomplete items at the
 Input menu.
 
\end_layout

\begin_layout Paragraph
Input_Omit_File
\begin_inset CommandInset label
LatexCommand label
name "par:Input_Omit_File"

\end_inset


\end_layout

\begin_layout Standard
This item specifies the input omit data file.
 This is an optional item.
 The value should be a string without white-space characters.
 
\end_layout

\begin_layout Paragraph
Input_Frequency_File
\begin_inset CommandInset label
LatexCommand label
name "par:Input_Frequency_File"

\end_inset


\end_layout

\begin_layout Standard
This item specifies the input allele frequency file name.
 This is an optional item for Mega2 and either PLINK format input files
 are used.
 The value should be a string without white-space characters.
 
\end_layout

\begin_layout Paragraph
Input_Penetrance_File
\begin_inset CommandInset label
LatexCommand label
name "par:Input_Penetrance_File"

\end_inset


\end_layout

\begin_layout Standard
This item specifies the input penetrance parameter file name.
 This is also an optional item, for Mega2 and either PLINK format input
 files are used.
 The value should be a string without white-space characters.
 
\end_layout

\begin_layout Paragraph
Input_Phenotype_File
\begin_inset CommandInset label
LatexCommand label
name "par:Input_Phenotype_File"

\end_inset


\end_layout

\begin_layout Standard
This item specifies the input phenotype file name.
 This is an optional item available for either PLINK format input files.
 The value should be a string without white-space characters.
 
\end_layout

\begin_layout Paragraph
Input_Aux_File
\begin_inset CommandInset label
LatexCommand label
name "par:Input_Aux_File"

\end_inset


\end_layout

\begin_layout Standard
This item specifies the input auxiliary file name.
 This is an optional item available for either VCF format input files.
 The value should be a string without white-space characters.
 
\end_layout

\begin_layout Paragraph
PLINK
\begin_inset CommandInset label
LatexCommand label
name "par:PLINK_Args"

\end_inset


\end_layout

\begin_layout Standard
This parameter is for either PLINK input formats.
 It has an odd format as white space separated strings.
 The strings consist of flags and values as illustrated in section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:PLINK-parameters"

\end_inset

.
\end_layout

\begin_layout Paragraph
VCF_Args
\begin_inset CommandInset label
LatexCommand label
name "par:VCF_Args"

\end_inset


\end_layout

\begin_layout Standard
This parameter is for any VCF file format.
 It is used to specify a subset of the command line options supported by
 the 'vcftools' program.
 These are command line options are (See 
\begin_inset CommandInset href
LatexCommand href
name "VCFtools Options"
target "http://vcftools.sourceforge.net/options.html"

\end_inset

) the: Site Filtering Options, the Individual Filters, and the Genotype
 Filters.
\end_layout

\begin_layout Paragraph
VCF_Marker_Alternative_INFO_Key
\begin_inset CommandInset label
LatexCommand label
name "par:VCF_Marker_Alternative_INFO_Key"

\end_inset


\end_layout

\begin_layout Standard
The marker can be specified as the string associated with the 'ID' field
 of the VCF file, or as the value associated with a key in the 'INFO' field.
 If the user specifies a key (not null) then only the INFO field will be
 used, otherwise only the 'ID' field will be used.
 One or the other is used, never switching between them.
\end_layout

\begin_layout Standard
If from this the string value is a '.' (unknown) then the marker will be
 constructed from a prefix ('chr') appending it to the CHROM and POS VCF
 file field values in the following way (chrCHROM_POS).
 This is not guaranteed to be unique since the VCF file specification allows
 multiple records to have the same POS.
 In the construction of this marker name 'X', 'Y', 'XY', and 'MT' will be
 used rather than the associated numbers for the chromosomes.
 This is done in accordance to the species option (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Species-options"

\end_inset

) that Mega2 is told to use.
\end_layout

\begin_layout Paragraph
Input_Untyped_Ped_Option
\begin_inset CommandInset label
LatexCommand label
name "par:Input_Untyped_Ped_Option"

\end_inset


\end_layout

\begin_layout Standard
This item specifies the handling of marker-untyped pedigrees.
 This is also a necessary item.
 The value should be an integer greater than or equal to 1.
 Values 1-3 select one of the first 3 options of the Untyped pedigree option
 menu .
 Values 4 and onwards refer to the minimum number of the typed persons in
 a pedigree in order for it to be included in the analysis.
 
\begin_inset Newline newline
\end_inset

 4 corresponds to at least 1 typed person 
\begin_inset Newline newline
\end_inset

 5 corresponds to at least 2 typed persons 
\begin_inset Newline newline
\end_inset

 and so on, i.e.
 included pedigrees must have at least
\emph on
 
\begin_inset Formula $<$
\end_inset

value
\begin_inset Formula $>$
\end_inset

 - 3
\emph default
 typed persons.
 
\end_layout

\begin_layout Paragraph
Input_Do_Error_Sim
\begin_inset CommandInset label
LatexCommand label
name "par:Input_Do_Error_Sim"

\end_inset


\end_layout

\begin_layout Standard
This option is decides whether Mega2 should execute the random genotyping
 error simulation step.
 Valid values are 
\emph on

\begin_inset Quotes eld
\end_inset

yes/no
\begin_inset Quotes erd
\end_inset


\emph default
 .
 
\end_layout

\begin_layout Paragraph
Output_Path
\begin_inset CommandInset label
LatexCommand label
name "par:Output_Path"

\end_inset


\end_layout

\begin_layout Standard
This option decides which directory to create the output files in.
 The value is a string which should be a valid path-name (absolute or relative
 path) or 
\begin_inset Quotes eld
\end_inset

.
\begin_inset Quotes erd
\end_inset

 which is the current directory.
 This is the default value.
 White space is not allowed within the path-name.
 
\end_layout

\begin_layout Paragraph
Analysis_Option
\begin_inset CommandInset label
LatexCommand label
name "par:Analysis_Option"

\end_inset


\end_layout

\begin_layout Standard
Valid strings identifying an analysis option are listed below.
 The analysis option string is case insensitive.
 
\end_layout

\begin_layout Enumerate
SimWalk2
\end_layout

\begin_layout Enumerate
Mendel
\end_layout

\begin_layout Enumerate
Aspex
\end_layout

\begin_layout Enumerate
GeneHunter-Plus
\end_layout

\begin_layout Enumerate
GeneHunter
\end_layout

\begin_layout Enumerate
APM is disabled.
 
\end_layout

\begin_layout Enumerate
APM-Mult is disabled.
 
\end_layout

\begin_layout Enumerate
Nuclear families
\end_layout

\begin_layout Enumerate
Slink
\end_layout

\begin_layout Enumerate
Splink
\end_layout

\begin_layout Enumerate
Homogeneity
\end_layout

\begin_layout Enumerate
Simulate
\end_layout

\begin_layout Enumerate
Summary
\end_layout

\begin_layout Enumerate
S.A.G.E.3.0
\end_layout

\begin_layout Enumerate
TDT-max is disabled.
 
\end_layout

\begin_layout Enumerate
SOLAR
\end_layout

\begin_layout Enumerate
Vitesse
\end_layout

\begin_layout Enumerate
Linkage
\end_layout

\begin_layout Enumerate
Hardy-Weinberg
\end_layout

\begin_layout Enumerate
Allegro
\end_layout

\begin_layout Enumerate
MLBQTL
\end_layout

\begin_layout Enumerate
S.A.G.E.4.0
\end_layout

\begin_layout Enumerate
Premakeped
\end_layout

\begin_layout Enumerate
Merlin/SimWalk2
\end_layout

\begin_layout Enumerate
Prest
\end_layout

\begin_layout Enumerate
PAP
\end_layout

\begin_layout Enumerate
Merlin
\end_layout

\begin_layout Enumerate
Loki
\end_layout

\begin_layout Enumerate
Mendel7+
\end_layout

\begin_layout Enumerate
SUP
\end_layout

\begin_layout Enumerate
PLINK
\end_layout

\begin_layout Enumerate
CRANEFOOT
\end_layout

\begin_layout Enumerate
Mega2
\end_layout

\begin_layout Enumerate
IQLS/Idcoefs
\end_layout

\begin_layout Enumerate
FBAT
\end_layout

\begin_layout Enumerate
PANGAEA MORGAN
\end_layout

\begin_layout Enumerate
Beagle
\end_layout

\begin_layout Enumerate
Eigenstrat
\end_layout

\begin_layout Enumerate
Structure
\end_layout

\begin_layout Enumerate
PSEQ
\end_layout

\begin_layout Paragraph
Analysis_Sub_option 
\begin_inset CommandInset label
LatexCommand label
name "par:Analysis_Sub_option"

\end_inset


\end_layout

\begin_layout Standard
This option allows the user to choose between a file output format or sub-progra
m for a particular analysis option.
 For example, for SimWalk2 analysis the user must select from among 5 sub-option
s, Haplotyping, Parametric linkage, Nonparametric linkage, IBD estimation,
 and Mistyping detection.
 The analysis options are listed below along with their valid Analysis_Sub_optio
ns.
\end_layout

\begin_layout Quotation
\begin_inset Tabular
<lyxtabular version="3" rows="38" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Analysis
\series default
 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Analysis_Sub_option
\series default
 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SimWalk2 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Haplotype (1) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Parametric linkage (2) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Nonparametric linkage (3) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
IBD estimation (4) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Mistyping detection (5) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Aspex 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Sib-ibd (1) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Sib-tdt(2) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Sib-phase (3) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Sib-map (4) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Summary 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Segregation count (1) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Allele frequency (2) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Liability (3) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Genotyping success (4) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Quantitative phenotypes (5) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Vitesse 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
LINKMAP (1) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
MLINK (2) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Test for Hardy-Weinberg 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Gen (1) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
HWE (2) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Chi-sq (3) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Exact (4) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Mendel (5) 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
PLINK
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
lgen (1)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
SNP major binary (2)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Individual major binary (3)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
ped (4)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Beagle
\begin_inset CommandInset label
LatexCommand label
name "Beagle"

\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Unphased_Unrelated (1)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Unphased_Trio (2)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Unphased_Pair (2)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Eigenstrat
\begin_inset CommandInset label
LatexCommand label
name "Eigenstrat"

\end_inset


\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
PACKEDPED
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
PED
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
PANGAEA MORGAN
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
pedcheck(1)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
kinship(2)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
translink(3)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
lm_linkage(4)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
lm_bayes(5)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
lm_ibdtests(6)
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
lm_ibdtests_lr(7)
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Paragraph
Chromosome_Single 
\end_layout

\begin_layout Standard
This option refers to the locus reordering menu option 1.
 It refers to the chromosome selected for analysis.
 If item 
\series bold
12
\series default
 below is specified as well, then the marker numbers specified by 
\series bold
12
\series default
 refer to markers on the chromosome specified by this option.
 The value should be a single integer.
 The validity of the chromosome is decided after the locus data file and
 map file are read in, and the chromosome numbers present within the input
 data are known.
\begin_inset Newline newline
\end_inset

 If there are no chromosomal markers, then this item is ignored, and the
 user is required to provide loci numbers using the Loci_Selected keyword.
 
\end_layout

\begin_layout Paragraph
Chromosomes_Multiple_Num 
\begin_inset CommandInset label
LatexCommand label
name "par:Chromosomes_Multiple_Num"

\end_inset


\end_layout

\begin_layout Standard
This option is a single integer which decides how many chromosome numbers
 should be read in option 11.
 Valid values are positive integers.
 This option is necessary for option Chromosomes_Multiple
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Chromosomes_Multiple"

\end_inset

 to work, otherwise Mega2 will report an error in the batch-file and terminate.
 
\end_layout

\begin_layout Paragraph
Chromosomes_Multiple 
\begin_inset CommandInset label
LatexCommand label
name "par:Chromosomes_Multiple"

\end_inset


\end_layout

\begin_layout Standard
This option specifies which chromosomes should be selected for output.
 It should be a list of integers, each being a chromosome number present
 in the input data (as decided by the map and locus data files).
 In addition to integers the values 'X', 'Y', 'XY', and 'MT' are also valid.
 This option also requires that the batch file option Chromosomes_Multiple_Num
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Chromosomes_Multiple_Num"

\end_inset

 be specified.
 There must be at least as many chromosome numbers in this list as specified
 in option Chromosomes_Multiple_Num.
 
\end_layout

\begin_layout Standard
For the three options 8-10, if option 8 is specified, the others are ignored.
 
\end_layout

\begin_layout Paragraph
Loop_Over_Chromosomes
\begin_inset CommandInset label
LatexCommand label
name "par:Loop_Over_Chromosomes"

\end_inset


\end_layout

\begin_layout Standard
This option specifies whether data from multiple chromosomes are written
 to the same file or not.
 If true (y), each chromosome gets its own file.
 If false (n) only one file is produced which contains data for all chromosomes.
\end_layout

\begin_layout Paragraph
Loci_Selected 
\end_layout

\begin_layout Standard
Important: From version 3.0 onwards, the keyword Markers_Selected_Num has
 been decommissioned, and the keyword Markers_Selected is now Loci_Selected.
 If the old keywords appear within the batch file, they will be ignored.
 
\begin_inset Newline newline
\end_inset

 The Loci_Selected option specifies the marker numbers to be selected for
 analysis.
 As mentioned in option 9, these markers refer to the ones present on the
 chromosome number specified in option 9.
 Whether these markers are valid can only be decided after marker data has
 been read in.
\begin_inset Newline newline
\end_inset

 The list of markers have to be terminated with 
\begin_inset Quotes eld
\end_inset

e
\begin_inset Quotes erd
\end_inset

.
 
\end_layout

\begin_layout Paragraph
Value_Genetic_Distance_Index 
\begin_inset CommandInset label
LatexCommand label
name "par:Map_Index"

\end_inset


\end_layout

\begin_layout Standard
This item specifies which genetic map to use for analysis.
 The index is zero based.
 Maps are numbered in the order that they are first discovered in the map
 file, reading from left to right.
\end_layout

\begin_layout Standard
As an example, if the input map file is that discussed in 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Annotated-map-file"

\end_inset

, then map ‘M’ would be represented by an index value of 0, map ‘M2’ by
 an index value of 1, map ‘M3’ by an index value of 2, and map ‘M4’ by an
 index value of 3.
 Since only map ‘M’ and ‘M4’ are genetic maps, valid values for the 'Value_Genet
ic_Distance_Index' are 0 and 3.
\end_layout

\begin_layout LyX-Code
Chromosome M.h.a    Name   M.h.m   M2.p    M.h.f  M3.p   M4.k.a   M4.k.m
\end_layout

\begin_layout LyX-Code
1          0.0     rs101   0.0     543     0.0    304    0.0       0.0 
\end_layout

\begin_layout LyX-Code
1          5.0     rs102   2.0     678     7.0    821    5.0       2.0 
\end_layout

\begin_layout LyX-Code
X          0.0     rs231   0.0     743     0.0    912    0.0       0.0 
\end_layout

\begin_layout LyX-Code
X          4.0     rs232   1.0     862     6.0    954    4.0       0.0 
\end_layout

\begin_layout Paragraph
Value_Genetic_Distance_SexTypeMap
\begin_inset CommandInset label
LatexCommand label
name "par:Value_Genetic_Distance_SexTypeMa"

\end_inset

 
\end_layout

\begin_layout Standard
This item specifies the map type to be used from the selected genetic map.
 For a sex-averaged map the value is 0, for a sex_specific map the value
 is 1, for a female map the value is 2.
\end_layout

\begin_layout Paragraph
Value_Base_Pair_Position_Index
\begin_inset CommandInset label
LatexCommand label
name "par:Value_Base_Pair_Position_Index"

\end_inset

 
\end_layout

\begin_layout Standard
This item specifies the physical map to use for analysis.
 The index is zero based.
 If no physical map is to be used for analysis, an index value of -2 is
 used.
 Maps are numbered in the order that they are first discovered in the map
 file, reading left to right.
 As an example, if the input map file is that discussed in 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Annotated-map-file"

\end_inset

, then map ‘M’ would be represented by an index value of 0, map ‘M2’ by
 an index value of 1, map ‘M3’ by an index value of 2, and map ‘M4’ by an
 index value of 3.
 Since only map ‘M2’ and ‘M3’ are physical maps valid values for 'Value_Base_Pai
r_Position_Index' would include 1, 2, and also -2 (none).
 
\end_layout

\begin_layout LyX-Code
Chromosome M.h.a    Name   M.h.m   M2.p    M.h.f  M3.p   M4.k.a   M4.k.m
\end_layout

\begin_layout LyX-Code
1          0.0     rs101   0.0     543     0.0    304    0.0       0.0 
\end_layout

\begin_layout LyX-Code
1          5.0     rs102   2.0     678     7.0    821    5.0       2.0 
\end_layout

\begin_layout LyX-Code
X          0.0     rs231   0.0     743     0.0    912    0.0       0.0 
\end_layout

\begin_layout LyX-Code
X          4.0     rs232   1.0     862     6.0    954    4.0       0.0 
\end_layout

\begin_layout Paragraph
Trait_Single
\begin_inset CommandInset label
LatexCommand label
name "par:Trait_Single"

\end_inset


\end_layout

\begin_layout Standard
This option corresponds to the menu option 1 of the Trait reordering menu.
 It should be a positive integer, referring to the list of trait loci present
 in the input data.
 Trait loci are numbered 1 - N (the total number of trait loci) in order
 of their appearance in the locus data file.
\begin_inset Newline newline
\end_inset

 For example, if the locus data file lists loci 10-12 as 
\begin_inset Quotes eld
\end_inset

trait1
\begin_inset Quotes erd
\end_inset

 through 
\begin_inset Quotes eld
\end_inset

trait3
\begin_inset Quotes erd
\end_inset

, specifying a 
\begin_inset Quotes eld
\end_inset

1
\begin_inset Quotes erd
\end_inset

 in this option selects 
\begin_inset Quotes eld
\end_inset

trait1
\begin_inset Quotes erd
\end_inset

 and so on.
 
\end_layout

\begin_layout Paragraph
Traits_Loop_Over
\begin_inset CommandInset label
LatexCommand label
name "par:Traits_Loop_Over"

\end_inset


\end_layout

\begin_layout Standard
This option corresponds to the menu item 2 of the trait reordering menu
 where traits are selected to be analyzed one at a time.
 Trait numbers should correspond to the order in which they are listed in
 the locus file, starting from 1 (as in option 14).
 
\end_layout

\begin_layout Paragraph
Traits_Combine
\begin_inset CommandInset label
LatexCommand label
name "par:Traits_Combine"

\end_inset


\end_layout

\begin_layout Standard
This option corresponds to the menu item 3 of the trait reordering menu
 where trait loci are selected to be combined in the same output.
 The actual trait numbers should correspond to the order in which traits
 appear in the locus file, and these numbers can be permuted for the purpose
 of reordering them in the output.
 There should also be an item numbered 
\emph on
N + 1
\emph default
 where N is the number of traits.
 This item refers to the [MARKERS] item displayed in the trait selection
 menu-option 3.
 
\begin_inset Newline newline
\end_inset

 For options 13, 15 and 16, option 13 takes precedence over the other items,
 and option 15 takes precedence over option 16 i.e.
 if both 
\begin_inset Quotes eld
\end_inset

Trait_Single
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

Traits_Loop_Over
\begin_inset Quotes erd
\end_inset

 are defined then the latter is ignored.
 
\end_layout

\begin_layout Paragraph
Trait_Subdirs
\begin_inset CommandInset label
LatexCommand label
name "par:Trait_Subdirs"

\end_inset


\end_layout

\begin_layout Standard
These are trait-specific directories in which output files are created if
 the Traits_Loop_Over option is defined.
 The value is a list of strings separated by white-space in a single line.
 The number of directory names read in depend on option 14.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\end_layout

\begin_layout Paragraph
Value_Marker_Compression
\begin_inset CommandInset label
LatexCommand label
name "par:Value_Marker_Compression"

\end_inset


\end_layout

\begin_layout Standard
This is an integer value: 1, 2, or 3.
 The default value is 1.
 In this case, each pair of alleles is represented internally with two bits,
 the same as the PLINK compressed binary 'bed' representation.
 This technique does not provide enough space to represent microsatellite
 markers or half-typed genotypes.
 For these data sets, the compression value of 2 should be adequate.
 It provides for up to 256 alleles.
 The compression value of 3 is left for historical comparisons - it should
 never be necessary.
\end_layout

\begin_layout Paragraph
Value_Missing_Quant_On_Input (Value_Missing_Quant is deprecated) 
\end_layout

\begin_layout Standard
If the list of trait loci selected include one or more quantitative traits
 or covariates, then this value is interpreted as the missing value code
 in the input data.
 The value should be a real number or the string 'NA'.
 In previous versions of Mega2 this item was Value_Missing_Quant, which
 still can be used but is not guaranteed to be supported in future versions
 of Mega2.
\end_layout

\begin_layout Paragraph
Value_Missing_Quant_On_Output
\begin_inset CommandInset label
LatexCommand label
name "par:Value_Missing_Quant_On_Output"

\end_inset


\end_layout

\begin_layout Standard
If the list of trait loci that will be output include one or more quantitative
 traits or covariates, then this value is used as the missing quantitative
 phenotype value in the output data for those analysis modes where missing
 values are not predefined (e.g., Merlin uses 'x' for its output missing value).
\end_layout

\begin_layout Paragraph
Value_Missing_Affect_On_Input
\end_layout

\begin_layout Standard
This value is interpreted as the missing value code for affection status
 traits in the input data.
 The value may be string 'NA'.
 PLINK uses -9 as the default missing value indicator and also allows you
 to change it via a flag (missing-phenotype) which Mega2 also honors.
 If it is not specified, the value for Value_Missing_Quant_On_Input is used.
\end_layout

\begin_layout Paragraph
Value_Missing_Affect_On_Output
\end_layout

\begin_layout Standard
This value is used as the missing phenotype value for affection status in
 the output data for those analysis modes where missing values are not predefine
d (e.g., Merlin uses 'x').
 If it is not specified, the value for Value_Missing_Quant_On_Output is
 used.
\end_layout

\begin_layout Paragraph
Value_Affecteds
\begin_inset CommandInset label
LatexCommand label
name "par:Value_Affecteds"

\end_inset


\end_layout

\begin_layout Standard
If any of the affection loci selected have more than one liability class,
 then this value refers to the list of 
\begin_inset Formula $<$
\end_inset

status
\begin_inset Formula $>$
\end_inset

-
\begin_inset Formula $<$
\end_inset

class
\begin_inset Formula $>$
\end_inset

 pairs which should be considered affected.
 
\begin_inset Newline newline
\end_inset

 The value should contain one entry per multiple-liability trait, with white-spa
ce separating each entry.
 Each entry specifies the trait name followed by the list of affection labels,
 and looks like the following: 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
ValueAffecteds=TRAIT:2-1,2-3 trt2:2-*
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
The 
\begin_inset Quotes eld
\end_inset

*
\begin_inset Quotes erd
\end_inset

 denotes a wild-card e.g., 2-* means status 2 and all classes.
 Similarly 
\begin_inset Quotes eld
\end_inset

*-1
\begin_inset Quotes erd
\end_inset

 would mean all known phenotypes in liability class 1 should be treated
 as being affected.
 Please also consult the affection label definition menu.
 
\end_layout

\begin_layout Paragraph
Error_Loci 
\end_layout

\begin_layout Standard
These and the following options are used by the genotyping error simulation
 module of Mega2.
 This option defines a set of locus numbers at which random genotyping errors
 will be introduced.
 These should be a subset of the marker loci chosen in the locus reordering
 step.
 The number of loci read in depends on option 23.
 The locus numbers are selected from all the loci selected in the reordering
 step.
 
\end_layout

\begin_layout Paragraph
Error_Except_Loci 
\end_layout

\begin_layout Standard
If this option is defined instead of option 21, this list of loci is excepted
 from errors.
 The number of loci read in also depends on option 23 and locus numbers
 refer to the full list of loci selected in the locus-reordering step.
 
\end_layout

\begin_layout Paragraph
Error_Loci_Num 
\end_layout

\begin_layout Standard
The value of this option is a single integer denoting how many markers to
 read in from options 21 or 22.
 It should be a positive integer.
 
\end_layout

\begin_layout Paragraph
Error_Model 
\end_layout

\begin_layout Standard
This option specifies the error model to use in error simulation.
 This should be a single character, 
\emph on

\begin_inset Quotes eld
\end_inset

u
\begin_inset Quotes erd
\end_inset

 or 
\begin_inset Quotes eld
\end_inset

U
\begin_inset Quotes erd
\end_inset


\emph default
 , 
\emph on

\begin_inset Quotes eld
\end_inset

m
\begin_inset Quotes erd
\end_inset

 or 
\begin_inset Quotes eld
\end_inset

M
\begin_inset Quotes erd
\end_inset


\emph default
 , 
\emph on

\begin_inset Quotes eld
\end_inset

s
\begin_inset Quotes erd
\end_inset

 or 
\begin_inset Quotes eld
\end_inset

S
\begin_inset Quotes erd
\end_inset


\emph default
 .
 They refer to the Uniform error probability model, Marker-specific uniform
 error probability model, and the SimWalk2 error model respectively.
 
\end_layout

\begin_layout Paragraph
Error_Probabilities 
\end_layout

\begin_layout Standard
This option specifies the prior genotyping error probability or probabilities
 for error simulation.
 It should be a single real value, if the model specified in option 24 is
 
\begin_inset Quotes eld
\end_inset

Uniform
\begin_inset Quotes erd
\end_inset

, or a list of 5 real values, if the 
\begin_inset Quotes eld
\end_inset

SimWalk2
\begin_inset Quotes erd
\end_inset

 error model is specified.
 Marker-specific error probabilities can only be specified in the map file.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\end_layout

\begin_layout Paragraph
Default_Outfile_Names 
\end_layout

\begin_layout Standard
If set to
\emph on
 yes
\emph default
 , the output file-names menu will be skipped for all options.
 In addition to file names, some of these menus also contain options for
 selecting pedigree and person identifiers in the output files, these will
 be set to default values as well.
 
\end_layout

\begin_layout Paragraph
Default_Reset_Invalid
\begin_inset CommandInset label
LatexCommand label
name "par:Default_Reset_Invalid"

\end_inset


\end_layout

\begin_layout Standard
This option defines how invalid genotypes should be handled without pausing
 for user-input via the invalid-genotypes menu (which is skipped).
 If set to
\emph on
 yes
\emph default
 the genotypes will be reset to unknowns, and if set to
\emph on
 no
\emph default
 invalid genotypes will not be reset.
 
\end_layout

\begin_layout Paragraph
Default_Other_Values
\begin_inset CommandInset label
LatexCommand label
name "par:Default_Other_Values"

\end_inset


\end_layout

\begin_layout Standard
If set to 
\emph on
yes
\emph default
 Mega2's default value settings will be used for miscellaneous parameters
 within various options (such as random seed for simulate), and Mega2 will
 skip the input menus meant for those parameters.
 This has not been completely implemented yet, so Mega2 may still halt and
 ask for input.
 
\end_layout

\begin_layout Paragraph
Default_Ignore_Nonfatal
\begin_inset CommandInset label
LatexCommand label
name "par:Default_Ignore_Nonfatal"

\end_inset


\end_layout

\begin_layout Standard
If set to 
\emph on
yes
\emph default
 Mega2 will not halt for user-input on whether to continue execution if
 non-critical inconsistencies are found in the input data such as extra
 locus names in map file or locus file.
 Otherwise, it will halt for user-input upon encountering such inconsistencies.
 
\end_layout

\begin_layout Paragraph
Default_Rplot_Options
\begin_inset CommandInset label
LatexCommand label
name "par:Default_Rplot_Options"

\end_inset


\end_layout

\begin_layout Standard
If set to
\emph on
 yes
\emph default
 , Mega2 will skip the Rplot parameters menu and use its default values
 instead for options that set up R plots.
 
\end_layout

\begin_layout Paragraph
Xlinked_Analysis_Mode
\begin_inset CommandInset label
LatexCommand label
name "par:Xlinked_Analysis_Mode"

\end_inset


\end_layout

\begin_layout Standard
This value can be 0, 1, or 2 depending on how the data should be analyzed:
 0 indicates that all data should be treated as autosomal, 1 indicates that
 all data should be considered sex-linked, and 2 implies that the data is
 a mixture of autosomal and x-linked loci.
 Markers on the SEX-CHROMOSOME, set to 23 by default in Mega2 should be
 treated as X-linked, whereas loci on all other chromosomes will be considered
 autosomal.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Paragraph
Covariates_Selected 
\end_layout

\begin_layout Standard
The trait loci defined in this keyword are output as covariates for the
 GeneHunter format option.
 In future releases, we plan to include more options that make use of this
 keyword.
 
\end_layout

\begin_layout Paragraph
Count_Genotypes
\begin_inset CommandInset label
LatexCommand label
name "par:Count_Genotypes"

\end_inset


\end_layout

\begin_layout Standard
This item is used in Mega2's Recode facility, and refers to which individuals
 are counted for the purpose of estimating allele frequencies.
 The values correspond to the choices in the Individuals selection menu.
\end_layout

\begin_layout Enumerate
Genotyped founders only
\end_layout

\begin_layout Enumerate
Genotyped founders + a randomly chosen genotyped person from pedigrees without
 genotyped founders.
\end_layout

\begin_layout Enumerate
Genotyped founders + genotyped individuals with unique alleles
\end_layout

\begin_layout Enumerate
All genotyped individuals (default)
\end_layout

\begin_layout Paragraph
Rplot_Statistics 
\end_layout

\begin_layout Standard
This is a list of numbers that refer to the list of statistics that are
 to be plotted within SimWalk2-NPL, Merlin-SimWalk2, Merlin and Allegro.
 Please refer to the individual analysis options for a list of statistics
 that are supported.
 The numbers match with the statistics menu displayed in the interactive
 mode.
 
\end_layout

\begin_layout Paragraph
Count_Halftyped 
\end_layout

\begin_layout Standard
Starting with the R5 revision of Mega2 version 3, the inclusion of half-typed
 individuals within the recoding process is optional.
 Setting this to yes means that individuals who are typed only at one allele
 are considered to be 
\begin_inset Quotes eld
\end_inset

genotyped
\begin_inset Quotes erd
\end_inset

, and counted in the allele frequency computation if they otherwise fall
 within one of the individual selection categories given in the 
\begin_inset Quotes eld
\end_inset

Individual Selections
\begin_inset Quotes erd
\end_inset

 menu.
\begin_inset Newline newline
\end_inset

 Please note that setting this to 
\begin_inset Quotes eld
\end_inset

yes
\begin_inset Quotes erd
\end_inset

 does not imply that they will also be included in the output files.
 This latter choice is made in the 
\begin_inset Quotes eld
\end_inset

Invalid genotypes
\begin_inset Quotes erd
\end_inset

 menu after error-checking of the data .
 The corresponding batch item is Default_Reset_Invalid
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Default_Reset_Invalid"

\end_inset

.
 
\end_layout

\begin_layout Paragraph
AlleleFreq_SquaredDev 
\end_layout

\begin_layout Standard
This is a real value which is used to decide whether input allele-frequencies
 are different from that observed in the data for any marker locus.
 If the sum of squared deviation for all alleles of a marker exceeds the
 specified value, the user is notified and prompted whether Mega2 should
 be terminated.
 Setting this value to a very large number, or setting Default_Reset_Invalid
 should prevent Mega2 from halting for user-input in the batch mode.
 
\end_layout

\begin_layout Paragraph
Count_HWE_genotypes 
\end_layout

\begin_layout Standard
This is similar to the 
\begin_inset Quotes eld
\end_inset

Count_Genotypes
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Count_Genotypes"

\end_inset


\begin_inset Quotes erd
\end_inset

 item, however, only considered within the HWE estimation option of Mega2.
 Refer to the HWE option details for what the value should be.
 
\end_layout

\begin_layout Paragraph
Value_Missing_Allele_Aff 
\end_layout

\begin_layout Standard
The Mega2 map file allows the user to also specify the indicator for unknown
 allele and affection status values.
 This is again an optional item, and used only if Mega2 format input files
 are used.
 
\end_layout

\begin_layout Paragraph
Structure.PopDataPheno
\begin_inset CommandInset label
LatexCommand label
name "par:Structure.PopDataPheno"

\end_inset


\end_layout

\begin_layout Standard
Structure allows the user to specify a user-defined population for each
 individual; when this option is used, Structure expects each individual
 to be assigned an integer code representing their population.
 In Mega2, this information can be stored in a quantitative trait column
 in the pedigree file.
 This batch file item Structure.PopDataPheno specifies the name of the quantitati
ve trait containing the population assignments for each individual.
 Only the integer portion will be used as the population group IDs, and
 an error will be generated if any of the values are negative.
 
\end_layout

\begin_layout Standard

\series bold
OBSOLETE OPTIONS
\series default
 [Updated]
\begin_inset Newline newline
\end_inset

 The following batch file keywords are obsolete.
 If these are present in the batch file, they will be ignored and Mega2
 will warn the user of their presence.
 
\end_layout

\begin_layout Itemize
Markers_Selected, use Loci_Selected instead 
\end_layout

\begin_layout Itemize
Loci_Selected_Num, Markers_Selected_Num, Covariates_Selected_Num 
\end_layout

\begin_layout Itemize
Default_Ignore_Xlinked 
\end_layout

\begin_layout Itemize
Traits_Num
\end_layout

\begin_layout Itemize
Output_Map_Number
\end_layout

\begin_layout Itemize
Value_Missing_Quant, use Value_Missing_Quant_On_Input instead
\end_layout

\begin_layout Section
Hints and troubleshooting
\begin_inset CommandInset label
LatexCommand label
name "sec:Hints-and-troubleshooting"

\end_inset


\end_layout

\begin_layout Subsection
Hints on loci reordering
\end_layout

\begin_layout Enumerate
If you wish to create a set of LINKAGE format files with all the markers
 re-arranged into their map order, one chromosome after the other, choose
 Option ‘18) Convert to Linkage format’ from the Analysis menu and then
 choose the sub-option 1 ‘Select all markers in order on all chromosomes
 from Option 4 of the Locus Reordering Menu.
 This is useful, for example, if you want to run the Analyze package and
 you want all the markers in chromosomal order.
\end_layout

\begin_layout Enumerate
If you have a single affection status locus in your input files, and then
 choose sub-option 1 from Option 4 of the Locus Reordering Menu, then Mega2
 will create multiple sets of chromosome-specific files for many of the
 analysis options, including ASPEX, GeneHunter-Plus, and GeneHunter.
 A ‘global’ C-shell script will be created that will analyze one chromosome
 after another, all at once.
 This greatly eases analyses of genome-wide data sets.
\end_layout

\begin_layout Enumerate
Option 4 lets the user select some or all chromosomes.
 Typically the output files are chromosome-specific, each set of output
 files containing genotype data from all marker loci on one chromosome along
 with trait loci.
 
\begin_inset Newline newline
\end_inset

 Many linkage analysis programs do not care about the ordering of trait
 loci with respect to the marker.
 So, by default Mega2 would place the trait loci at the beginning of the
 marker order.
 If this order is important to you, then there are two ways to specify an
 alternate ordering: 
\end_layout

\begin_deeper
\begin_layout Enumerate
Reorder menu option 2: This works for markers on a single chromosome.
 
\end_layout

\begin_layout Enumerate
Trait selection menu's Combine option 
\begin_inset Newline newline
\end_inset

 If menu item number 2 is not set to the 
\begin_inset Quotes eld
\end_inset

Combine
\begin_inset Quotes erd
\end_inset

 mode, this should be the first step BEFORE selecting the trait loci.
 Enter 2 at the prompt to switch modes, then press 1 to obtain a list of
 traits along with a [MARKER] item, which is a place-holder for marker loci.Speci
fy the desired order using the item numbers.
 The resulting output file will have the markers inserted in the right place
 with respect to the trait loci.
 For chromosome-specific output files, markers for each chromosome will
 be substituted in turn, otherwise, if chromosomes are being combined into
 one set of files, then all chromosomal markers selected appear in this
 position.
\end_layout

\end_deeper
\begin_layout Subsection
Problems commonly encountered with input files:
\end_layout

\begin_layout Standard
Fatal errors cause Mega2 to terminate without creating output files.
 We try to identify as many problems with the data files as we can before
 termination of a Mega2 run, for the user's benefit.
 However, several iterations may be necessary with wrong or corrupted data.
 
\end_layout

\begin_layout Subsection
Pedigree file reading problem 
\end_layout

\begin_layout Standard
Reading in a pre-makeped file as a post-makeped file has been reported frequentl
y in the past.
 Mega2 judges whether a file is in pre-makeped format or post-makeped format
 by looking at the 5th column, which should be the 
\emph on
sex
\emph default
 column in a pre-makeped file format.
 If this column contains anything other than 1s and 2s, the pedigree file
 is read in as a post-makeped file, so either the sex column has to be filled
 in, or the pedigrees need to be converted to post-makeped outside of Mega2.
\end_layout

\begin_layout Subsection
Mega2 hangs while reading in input files
\end_layout

\begin_layout Standard
A common cause is that one of the files do not have a newline at the end
 of the last line.
 An easy way to check this on a Unix system is to count the lines using
 the command 
\series bold

\begin_inset Quotes eld
\end_inset

wc -l
\begin_inset Quotes erd
\end_inset


\series default
 .
 If the last line does not contain a newline, then this will print a number
 which is one short of the expected number of lines.
\end_layout

\begin_layout Subsection
DOS format file related errors
\begin_inset CommandInset label
LatexCommand label
name "sub:DOS-format-file-related"

\end_inset


\end_layout

\begin_layout Standard
The most common problem users have faced so far has had to do with DOS format
 map files.
 DOS text files contain the 
\begin_inset Quotes eld
\end_inset

^M
\begin_inset Quotes erd
\end_inset

 carriage-return character in addition to the 
\begin_inset Quotes eld
\end_inset

^J
\begin_inset Quotes erd
\end_inset

 line-feed character used by the Unix C library routines.
 This caused the map file to be read in incorrectly by earlier versions
 up to version 2.1 beta R3.
 This resulted in warning messages such as: 
\end_layout

\begin_layout LyX-Code
WARNING: Locus GENE1 is not in map file.
 
\end_layout

\begin_layout Standard
although GENE1 is actually present in the marker file.
 In extreme cases, Mega2 cannot find a single marker defined in the Map
 file and terminates abnormally.
 
\end_layout

\begin_layout Standard
This problem is only encountered if DOS-files are being run though a Unix
 copy of Mega2.
 Therefore, each input file is first checked for 
\begin_inset Quotes eld
\end_inset

^M
\begin_inset Quotes erd
\end_inset

 characters, if these are present, Mega2 exits with an error message.
\end_layout

\begin_layout Standard
Dos formatted files should be converted to Unix formatted files by removing
 the 
\begin_inset Quotes eld
\end_inset

^M
\begin_inset Quotes erd
\end_inset

 characters.
 This can be done manually, or through freely available programs.
 If you have Perl installed, here is a one-line Perl utility: 
\end_layout

\begin_layout LyX-Code
perl -pi -e 's/
\backslash
r
\backslash
n/
\backslash
n/g' pedin.01
\end_layout

\begin_layout Standard
Solaris usually comes with a 
\begin_inset Quotes eld
\end_inset

dos2unix
\begin_inset Quotes erd
\end_inset

 utility installed.
 Linux RPMs are available for a variety of platforms (try to locate one
 suitable for you.) 
\end_layout

\begin_layout Standard
Files created by Mac-specific applications may contain the 
\begin_inset Quotes eld
\end_inset

^M
\begin_inset Quotes erd
\end_inset

 character, but not the 
\begin_inset Quotes eld
\end_inset

^J
\begin_inset Quotes erd
\end_inset

.
 The 
\begin_inset Quotes eld
\end_inset

dos2unix
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

mac2unix
\begin_inset Quotes erd
\end_inset

 utilities may be used to convert these files, alternatively, you can use
 Perl: 
\end_layout

\begin_layout LyX-Code
perl -pi -e 's/
\backslash
r/
\backslash
n/g' pedin.01
\end_layout

\begin_layout Standard
For more information, see 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://en.wikipedia.org/wiki/Newline#Conversion_utilities
\end_layout

\end_inset


\end_layout

\begin_layout Subsubsection
Error messages 
\end_layout

\begin_layout Itemize
\begin_inset Quotes eld
\end_inset

Pedigree file appears to be a DOS format file.
\begin_inset Quotes erd
\end_inset

 This means that Mega2 encountered the 
\begin_inset Quotes eld
\end_inset

^M^J
\begin_inset Quotes erd
\end_inset

 sequence.
 
\end_layout

\begin_deeper
\begin_layout Itemize
\begin_inset Quotes eld
\end_inset

Pedigree file appears to be a Mac-format file.
\begin_inset Quotes erd
\end_inset

 
\begin_inset Newline newline
\end_inset

 This would appear if a 
\begin_inset Quotes eld
\end_inset

^M
\begin_inset Quotes erd
\end_inset

 character was encountered without the 
\begin_inset Quotes eld
\end_inset

^J
\begin_inset Quotes erd
\end_inset

.
\end_layout

\end_deeper
\begin_layout Subsection
Non-DOS related problems 
\end_layout

\begin_layout Standard
Macintosh users - Note that on your system file-names may be insensitive
 to letter case.
 So, if you create a file map.dat, this is equivalent to having a file MAP.DAT
 (or any combination of uppercase and lower case letters therein).
 Thus, if you try to modify a file named 
\series bold
MAP.DAT
\series default
, you will notice that you are changing 
\series bold
map.dat
\series default
 instead.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 This may cause problems if you use a Mega2 input map file map.dat, then
 create files for SimWalk2 inside the same folder, and run the SimWalk2
 shell script.
 The SimWalk2 map file name is hard-coded as MAP.DAT, therefore the shell
 script creates a copy of the Mega2-created SimWalk2 map file with this
 name prior to each SimWalk2 run.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Mega2 warns the user if they have used an input map file with the name
 
\series bold
map.dat
\series default
, and selected the SimWalk2 option.
\end_layout

\begin_layout Section
Detailed information on analysis options
\begin_inset CommandInset label
LatexCommand label
name "sec:Detailed-info-Analysis-Options"

\end_inset


\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:simwalk2"

\end_inset

Create SimWalk2 format files
\end_layout

\begin_layout Standard
Choosing this option will lead you to this sub-menu of SimWalk2 specific
 options:
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
SimWalk2 program options:
\end_layout

\begin_layout LyX-Code
1) Haplotype analysis
\end_layout

\begin_layout LyX-Code
2) Parametric linkage analysis
\end_layout

\begin_layout LyX-Code
3) Non-parametric linkage analysis
\end_layout

\begin_layout LyX-Code
4) IBD estimation
\end_layout

\begin_layout LyX-Code
5) Mistyping analysis
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
Suppose the chromosome number is 5.
 Then Mega2 will, by default, generate the following files (the [*] represents
 different names for each sub-option).
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
   Locus file:           sw2_locus.05   
\end_layout

\begin_layout LyX-Code
   Pedigree file:        sw2_pedigree.05
\end_layout

\begin_layout LyX-Code
   Map file:             sw2_map.05     
\end_layout

\begin_layout LyX-Code
   Penetrance file:      sw2_pen.05     
\end_layout

\begin_layout LyX-Code
   Simwalk2 batch file:  sw2_batch.05   
\end_layout

\begin_layout LyX-Code
   C-Shell script:       sw2_haplo.05.sh
\end_layout

\begin_layout Standard
It multiple traits and/or multiple chromosomes are selected for analysis,
 the a combined shell script is created which executes the chromosome-specific
 shell scripts in the individual trait directories.
 This shell script is called
\series bold
 [*].all.sh
\series default
 
\end_layout

\begin_layout Standard
If user selected to set up R-graphics for the non-parametric analysis option,
 then this script will also execute the Rsimwalk2.*.sh script that sets up
 commands for creating postscript files of LOD score plots.
 This ensures that all requires analyses are run before the graphics are
 generated.
 
\end_layout

\begin_layout Standard
Given below is an example of this combined shell script for two traits on
 a single chromosome: 
\end_layout

\begin_layout LyX-Code
#----------------------------------------------
\end_layout

\begin_layout LyX-Code
#   Mega2 version 4.2
\end_layout

\begin_layout LyX-Code
#   Run date:                2009-4-15-09-49
\end_layout

\begin_layout LyX-Code
#   This script created on   Wed Apr 15 09:49:08 2009
\end_layout

\begin_layout LyX-Code
#   Input file names:
\end_layout

\begin_layout LyX-Code
#       Pedigree file:              pedin.01
\end_layout

\begin_layout LyX-Code
#          Locus file:              names.01
\end_layout

\begin_layout LyX-Code
#            Map file:              map.01
\end_layout

\begin_layout LyX-Code
#    Untyped pedigree option  Include all pedigrees whether typed or not
\end_layout

\begin_layout LyX-Code
#----------------------------------------------
\end_layout

\begin_layout LyX-Code
echo SimWalk2 analysis for chromosome 1 ,trait 1 ...
\end_layout

\begin_layout LyX-Code
echo This may take a while.
\end_layout

\begin_layout LyX-Code
cd Trait-1
\end_layout

\begin_layout LyX-Code
./sw2_npl.05.sh
\end_layout

\begin_layout LyX-Code
cd ..
\end_layout

\begin_layout LyX-Code
echo SimWalk2 analysis for chromosome 1 ,trait 2 ...
\end_layout

\begin_layout LyX-Code
echo This may take a while.
\end_layout

\begin_layout LyX-Code
cd Trait-2
\end_layout

\begin_layout LyX-Code
./sw2_npl.05.sh
\end_layout

\begin_layout LyX-Code
cd ..
\end_layout

\begin_layout LyX-Code
echo Executing R shell script Rsimwalk2.all.sh
\end_layout

\begin_layout LyX-Code
./Rsimwalk2.all.sh
\end_layout

\begin_layout Standard
Note that, when generating the Mendel format pedigree file, Mega2 automatically
 reconnects the loops (if the input file is in post-Makeped LINKAGE format
 with broken loops), which is very important for running the haplotyping
 programs.
 Unfortunately, reconnection of loops will result in a renumbering of the
 person IDs, which can be confusing (One can run Makeped and tell it that
 there are no loops, this results in a post-Makeped LINKAGE format file
 with loops intact and thus Mega2 will not need to reconnect any loops).
\end_layout

\begin_layout Standard
The batch file for SIMWALK2 will contain the appropriate recombination fractions
, as inferred from the information provided in the map file.
 We use the Haldane map function to convert cM to recombination fractions
 (that reside in the batch file).
\end_layout

\begin_layout Standard
Simwalk2 does not currently handle QTLs.
 Moreover, at most one trait locus is allowed at the beginning of the locus
 order.
 The trait locus can be omitted for Haplotyping, IBD estimation and Mistyping
 analysis, a trait is required for the non-parametric and parametric linkage
 analysis options.
 Note that the shell script will overwrite the files LOCUS.DAT, PEDIGREE.DAT,
 PEN.DAT, MAP.DAT BATCH2.DAT, and ERROR-*.TXT.
 This is more of an issue with some versions of the Macintosh OS, where
 files names are case-insensitive.
 So, if you have a Mega2 format input file named 
\series bold
map.dat
\series default
 , this will be overwritten, unless you select a different output folder
 using the input menu option 8 .
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 The haplotyping shell script is called
\series bold
 haplo.05.sh
\series default
 
\begin_inset Newline newline
\end_inset

 The name of the Location scores C-Shell script file is
\series bold
 loc.05.sh
\series default
 .
 
\begin_inset Newline newline
\end_inset

 The Non-parametric linkage C-Shell script is called 
\series bold
npl.05.sh
\series default
 .
 
\begin_inset Newline newline
\end_inset

 The IBD estimation C-Shell script is called 
\series bold
ibd.05.sh.

\series default
 
\begin_inset Newline newline
\end_inset

 The Mistyping analysis C-Shell script is called 
\series bold
mis.05.sh.

\series default
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:vintage"

\end_inset

Convert to MENDEL format
\end_layout

\begin_layout Standard
Suppose the chromosome number is 5.
 Then Mega2 will, by default, generate the following files:
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
                 Mendel pedigree file:   pedm.05
\end_layout

\begin_layout LyX-Code
                 Mendel locus file:      locus.05
\end_layout

\begin_layout LyX-Code
                 Mendel penetrance file: pen.05
\end_layout

\begin_layout Standard
Note that the penetrance file will only be created if there are one or more
 affection status loci in the set of selected loci.
\begin_inset Newline newline
\end_inset


\begin_inset VSpace defskip
\end_inset

 Detailed explanation of the penetrance file:
\begin_inset Newline newline
\end_inset

 Our penetrance file is designed to permit the user to duplicate precisely
 any analysis done using the LINKAGE package (
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://linkage.rockefeller.edu/soft/linkage/
\end_layout

\end_inset

) which relies on liability class coding of the penetrance vectors at the
 disease locus.
 In this approach, the disease locus is assumed to have two alleles, and
 then a person’s penetrance is defined in terms of a vector whose entries
 are the penetrances for the 1/1, 1/2, and 2/2 disease genotypes, in that
 order.
 For example, an autosomal recessive trait with full penetrance would have
 the penetrance vector [0, 0, 1] for the affecteds and the vector [1, 1,
 0] for the normals (if the disease allele is the second allele).
 
\begin_inset Newline newline
\end_inset

 To use the penetrance file, you need a set of three matched input files:
\begin_inset Newline newline
\end_inset

 1) locus.dat 
\begin_inset Formula $<$
\end_inset

- The usual MENDEL locus file.
\begin_inset Newline newline
\end_inset

 2) pedm.dat 
\begin_inset Formula $<$
\end_inset

- The usual MENDEL pedigree file with one quantitative variable representing
 the phenotype at the trait locus.
\begin_inset Newline newline
\end_inset

 3) pen.dat 
\begin_inset Formula $<$
\end_inset

- A penetrance table (created by Mega2).
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 NOTE: The alleles must be listed in the ‘natural’ order in the ‘locus.dat’
 file, so allele ‘1’ is listed first, and allele ‘2’ is listed second.
 Mega2 will do this automatically.
\begin_inset Newline newline
\end_inset

 For each person in the pedigree file, SIMWALK2 (or the USERM15 MENDEL module)
 looks up the appropriate penetrance vector based on the person’s value
 at the quantitative variable (which must be in one-to-one correspondence
 with the disease phenotypes).
 Mega2 does this in the following manner: It takes the affection status
 code (‘1’ = normal, ‘2’ = affected) and multiplies it by 100 and adds to
 the liability class.
 So someone who was coded in the original linkage file as ‘2 4’ (i.e., affected
 in class 4) is assigned the quantitative variable ‘204’ and so we can look
 up the correct penetrance for them in the ‘pen.dat’ file (see example below).
\begin_inset Newline newline
\end_inset

 Example: 
\begin_inset Newline newline
\end_inset

 If we input this LINKAGE-style datafile into Mega2, then it will generate
 the ‘pen.dat’ file seen below: 
\begin_inset Newline newline
\end_inset

 LINKAGE-style datafile.dat:
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
2 0 0 5  << NO.
 OF LOCI, RISK LOCUS, SEXLINKED (IF 1) PROGRAM 
\end_layout

\begin_layout LyX-Code
0 0.0 0.0 0  << MUT LOCUS, MUT RATE, HAPLOTYPE FREQUENCIES (IF 1)
\end_layout

\begin_layout LyX-Code
1	2
\end_layout

\begin_layout LyX-Code
1	2  # trait 
\end_layout

\begin_layout LyX-Code
0.999800 0.000200   << GENE FREQUENCIES
\end_layout

\begin_layout LyX-Code
4 << NO.
 OF LIABILITY CLASSES
\end_layout

\begin_layout LyX-Code
0.0000 0.0500 0.0500
\end_layout

\begin_layout LyX-Code
0.0000 0.2000 0.2000
\end_layout

\begin_layout LyX-Code
0.0000 0.6000 0.6000
\end_layout

\begin_layout LyX-Code
0.0000 0.8000 0.8000 << PENETRANCES
\end_layout

\begin_layout LyX-Code
3	3  # M1
\end_layout

\begin_layout LyX-Code
0.200000 0.166670 0.633330   << GENE FREQUENCIES
\end_layout

\begin_layout LyX-Code
0 0  << SEX DIFFERENCE, INTERFERENCE (IF 1 OR 2)
\end_layout

\begin_layout LyX-Code
0.10000 << RECOMBINATION VALUES
\end_layout

\begin_layout LyX-Code
1 0.02500 0.50000 << REC VARIED, INCREMENT, FINISHING VALUE
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
Resulting ‘pen.dat’ file:
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
1	<= Number of affection status loci trait
\end_layout

\begin_layout LyX-Code
4     <= Locus name, Number of liability classes
\end_layout

\begin_layout LyX-Code
101 1.00000 0.95000 0.95000 <= Penetrances 1  1   
\end_layout

\begin_layout LyX-Code
102 1.00000 0.80000 0.80000 <= Penetrances 1  2   
\end_layout

\begin_layout LyX-Code
103 1.00000 0.40000 0.40000 <= Penetrances 1  3   
\end_layout

\begin_layout LyX-Code
104 1.00000 0.20000 0.20000 <= Penetrances 1  4   
\end_layout

\begin_layout LyX-Code
201 0.00000 0.05000 0.05000 <= Penetrances 2  1   
\end_layout

\begin_layout LyX-Code
202 0.00000 0.20000 0.20000 <= Penetrances 2  2   
\end_layout

\begin_layout LyX-Code
203 0.00000 0.60000 0.60000 <= Penetrances 2  3   
\end_layout

\begin_layout LyX-Code
204 0.00000 0.80000 0.80000 <= Penetrances 2  4   
\end_layout

\begin_layout Standard
Restrictions:
\begin_inset Newline newline
\end_inset

 USERM15 expects only one affection status locus which should be first in
 the locus order.
\begin_inset Newline newline
\end_inset

 Mega2 supports no more than 99 liability classes.
\begin_inset Newline newline
\end_inset

 If your input pedigree file has been created by Makeped, then, usually,
 Makeped will have re-numbered your pedigrees, making it very difficult
 to interpret the resulting data without going through the hassle of figuring
 out the correspondence between the new person IDs and the original person
 IDs.
 Thus, since Mendel supports text IDs, Mega2 will now use original IDs if
 they exist by default.
 These original IDs are assumed to appear at the end of each record in the
 pedigree file in the format: 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 ...
 Ped: 1 Per: 100101 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 For Mendel, this option may be toggled on or off within the 'MENDEL file
 name menu': 
\begin_inset Newline newline
\end_inset

 
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
  MENDEL file name menu
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed
\end_layout

\begin_layout LyX-Code
 1) Locus file name:           locus.06         [overwrite]
\end_layout

\begin_layout LyX-Code
 2) Pedigree filename:         pedm.06          [overwrite]
\end_layout

\begin_layout LyX-Code
 3) Penetrance file name:      pen.06           [overwrite]
\end_layout

\begin_layout LyX-Code
 4) Batch file name:           batch.06         [overwrite]
\end_layout

\begin_layout LyX-Code
 5) M13 batch file name:       m13bat.06        [overwrite]
\end_layout

\begin_layout LyX-Code
 6) Use original ids if given:  yes
\end_layout

\begin_layout LyX-Code
Select options 0-5 to enter new file names, 6 to toggle >       
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:aspex"

\end_inset

Convert to ASPEX format
\end_layout

\begin_layout Standard
The Aspex option has 4 sub-options 
\end_layout

\begin_layout LyX-Code
1) sib_ibd
\end_layout

\begin_layout LyX-Code
2) sib_tdt
\end_layout

\begin_layout LyX-Code
3) sib_phase
\end_layout

\begin_layout LyX-Code
4) sib_map       
\end_layout

\begin_layout Standard
This option produces one set of ASPEX input files for each chromosome selected.
 The files are (e.g.
 for chromosome 6 and the sib_ibd option): 
\end_layout

\begin_layout LyX-Code
        Aspex locus file:           asp_in.06 
\end_layout

\begin_layout LyX-Code
        Aspex pedigree file:        asp_dat.06 
\end_layout

\begin_layout LyX-Code
        C-shell script file:        sib_ibd.06.sh
\end_layout

\begin_layout Standard
User has the option of creating a combined c-shell script for multiple chromosom
es.
 Mega2 allows the user to define a list of parameters to be specified in
 the Aspex locus file, which will control subsequent Aspex runs.
 The parameters and their default settings are as follows: 
\end_layout

\begin_layout LyX-Code
        1) discard_partial:        [true]
\end_layout

\begin_layout LyX-Code
        2) linear_model:           [true]
\end_layout

\begin_layout LyX-Code
        3) most_likely:            [true]
\end_layout

\begin_layout LyX-Code
        4) fixed_step:             [false]
\end_layout

\begin_layout LyX-Code
        5) no_Dv:                  [true]
\end_layout

\begin_layout LyX-Code
        6) fixed_freq:             [false]
\end_layout

\begin_layout LyX-Code
        7) truncate_sharing:       [true]
\end_layout

\begin_layout LyX-Code
        8) count_once:             [false]
\end_layout

\begin_layout LyX-Code
        9) first_pair:             [false]
\end_layout

\begin_layout LyX-Code
        10) count_unaffected:      [false]
\end_layout

\begin_layout LyX-Code
        11) count_discordant:      [false]
\end_layout

\begin_layout LyX-Code
        12) sex_split:             [false]
\end_layout

\begin_layout LyX-Code
        13) show_pairs:            [false]
\end_layout

\begin_layout LyX-Code
        14) mapping:               [haldane]
\end_layout

\begin_layout LyX-Code
        15) max_step:              [ 1.0000 cM]
\end_layout

\begin_layout LyX-Code
        16) error_freq             [0.0000]
\end_layout

\begin_layout LyX-Code
        17) exclusion_level        [0.0000]
\end_layout

\begin_layout LyX-Code
        18) Distance to left end
\end_layout

\begin_layout LyX-Code
            of chromosome          [10.0000 cM]
\end_layout

\begin_layout LyX-Code
        19) Distance to right end
\end_layout

\begin_layout LyX-Code
            of chromosome          [10.0000 cM]    
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The user can also elect to convert the families to Nuclear families, and
 define risk-ratios.
 
\begin_inset Newline newline
\end_inset

 If your input pedigree file has been created by Makeped, then, usually,
 Makeped will have re-numbered your pedigrees, making it very difficult
 to interpret the resulting data without going through the hassle of figuring
 out the correspondence between the new person IDs and the original person
 IDs.
 Thus, since ASPEX supports text IDs, Mega2 will now use original IDs if
 they exist and if the user chooses not to use the 
\begin_inset Quotes eld
\end_inset

conversion to nuclear families
\begin_inset Quotes erd
\end_inset

 option.
 These original IDs are assumed to appear at the end of each record in the
 pedigree file in the format: 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 ...
 Ped: 1 Per: 100101 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 This option may be toggled on or off within the 'ASPEX file name menu':
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
ASPEX file name menu:
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed.
\end_layout

\begin_layout LyX-Code
 1) Locus file name:           asp_in.06        [overwrite]
\end_layout

\begin_layout LyX-Code
 2) Pedigree datafile name:    asp_dat.06       [overwrite]
\end_layout

\begin_layout LyX-Code
 3) C-shell script file name:  sib_ibd.06.sh    [overwrite]
\end_layout

\begin_layout LyX-Code
 4) Output original ids if given:   yes
\end_layout

\begin_layout LyX-Code
Select options 0-3 to enter new file names, 4 to toggle > 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:genehunter-plus"

\end_inset

Convert to GeneHunter-Plus format
\end_layout

\begin_layout Standard
For each chromosome Mega2 creates the following set of GeneHunter-Plus format
 files (for e.g.
 chromosome 6):
\begin_inset Newline newline
\end_inset

 
\end_layout

\begin_layout LyX-Code
      GeneHunter pedigree file:       gh_ped.06 
\end_layout

\begin_layout LyX-Code
      GeneHunter locus file:          gh_dat.06
\end_layout

\begin_layout LyX-Code
      GeneHunter command file:        gh_in.06  
\end_layout

\begin_layout LyX-Code
      C-shell script file:            gh_script.06.sh 
\end_layout

\begin_layout Standard
The Locus file is identical to the linkage format locus data file.
 The pedigree file is in the Pre-makeped linkage format.
 The command file contains GeneHunter-Plus commands to load in the data,
 and perform non-parametric linkage analysis on the data.
\begin_inset Newline newline
\end_inset

 Example command file: 
\end_layout

\begin_layout LyX-Code
photo ghp.06.out 
\end_layout

\begin_layout LyX-Code
load ghpdat.06
\end_layout

\begin_layout LyX-Code
use 
\end_layout

\begin_layout LyX-Code
score 
\end_layout

\begin_layout LyX-Code
scan ghpped.06 
\end_layout

\begin_layout LyX-Code
ps on 
\end_layout

\begin_layout LyX-Code
total het 
\end_layout

\begin_layout LyX-Code
nplall.06.ps 
\end_layout

\begin_layout LyX-Code
lod.06.ps 
\end_layout

\begin_layout LyX-Code
info.06.ps 
\end_layout

\begin_layout LyX-Code
quit
\end_layout

\begin_layout Standard
In order to run GeneHunter-Plus on these data files, one needs only to execute
 the C-shell script.
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:genehunter"

\end_inset

Convert to GeneHunter format
\end_layout

\begin_layout Standard
Files created for GeneHunter: 
\begin_inset Newline newline
\end_inset

 A set of files similar to those for GeneHunter-Plus is created for this
 option as well.
 As before, the pedigree file is in pre-Makeped format, and the locus file
 is in the standard linkage locus file format.
 
\begin_inset Newline newline
\end_inset

 
\end_layout

\begin_layout LyX-Code
      GeneHunter pedigree file:       gh_ped.06 
\end_layout

\begin_layout LyX-Code
      GeneHunter locus file:          gh_dat.06
\end_layout

\begin_layout LyX-Code
      GeneHunter command file:        gh_in.06  
\end_layout

\begin_layout LyX-Code
      C-shell script file:            gh_script.06.sh 
\end_layout

\begin_layout Standard
Selection of trait Loci: 
\begin_inset Newline newline
\end_inset

 GeneHunter supports quantitative as well as affection status loci.
 One or more of these quantitative loci can be labeled as covariates.
 However, there are restrictions on how the loci and genotypes/phenotypes
 may be ordered.
 The required order is one affection status locus, followed by the marker
 loci, followed by quantitative traits, then finally the covariates.
 This is also reflected in the pedigree record.
 
\begin_inset Newline newline
\end_inset

 A typical locus file would be as follows:
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
10 0 0 5
\end_layout

\begin_layout LyX-Code
0 0.000 0.000 0
\end_layout

\begin_layout LyX-Code
1 2 3 4 5 6 7 8 9 10
\end_layout

\begin_layout LyX-Code
1 2 # gaw12
\end_layout

\begin_layout LyX-Code
 0.999900 0.000100
\end_layout

\begin_layout LyX-Code
1
\end_layout

\begin_layout LyX-Code
 0.0100 0.8000 0.8000
\end_layout

\begin_layout LyX-Code
3 6 # D06G025
\end_layout

\begin_layout LyX-Code
 0.104180 0.045500 0.024650 0.196970 0.283060 0.345640
\end_layout

\begin_layout LyX-Code
3 7 # D06G028
\end_layout

\begin_layout LyX-Code
 0.080650 0.084430 0.186500 0.150680 0.148510 0.234920 0.114310
\end_layout

\begin_layout LyX-Code
3 8 # D06G034
\end_layout

\begin_layout LyX-Code
 0.373830 0.084400 0.092330 0.070510 0.016640 0.096660 0.144270 0.121360
\end_layout

\begin_layout LyX-Code
3 4 # D06G035
\end_layout

\begin_layout LyX-Code
 0.354540 0.330390 0.071380 0.243690
\end_layout

\begin_layout LyX-Code
3 14 # D06G041
\end_layout

\begin_layout LyX-Code
 0.001670 0.005050 0.050980 0.034930 0.000060 0.101470 0.187700 0.030160 0.062930
 0.011720 0.276800 0.012440 0.088740 0.135350
\end_layout

\begin_layout LyX-Code
3 8 # D06G043
\end_layout

\begin_layout LyX-Code
 0.098180 0.118750 0.207360 0.228480 0.049630 0.045060 0.235700 0.016840
\end_layout

\begin_layout LyX-Code
0 2  # Q1
\end_layout

\begin_layout LyX-Code
 
\end_layout

\begin_layout LyX-Code
 
\end_layout

\begin_layout LyX-Code
 
\end_layout

\begin_layout LyX-Code
 
\end_layout

\begin_layout LyX-Code
 
\end_layout

\begin_layout LyX-Code
0 2  # Q2
\end_layout

\begin_layout LyX-Code
 
\end_layout

\begin_layout LyX-Code
 
\end_layout

\begin_layout LyX-Code
 
\end_layout

\begin_layout LyX-Code
 
\end_layout

\begin_layout LyX-Code
 
\end_layout

\begin_layout LyX-Code
4 0 # Q3
\end_layout

\begin_layout LyX-Code
0 0
\end_layout

\begin_layout LyX-Code
 0.50000 0.04431 0.03816 0.01400 0.05307 0.02095 0.49000 0.49000 0.49000 Haldane
\end_layout

\begin_layout LyX-Code
1 0.10000 0.45000
\end_layout

\begin_layout Standard
Specification of means, standard deviations, etc.
 are not necessary for the quantitative variables, so these lines are required
 to be blank in order to match the linkage format.
 Note also, the definition for trait 
\begin_inset Quotes eld
\end_inset

Q3
\begin_inset Quotes erd
\end_inset

.
 The 
\begin_inset Quotes eld
\end_inset

4 0
\begin_inset Quotes erd
\end_inset

 denotes a co-variate, and this locus record contains only a single line.
 
\begin_inset Newline newline
\end_inset

 Mega2 allows omission of the affection status locus during locus re-ordering
 for GeneHunter.
 In this case, it inserts a 
\begin_inset Quotes eld
\end_inset

dummy
\begin_inset Quotes erd
\end_inset

 locus at the proper position.
 The user is informed of the Insertion of a dummy locus on the screen and
 inside the log file.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:apm"

\end_inset

Convert to APM format
\end_layout

\begin_layout Standard
This option creates the files needed for analysis via the Affected Pedigree
 Member method (single marker analyses).
 A single file is created for all the markers irrespective of whether they
 are on the same chromosome or not: 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
kinml.06
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
for only chromosome 6 and 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
kinml.all
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
for combined data from multiple chromosomes.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:apmmult"

\end_inset

Convert to APM MULT multiple locus format
\end_layout

\begin_layout Standard
This option creates the files needed for analysis via the multilocus version
 of the Affected Pedigree member method.
 For chromosome 6, 4 marker loci, and for an interval size of 3 markers,
 the following files are created: 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
    Data file: kin_mult1_3.06
\end_layout

\begin_layout LyX-Code
    Data file: kin_mult2_4.06
\end_layout

\begin_layout LyX-Code
    Script file apmmult.01.sh 
\end_layout

\begin_layout Standard
The user can select the length of the marker interval via a menu.
 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:nuclear"

\end_inset

Create nuclear families
\end_layout

\begin_layout Standard
This option breaks down larger pedigrees into their component nuclear families
 (parents plus children), and output the resulting locus and pedigree files
 in LINKAGE format.
 It automatically renumbers the pedigrees by multiplying the original pedigree
 id by 100 and incrementing it by the number of nuclear families found so
 far.
 Individuals are numbered consecutively starting from 1 inside each family.
 The files are named: 
\begin_inset Newline newline
\end_inset

 1) For each specific chromosome (# 1 in this case): 
\end_layout

\begin_layout LyX-Code
     Locus file nuke_data.01.
\end_layout

\begin_layout LyX-Code
     Pedigree file nuke_ped.01.
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
2) For combined output from multiple chromosomes: 
\end_layout

\begin_layout LyX-Code
     Locus file nuke_data.all.
\end_layout

\begin_layout LyX-Code
     Pedigree file nuke_ped.all
\end_layout

\begin_layout Standard
The user has a choice of combined or separate output files per chromosome.
 Markers can be reordered freely.
 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:slink"

\end_inset

Convert to SLINK format
\end_layout

\begin_layout Standard
This option creates the files needed for input into the simulation programs
 SLINK and FASTSLINK.
 User can choose from a list of options that control the output files, such
 as including families without affecteds, changing recombination fractions
 between markers, proportion of unlinked families etc.
 
\begin_inset Newline newline
\end_inset

 The following files are created for this option (all chromosome-specific):
 
\end_layout

\begin_layout LyX-Code
    SLINK-format pedigree file : simped.01
\end_layout

\begin_layout LyX-Code
    SLINK-format locus file    : simdata.01
\end_layout

\begin_layout LyX-Code
    SLINK-format parameter file: slinkin.01
\end_layout

\begin_layout LyX-Code
    SLINK-format C-shell file  : slink.01.sh   
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:splink"

\end_inset

Convert to SPLINK format
\end_layout

\begin_layout Standard
When one chooses to create files in SPLINK format, the following menu will
 appear:
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
SPLINK file conversion options:
\end_layout

\begin_layout LyX-Code
1) Single pedigree file for all markers.
\end_layout

\begin_layout LyX-Code
2) One pedigree file for each marker.
\end_layout

\begin_layout Standard
If you are seeking to use SPLINK to compute maximum LOD scores for each
 marker, you should choose option 2.
 This is because if there is more than one marker in an input SPLINK file,
 then SPLINK will treat these as forming a haplotype.
 So, in most cases, Option 2 is the one to use.
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 The 'splink.sh' script will append the results to the file 'splink.lst'.
 However, this C-shell script will only work with the latest version of
 SPLINK (version 1.08 or higher), as it uses the 
\begin_inset Quotes eld
\end_inset

-S+
\begin_inset Quotes erd
\end_inset

 command line option (which replaces the 
\begin_inset Quotes eld
\end_inset

-S
\begin_inset Quotes erd
\end_inset

 option found in earlier versions).
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:homogenetity"

\end_inset

Set up for homogeneity analyses
\end_layout

\begin_layout Standard
This option creates the files needed to compute LOD scores under heterogeneity,
 using component programs from the ANALYZE package.
 Output from multiple chromosomes can be combined into a single set of output
 file.
 The following files are created: 
\end_layout

\begin_layout LyX-Code
     Pedigree file : lod2ped.01  
\end_layout

\begin_layout LyX-Code
     Locus file    : lod2data.01 
\end_layout

\begin_layout LyX-Code
     C-shell file  : lod2.01.sh 
\end_layout

\begin_layout Standard
This option can handle only a single trait (affection status or quantitative)
 per analysis.
 If multiple traits are selected, then separate output files will be created
 for each trait.
 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:simulate"

\end_inset

Convert to SIMULATE format 
\end_layout

\begin_layout Standard
This option creates the files needed for input into the simulation program
 SIMULATE.
 The following files are created (one set per chromosome): 
\end_layout

\begin_layout LyX-Code
    Pedigree file : simped.06
\end_layout

\begin_layout LyX-Code
    Locus file    : simdata.06
\end_layout

\begin_layout LyX-Code
    Parameter file: problem.06  
\end_layout

\begin_layout Standard
SIMULATE will also allow only a single trait which has to be a binary trait.
 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:summary"

\end_inset

Create summary files
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Selection Menu: Summary file options 1) Create segregation and relative
 count summary files.
 2) Create allele frequency summary table.
 3) Count alleles and genotypes within groups.
 4) Create genotyping success rate summary.
 5) Create quantitative phenotype summary.
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
Selection Menu: Summary file options
\end_layout

\begin_layout LyX-Code
1) Create segregation and relative count summary files.
\end_layout

\begin_layout LyX-Code
2) Create allele frequency summary table.
\end_layout

\begin_layout LyX-Code
3) Count alleles and genotypes within groups.
\end_layout

\begin_layout LyX-Code
4) Create genotyping success rate summary.
\end_layout

\begin_layout LyX-Code
5) Create quantitative phenotype summary.
\end_layout

\begin_layout Standard

\emph on
Option 1) Create segregation and relative count summary files.

\emph default
 
\begin_inset Newline newline
\end_inset

 If your selected loci have an affection status trait locus (with only one
 liability class) first, then Option 1 will create a segregation table similar
 to this example one:
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
15 affected members with status 2.
\end_layout

\begin_layout LyX-Code
0 unaffected members with status 1.
\end_layout

\begin_layout LyX-Code
 Segregation Mating Table Counts:
\end_layout

\begin_layout LyX-Code
Mo Fa              0           1           2 Seg Ratio Aff/(Unaff + Aff)
\end_layout

\begin_layout LyX-Code
------           ---         ---         ---  -------- --------
\end_layout

\begin_layout LyX-Code
0 x 0 ->           0           0           0                 
\end_layout

\begin_layout LyX-Code
0 x 1 ->           0           0           0                 
\end_layout

\begin_layout LyX-Code
0 x 2 ->           0           0           4   100.000  100.000
\end_layout

\begin_layout LyX-Code
1 x 0 ->           0           0           0                 
\end_layout

\begin_layout LyX-Code
1 x 1 ->           0           0           0                 
\end_layout

\begin_layout LyX-Code
1 x 2 ->           0           0           0                 
\end_layout

\begin_layout LyX-Code
2 x 0 ->           1           0           6    85.714  100.000
\end_layout

\begin_layout LyX-Code
2 x 1 ->           0           0           0                 
\end_layout

\begin_layout LyX-Code
2 x 2 ->           0           0           2   100.000  100.000
\end_layout

\begin_layout Standard
At an affection status locus, a code of '2' means 'affected', a code of
 '1' means 'normal', and a code of '0' means 'unknown'.
 So this table provides a summary of the different mating types and what
 type of offspring they created.
 This provides a very simple overview of the data, and is not meant as a
 substitute for more sophisticated segregation analyses.
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 If your selected loci have an affection status trait locus (with only one
 liability class) first, then Option 1 will also create a relative count
 summary file similar to this example file:
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
Summary Counts
\end_layout

\begin_layout LyX-Code
There are 2 pedigrees, of which 1 are typed at 
\end_layout

\begin_layout LyX-Code
one or more of 2 markers on chromosome 5
\end_layout

\begin_layout LyX-Code
            All members  |  Affecteds   |      Sibships  Sib | Affected
 pairs with
\end_layout

\begin_layout LyX-Code
                 Typed   |    Typed     |         Naff  pairs| kinship k/32
\end_layout

\begin_layout LyX-Code
Pedigree      #   >1  All|   #   >1  All|   #  Min  Max      |   2    4
    6    8 
\end_layout

\begin_layout LyX-Code
   Ped 1:    11    0    0|   7    0    0|   3    2    2     3|   4    8
    0    9 
\end_layout

\begin_layout LyX-Code
   Ped 2:    10   10    9|   7    7    6|   4    1    2     1|   1    6
    4    5 
\end_layout

\begin_layout LyX-Code
  TOTAL      21   10    9|  14    7    6|                   4|   5   14
    4   14 
\end_layout

\begin_layout LyX-Code
Type of affected pair      Count    Kinship
\end_layout

\begin_layout LyX-Code
 sib pairs                     4      8/32
\end_layout

\begin_layout LyX-Code
 parent-child pairs           10      8/32
\end_layout

\begin_layout LyX-Code
 halfsib pairs                 0      4/32
\end_layout

\begin_layout LyX-Code
 avuncular pairs               6      4/32
\end_layout

\begin_layout Standard
This provides a quick count of the types of affected relative pairs that
 are contained in the pedigrees.
 However, please be aware that it counts an affected relative pair whether
 or not both members are genotyped.
 If you need a count of 
\emph on
genotyped
\emph default
 affected relative pairs, then this can be generated via the SAGE option
 of Mega2.
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\emph on
Option 2) Create allele frequency summary table.

\emph default
 
\begin_inset Newline newline
\end_inset

 For each co-dominant marker, this option will produce an allele frequency
 table.
 Here is an example one:
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
Chromosome 5 : locus M2 with 2 alleles
\end_layout

\begin_layout LyX-Code
There are 2 pedigrees containing 22 individuals,
\end_layout

\begin_layout LyX-Code
of whom 10 are genotyped.
\end_layout

\begin_layout LyX-Code
Heterozygosity Frequency   Count
\end_layout

\begin_layout LyX-Code
     Observed  0.8000          8
\end_layout

\begin_layout LyX-Code
     Expected  0.5000          5
\end_layout

\begin_layout LyX-Code
Allele Frequency Table:
\end_layout

\begin_layout LyX-Code
Allele#   Input    Observed  Count
\end_layout

\begin_layout LyX-Code
     1    0.50000  0.50000      10
\end_layout

\begin_layout LyX-Code
     2    0.50000  0.50000      10
\end_layout

\begin_layout LyX-Code
Total Alleles (observed)   =    20
\end_layout

\begin_layout LyX-Code
Here is the GENOTYPE DISTRIBUTION of all known genotypes:
\end_layout

\begin_layout LyX-Code
OBSERVED count 
\end_layout

\begin_layout LyX-Code
EXPECTED count
\end_layout

\begin_layout LyX-Code
allele #
\end_layout

\begin_layout LyX-Code
1) 1
\end_layout

\begin_layout LyX-Code
   2
\end_layout

\begin_layout LyX-Code
  
\end_layout

\begin_layout LyX-Code
2) 8 1
\end_layout

\begin_layout LyX-Code
   5 2
\end_layout

\begin_layout LyX-Code
  
\end_layout

\begin_layout LyX-Code
   1 2 <- allele #
\end_layout

\begin_layout Standard
For each marker, this table provides information on how many alleles were
 seen, how many individuals were genotyped, what the observed and expected
 heterozygosity frequencies are, and the observed and input marker allele
 frequencies (where the marker allele frequencies are estimated simply by
 counting without regard to relationship).
 There is also a table giving the observed and expected genotype counts.
 In the example table above, there were 8 '1/2' genotypes observed in the
 data, but under Hardy-Weinberg equilibrium we would expect to see only
 5 such heterozygotes, given the observed allele frequencies.
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Option 3)
\emph on
 Count alleles and genotypes within groups.

\emph default
 
\begin_inset Newline newline
\end_inset

 If the first locus in the selected locus order is an affected status trait
 locus, then this option will produce, for each affection status category
 (or affection status-liability class category) two tables per marker, the
 first giving the counts of alleles within each category, and the second
 giving the counts of genotypes within each category.
 There are some options as to how the summary file should appear:
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
Summary file output options :
\end_layout

\begin_layout LyX-Code
0) Done with this menu - please proceed
\end_layout

\begin_layout LyX-Code
 1) Display percentages in addition to counts [yes]
\end_layout

\begin_layout LyX-Code
 2) Include rows with all zero counts [no]
\end_layout

\begin_layout LyX-Code
 3) Include columns with all zero counts [no]
\end_layout

\begin_layout LyX-Code
 4) Output tab-text file [no]
\end_layout

\begin_layout Standard
Sub-option 4 here, when toggled on, will result in the production of tab-delimit
ed text files, one for each sub-table, that can easily then be read into
 most any statistical package for further analyses.
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Here is an example summary file produced by this option:
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
Trait TRAIT
\end_layout

\begin_layout LyX-Code
      Allele counts for marker  M2
\end_layout

\begin_layout LyX-Code
M2     Unknown       Affected    Total    Total Freq
\end_layout

\begin_layout LyX-Code
    1        2   0.3333     8   0.5714    10     0.5000 
\end_layout

\begin_layout LyX-Code
    2        4   0.6667     6   0.4286    10     0.5000 
\end_layout

\begin_layout LyX-Code
TOTAL        6             14             20
\end_layout

\begin_layout LyX-Code
      Genotype counts for marker  M2
\end_layout

\begin_layout LyX-Code
M2     Unknown       Affected    Total     Total Freq
\end_layout

\begin_layout LyX-Code
 1/ 1        0   0.0000    1   0.1429     1      0.1000
\end_layout

\begin_layout LyX-Code
 1/ 2        2   0.6667    6   0.8571     8      0.8000
\end_layout

\begin_layout LyX-Code
 2/ 2        1   0.3333    0   0.0000     1      0.1000
\end_layout

\begin_layout LyX-Code
TOTAL        3             7             10
\end_layout

\begin_layout Standard
HINT: If one has case-control data, one can use Mega2 to generate the appropriat
e case-control counts by setting up an affection status locus and coding
 
\begin_inset Quotes eld
\end_inset

cases
\begin_inset Quotes erd
\end_inset

 as 
\begin_inset Quotes eld
\end_inset

affected
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

controls
\begin_inset Quotes erd
\end_inset

 as 
\begin_inset Quotes eld
\end_inset

unknowns
\begin_inset Quotes erd
\end_inset

 (or 
\begin_inset Quotes eld
\end_inset

normals
\begin_inset Quotes erd
\end_inset

).
 Likewise, if one has multiple categories (
\emph on
e.g.,
\emph default
 high, medium, low BMI), one can generate the proper tables with this option
 of Mega2 by simply setting up a dummy affection status locus with multiple
 liability classes, one for each category.
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Standard

\emph on
Option 4) Genotyping success rate summary .

\emph default
 
\begin_inset Newline newline
\end_inset

 This creates a summary of the genotyping success rate within each individual
 for each marker locus, and within each marker for the number of individuals
 genotyped at that marker.
 The output file is called 
\emph on
genotyping_rate.##
\emph default
 .
 Here is an excerpt form a typical output file: 
\begin_inset Newline newline
\end_inset

 
\end_layout

\begin_layout LyX-Code
---------------------
\end_layout

\begin_layout LyX-Code
Thu Jun  6 14:18:47 2002
\end_layout

\begin_layout LyX-Code
Input file names
\end_layout

\begin_layout LyX-Code
locus file:    datain.01
\end_layout

\begin_layout LyX-Code
pedigree file: pedin.01
\end_layout

\begin_layout LyX-Code
map file:      map.01
\end_layout

\begin_layout LyX-Code
Untyped pedigree option: Include all pedigrees whether typed or not
\end_layout

\begin_layout LyX-Code
---------------------
\end_layout

\begin_layout LyX-Code
 Genotyping success rate summary for chromosome 1
\end_layout

\begin_layout LyX-Code
---------------------------------------------------
\end_layout

\begin_layout LyX-Code
Per person genotyping rate :
\end_layout

\begin_layout LyX-Code
Number of markers: 4
\end_layout

\begin_layout LyX-Code
Maximum number of markers typed 4
\end_layout

\begin_layout LyX-Code
Minimum number of markers typed 0
\end_layout

\begin_layout LyX-Code
---------------------------------------------------
\end_layout

\begin_layout LyX-Code
Ped      Person   #Markers typed  Success Rate
\end_layout

\begin_layout LyX-Code
---------------------------------------------------
\end_layout

\begin_layout LyX-Code
3         1                   4         1.00
\end_layout

\begin_layout LyX-Code
3         2                   4         1.00
\end_layout

\begin_layout LyX-Code
3         3                   4         1.00
\end_layout

\begin_layout LyX-Code
3         4                   4         1.00
\end_layout

\begin_layout LyX-Code
13        1                   4         1.00
\end_layout

\begin_layout LyX-Code
13        2                   4         1.00
\end_layout

\begin_layout LyX-Code
13        3                   4         1.00
\end_layout

\begin_layout LyX-Code
13        4                   4         1.00
\end_layout

\begin_layout LyX-Code
7         1                   4         1.00
\end_layout

\begin_layout LyX-Code
:	  :		      :		:
\end_layout

\begin_layout LyX-Code
Per marker genotyping rate:
\end_layout

\begin_layout LyX-Code
Total number of individuals: 384
\end_layout

\begin_layout LyX-Code
Maximum number of individuals typed at a marker 364
\end_layout

\begin_layout LyX-Code
Minimum number of individuals typed at a marker 356
\end_layout

\begin_layout LyX-Code
---------------------------------------------------
\end_layout

\begin_layout LyX-Code
Marker      Alleles   #Individuals   #Percentage
\end_layout

\begin_layout LyX-Code
                       Typed          Typed
\end_layout

\begin_layout LyX-Code
---------------------------------------------------
\end_layout

\begin_layout LyX-Code
d1s196            4            356          0.93
\end_layout

\begin_layout LyX-Code
d1s238            4            364          0.95
\end_layout

\begin_layout LyX-Code
d1s229            4            364          0.95
\end_layout

\begin_layout LyX-Code
d1s103            4            364          0.95
\end_layout

\begin_layout LyX-Code
---------------------------------------------------
\end_layout

\begin_layout Standard

\emph on
Option 5) Quantitative phenotype summary .

\emph default
 
\begin_inset Newline newline
\end_inset

 This creates a summary of phenotype values for selected quantitative loci
 present in the pedigree file.
 The user can create separate file for each quantitative trait locus or
 a combined file for all loci.
 The output file is called 
\emph on
phenotyping_rate.##
\emph default
 .
 Here is an excerpt form a typical output file: 
\end_layout

\begin_layout LyX-Code
---------------------
\end_layout

\begin_layout LyX-Code
Mon Mar  8 15:04:59 2004
\end_layout

\begin_layout LyX-Code
Input file names
\end_layout

\begin_layout LyX-Code
locus file:    datain.06
\end_layout

\begin_layout LyX-Code
pedigree file: pedin.06
\end_layout

\begin_layout LyX-Code
map file:      map.06
\end_layout

\begin_layout LyX-Code
omit file:     omit.06
\end_layout

\begin_layout LyX-Code
Untyped pedigree option: Include all pedigrees whether typed or not
\end_layout

\begin_layout LyX-Code
---------------------
\end_layout

\begin_layout LyX-Code
Phenotype Summary for Q1
\end_layout

\begin_layout LyX-Code
---------------------------------------
\end_layout

\begin_layout LyX-Code
                        All                             Founders
\end_layout

\begin_layout LyX-Code
Pedigree        Members Phenotyped       %Phenotyped    Total   Phenotyped
      %
\end_layout

\begin_layout LyX-Code
1               52              37              0.71    17      8       
        0.47
\end_layout

\begin_layout LyX-Code
2               86              69              0.80    24      13      
        0.54
\end_layout

\begin_layout LyX-Code
3               100             66              0.66    30      10      
        0.33
\end_layout

\begin_layout LyX-Code
4               90              57              0.63    27      12      
        0.44
\end_layout

\begin_layout LyX-Code
5               63              34              0.54    20      4       
        0.20
\end_layout

\begin_layout LyX-Code
6               52              34              0.65    16      5       
        0.31
\end_layout

\begin_layout LyX-Code
7               74              48              0.65    21      6       
        0.29
\end_layout

\begin_layout LyX-Code
8               68              43              0.63    21      7       
        0.33
\end_layout

\begin_layout LyX-Code
9               41              27              0.66    14      5       
        0.36
\end_layout

\begin_layout LyX-Code
10              60              37              0.62    19      7       
        0.37
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
hrule
\end_layout

\end_inset

 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:oldsage"

\end_inset

Convert to SAGE format
\end_layout

\begin_layout Standard
Suppose the chromosome number is 5.
 Then this option will generate the following files:
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
        Pedigree file:         sage_ped.05
\end_layout

\begin_layout LyX-Code
        Locus file:            sage_loc.05
\end_layout

\begin_layout LyX-Code
        FSP parameter file:    sage_par.05
\end_layout

\begin_layout LyX-Code
        SIBPAL parameter file: sage_sibpal.05
\end_layout

\begin_layout LyX-Code
        SIBPAL C-shell file:   sage.05.sh
\end_layout

\begin_layout LyX-Code
        Genotype count file:   sage_cnt.05
\end_layout

\begin_layout LyX-Code
        FCOR parameter file:   sage_cntpar.05
\end_layout

\begin_layout LyX-Code
        FCOR C-shell file:     sage_cnt.05.sh
\end_layout

\begin_layout Standard
Reminder: This supports the old FORTRAN-like SAGE format (rather than the
 new more elegant format now available in beta-version which is supported
 by option 22).
\begin_inset Newline newline
\end_inset

 Provided you have selected only one trait locus (affection status or quantitati
ve), the C-shell script file 'sage.05.sh' will carry out Haseman-Elston linkage
 analyses of the trait versus each of the markers using the SAGE programs
 fsp and sibpal.
 This uses the files sage_ped.05, sage_par.05, sage_loc.05, and sage_sibpal.05.
\begin_inset Newline newline
\end_inset

 The second C-shell script file 'sage_cnt.05.sh' is designed to provide a
 count of all genotyped relative pairs (where an individual is considered
 genotyped if they are genotyped at one or more markers in the input file).
 The ‘sage_cnt.05’ file is a SAGE pedigree file which will contain, for each
 affected, a ‘trait’ which is the total number of genotypes in the input
 file (
\emph on
before
\emph default
 any locus re-ordering) for each affected individual.
 The script 'sage_cnt.05.sh' first runs fsp on sage_par.05 and sage_cnt.05,
 and then runs fcor using sage_cnt.05 and fsp-generated files.
 
\begin_inset Newline newline
\end_inset

 NOTE: The affected relative pair counts generated by SAGE may differ from
 those generated with Mega2, because Mega2 will only count a relative pair
 as “full sibs” if in fact they are full sibs and their parents are not
 inbred.
 
\begin_inset Newline newline
\end_inset

 You may use other SAGE modules as desired (See the SAGE documentation).
 For example, if you wanted to compute familial correlations, you would
 first run fsp and then run fcor, as follows:
\begin_inset Newline newline
\end_inset

 To run fsp,
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
cp sage_par.## fort.1
\end_layout

\begin_layout LyX-Code
cp sage_ped.## fort.11
\end_layout

\begin_layout LyX-Code
fsp
\end_layout

\begin_layout Standard
To then run fcor, create the appropriate ‘fcor.par’ parameter file and then:
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
cp fcor.par fort.1
\end_layout

\begin_layout LyX-Code
cp sage_ped.## fort.11
\end_layout

\begin_layout LyX-Code
cp fort.22 fort.12
\end_layout

\begin_layout LyX-Code
fcor
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
If you make an affection status locus (with no liability classes) your first
 locus, then the ‘Pairs Used’ in the FCOR fort.22 output file will contain
 counts of affected relative pairs in your pedigrees (whether or not they
 are genotyped).
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
hrule
\end_layout

\end_inset

 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:tdtmax"

\end_inset

Set up for TDTMax analyses
\end_layout

\begin_layout Standard
This option permits easy setup of files for the ‘tdtmax’ program from this
 paper: 
\begin_inset Newline newline
\end_inset

 Ann Hum Genet 1997 Jan;61( Pt 1):49-60 
\begin_inset Newline newline
\end_inset

 Randomization tests of disease-marker associations.
\begin_inset Newline newline
\end_inset

 Morris AP, Curnow RN, Whittaker JC
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 This approach is very nice in that it uses randomization approach to correct
 for the problem of multiple testing (across alleles) inherent to the TDT
 approach for testing for association.
 However, Dr.
 Morris seems not to be distributing his program anymore, and so now the
 ASPEX program may be used instead, as the ASPEX program now uses randomization
 in a similar way to compute appropriately corrected empirical p-values.
 
\begin_inset Newline newline
\end_inset

 The shell scripts generated assume that you have the ‘convert’ and ‘tdtmax’
 programs installed and in your path.
 
\begin_inset Newline newline
\end_inset

 The TDTMAX option will create a plethora of files, one per marker, with
 the default name “tdtmax_data.#.locus_name”, where “#” is the chromosome
 number and “locus_name” is the name of the marker.
 
\begin_inset Newline newline
\end_inset

 It will also create a C-shell script with the default name “tdtmax#.sh”,
 where “#” is the chromosome number.
\begin_inset Newline newline
\end_inset

 You also have to choose between these two analysis options.
\begin_inset Newline newline
\end_inset

 1) all affected offspring in families
\begin_inset Newline newline
\end_inset

 2) only one affected sib per family
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Please see the ‘tdtmax’ documentation for a discussion of these options.
 However, suffice it to say here that the “all affected offspring in families”
 uses transmitted and non-transmitted alleles from all affected offspring.
 The authors of tdtmax advise against this option, and instead recommend
 that one uses only one affected sib per family (NOTE: the tdtmax documentation
 does not seem to indicate how this one sib is selected.).
 
\begin_inset Newline newline
\end_inset

 You also need to enter the number of permutations desired.
 Obviously, one should use as many permutations as is computationally feasible.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Output from the ‘tdtmax#.sh’ C-shell script file:
\begin_inset Newline newline
\end_inset

 The C-shell script file will, if all goes well, create (or append to) two
 output files:
\begin_inset Newline newline
\end_inset

 a) tdtmax.lst - This file contains the complete output generated by the
 ‘tdtmax’ program.
 
\begin_inset Newline newline
\end_inset

 b) tdtmax.sum - This file contains summary output, one line per marker,
 giving the marker name, the position on the chromosome, the chromosome
 number, and the empirical tdtmax p-value.
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
hrule
\end_layout

\end_inset

 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:solar"

\end_inset

Convert to SOLAR format
\end_layout

\begin_layout Standard
Mega2 creates one set of files per chromosome in the SOLAR input format,
 along with a combined Tcl script for all chromosomes, e.g.: 
\end_layout

\begin_layout LyX-Code
        Pedigree file:         solar_ped.06
\end_layout

\begin_layout LyX-Code
        Allele frequency file: solar_freq.06
\end_layout

\begin_layout LyX-Code
        Phenotype file:        solar_phen.06
\end_layout

\begin_layout LyX-Code
        Genotype file:         solar_marker.06
\end_layout

\begin_layout LyX-Code
        Map file:              solar_map.06   
\end_layout

\begin_layout LyX-Code
        Pedigree file:         solar_ped.07
\end_layout

\begin_layout LyX-Code
        Allele frequency file: solar_freq.07
\end_layout

\begin_layout LyX-Code
        Phenotype file:        solar_phen.07
\end_layout

\begin_layout LyX-Code
        Genotype file:         solar_marker.07
\end_layout

\begin_layout LyX-Code
        Map file:              solar_map.07  
\end_layout

\begin_layout LyX-Code
	    Tcl script:            solar_load.all.tcl
\end_layout

\begin_layout Standard
SOLAR allows any ordering of traits versus markers, since trait phenotypes
 are written in a separate file from marker genotypes.
 It allows QTLs as well as affection status loci.
 If no trait is selected the phenotype file is not created.
 
\begin_inset Newline newline
\end_inset

 The Tcl script is loaded automatically when SOLAR is invoked within the
 directory containing the SOLAR format files.
 This script provides Tcl functions to load in the pedigree, map, phenotype
 and genotype data for each chromosome separately.
 For instance, if the user created files for chromosomes 6 and 7, then the
 Tcl script contains the functions load6() and load7().
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
hrule
\end_layout

\end_inset

 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:vitesse"

\end_inset

Convert to Vitesse format
\end_layout

\begin_layout Standard
The Vitesse option offers a choice of two kinds of output, MLINK and LINKMAP.
 In the case of MLINK, a trait locus is analyzed against every marker, so
 we obtain one set of pedigree and locus files per marker locus.
 A C shell script is also created that runs Vitesse.
 
\end_layout

\begin_layout LyX-Code
         Pedigree file       vpedin.M1
\end_layout

\begin_layout LyX-Code
         Locus file          vdatain.M1
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
         Pedigree file       vpedin.M2
\end_layout

\begin_layout LyX-Code
         Locus file          vdatain.M2
\end_layout

\begin_layout LyX-Code
         Cshell file          vitesse.06.sh  
\end_layout

\begin_layout Standard
These files were created for a set of two markers and a trait.
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 In the LINKMAP mode, the user can select a specific set of linked markers,
 in order to compute a LOD score for the trait at each such marker.
 Otherwise, the user can elect to analyze moving windows of specified length
 along each chromosome for the same purpose.
 Mega2 produces multiple sets of pedigree and locus files for each interval
 and for each position of the trait in that interval.
 A C shell script is also written out to run Vitesse on all this data.
 
\end_layout

\begin_layout LyX-Code
         Pedigree file       vpedin.56_3.06
\end_layout

\begin_layout LyX-Code
         Locus file          vdatain.56_3.06
\end_layout

\begin_layout LyX-Code
         Cshell file         vitesse.06.sh 
\end_layout

\begin_layout Standard
This set, for example, refers to an interval consisting of marker 5, and
 6, and the trait placed to the right of 6th marker.
 
\begin_inset Newline newline
\end_inset

 QTLs are allowed as well as affection status loci, and the trait has to
 occur at the beginning of the order.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
hrule
\end_layout

\end_inset

 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:linkage"

\end_inset

Convert to Linkage format
\end_layout

\begin_layout Standard
This option creates files in LINKAGE format.
 This is useful for reordering loci or selecting subsets of loci from large
 files.
 Files can be created one set per chromosome or as combined output files.
 They consist of: 
\end_layout

\begin_layout LyX-Code
        Pedigree file:        Lpedin.01
\end_layout

\begin_layout LyX-Code
        Locus file:           Ldatain.01
\end_layout

\begin_layout Standard
As might be expected, there are no restrictions on trait and marker selection
 and reordering.
 However, the recombination fractions at the bottom of the locus file correspond
s to the input map file (not the original input locus file).
 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
hrule
\end_layout

\end_inset

 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:hwe"

\end_inset

Test loci for Hardy-Weinberg Equilibrium
\end_layout

\begin_layout Standard
This option permits one to test markers for Hardy-Weinberg equilibrium.
 The user can select one out of five HWE testing programs, 
\begin_inset Newline newline
\end_inset

 1) HWE by Guo and Thompson 
\begin_inset Newline newline
\end_inset

 2) GEN program by Lazzeroni and Lange 
\begin_inset Newline newline
\end_inset

 3) Chi-sq test from the R 
\begin_inset Quotes eld
\end_inset

genetics
\begin_inset Quotes erd
\end_inset

 library by Warnes and Leisch
\begin_inset Newline newline
\end_inset

 4) Exact test for bi-alleleic markers from the R 
\begin_inset Quotes eld
\end_inset

genetics
\begin_inset Quotes erd
\end_inset

 library 
\begin_inset Newline newline
\end_inset

 5) Mendel 5 by Lange et al.
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 Use of options 3 and 4 require R to be installed along with the 
\begin_inset Quotes eld
\end_inset

genetics
\begin_inset Quotes erd
\end_inset

 library as well its supporting libraries: combinat, gregmisc and MASS.
 The user also has a choice of individuals selected estimation of allele
 and genotype frequencies: 
\end_layout

\begin_layout LyX-Code
Individual selection menu for counting alleles
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
0) Done with this menu, please proceed.
\end_layout

\begin_layout LyX-Code
 1) Genotyped founders only
\end_layout

\begin_layout LyX-Code
*2) Genotyped founders + a randomly chosen genotyped person
\end_layout

\begin_layout LyX-Code
    from pedigrees without genotyped founders.
\end_layout

\begin_layout LyX-Code
 3) All genotyped individuals
\end_layout

\begin_layout LyX-Code
Select from options 0 - 3 >
\end_layout

\begin_layout Standard
The 
\begin_inset Quotes eld
\end_inset

HWE
\begin_inset Quotes erd
\end_inset

 program has been incorporated into the Mega2 program by the authors' permission
, however, the user has to obtain the other programs separately.
\begin_inset Newline newline
\end_inset

 For 
\begin_inset Quotes eld
\end_inset

HWE
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

GEN
\begin_inset Quotes erd
\end_inset

, two files are created, one is a long format output containing the combined
 output from either program for each marker, and the other file is a summary
 table produced by Mega2.
 They are called: 
\begin_inset Newline newline
\end_inset

 HWE files: 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
hweresults.01 hwetable.01
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout LyX-Code
    hwe_results.01
\end_layout

\begin_layout LyX-Code
    hwe_table.01
\end_layout

\begin_layout Standard
GEN files: 
\end_layout

\begin_layout LyX-Code
    gen_results.01
\end_layout

\begin_layout LyX-Code
    gen_table.01
\end_layout

\begin_layout Standard
The Perl scripts make_hwe_table.pl and make_gen_table.pl create the summary
 tables from the long format output file.
 here is an example table format output file: 
\end_layout

\begin_layout LyX-Code
These results are produced by the HWE program by
\end_layout

\begin_layout LyX-Code
Sun-Wei Guo and Elizabeth Thompson.
  If you publish
\end_layout

\begin_layout LyX-Code
any of these results,please cite:
\end_layout

\begin_layout LyX-Code
 
\end_layout

\begin_layout LyX-Code
Guo, S.-W., Thompson, E.
 T.
 (1992)
\end_layout

\begin_layout LyX-Code
Performing the Exact Test of Hardy-Weinberg Proportion
\end_layout

\begin_layout LyX-Code
for Multiple Alleles.
 Biometrics 48:361-372
\end_layout

\begin_layout LyX-Code
---------------------
\end_layout

\begin_layout LyX-Code
Mon Feb 12 14:27:44 2001
\end_layout

\begin_layout LyX-Code
Input file names
\end_layout

\begin_layout LyX-Code
locus file:    datain.01
\end_layout

\begin_layout LyX-Code
pedigree file: pedin.01
\end_layout

\begin_layout LyX-Code
map file:      map.01
\end_layout

\begin_layout LyX-Code
Counted individuals consist of:
\end_layout

\begin_layout LyX-Code
    Genotyped founders or a randomly chosen genotyped person from each pedigree
\end_layout

\begin_layout LyX-Code
---------------------
\end_layout

\begin_layout LyX-Code
 
\end_layout

\begin_layout LyX-Code
 
\end_layout

\begin_layout LyX-Code
Marker       Alleles   Expected      Observed       P-value    Std Error
   #Genotypes
\end_layout

\begin_layout LyX-Code
                       Homozygosity  Homozygosity
\end_layout

\begin_layout LyX-Code
 
\end_layout

\begin_layout LyX-Code
d1s228             4       0.3331       0.2472        0.5669      0.0050   
    89
\end_layout

\begin_layout LyX-Code
d1s234             4       0.2842       0.1379        0.0025      0.0005   
    87
\end_layout

\begin_layout LyX-Code
d1s255             4       0.3591       0.3297        0.7339      0.0045   
    91
\end_layout

\begin_layout Standard
Options 3 and 4 set up data files that can be read into R, as well as an
 R script for invoking the appropriate function to test for HWE.
 There is a separate table format data file for each marker, named hwe_genos.[mar
ker_name] containing the genotypes of each individual selected for HWE estimatio
n.
 Mega2 also runs the R script automatically, and creates summary tables,
 hwe_chisq_table.[chromosome] and hwe_exact_table.[chromosome] respectively.
 If more than one chromosome is present, then the extension is 
\begin_inset Quotes eld
\end_inset

.all
\begin_inset Quotes erd
\end_inset

, instead of a chromosome number.
 
\begin_inset Newline newline
\end_inset

 Here is an excerpt from the table produced by the chi-sq test: 
\end_layout

\begin_layout LyX-Code
             max(exp-obs) max2(exp-obs) Chi-sq P-value
\end_layout

\begin_layout LyX-Code
d21s258      5.948276      5.689655     13.815 0.139
\end_layout

\begin_layout LyX-Code
d21s265      8.555743      4.623311     12.165 0.243
\end_layout

\begin_layout LyX-Code
d21s219      9.924051      8.799051     37.573 0.001
\end_layout

\begin_layout LyX-Code
d21s65       8.454545      7.501420     18.647 0.031
\end_layout

\begin_layout LyX-Code
d21s167      4.734722      4.391667     32.483 0.001
\end_layout

\begin_layout Standard
The two largest differences between expected and observed genotype frequencies
 are output in this table along with the chi-sq test statistic and p-value.
\end_layout

\begin_layout Standard
For option 5, Mega2 sets up Mendel format pedigree, locus and map files
 containing all markers selected for testing.
 There is also a Mendel5 format control file to run the analysis.
 Mega2 does not automatically run Mendel.
 The Mendel format output files are called: 
\end_layout

\begin_layout LyX-Code
    Pedigree file:      hwe_mendel5_ped.all
\end_layout

\begin_layout LyX-Code
    Locus file:         hwe_mendel5_loc.all
\end_layout

\begin_layout LyX-Code
    Map file:           hwe_mendel5_map.all
\end_layout

\begin_layout LyX-Code
    Control file:       hwe_mendel5_control.all
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
hrule
\end_layout

\end_inset

 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:allegro"

\end_inset

Convert to Allegro format
\end_layout

\begin_layout Standard
This option creates the files needed for analysis via the Allegro program.
 The pedigree and locus files are similar to the GeneHunter format files.
 Allegro supports only one trait locus per analysis, and only binary traits.
 The following files are created per chromosome in this option: 
\end_layout

\begin_layout LyX-Code
        Command file       : al_in.01
\end_layout

\begin_layout LyX-Code
        Locus file         : al_dat.01
\end_layout

\begin_layout LyX-Code
        Pedigree file      : al_ped.01
\end_layout

\begin_layout LyX-Code
        C-shell script     : al_script.01.sh
\end_layout

\begin_layout Standard
The command file contains parameters that specify the Allegro input files
 and the analyses that must be performed on these files, e.g.: 
\end_layout

\begin_layout LyX-Code
PREFILE al_ped.01
\end_layout

\begin_layout LyX-Code
DATFILE al_dat.01
\end_layout

\begin_layout LyX-Code
MODEL mpt par het allegro_par_mpt.01
\end_layout

\begin_layout LyX-Code
MODEL spt par het allegro_par_spt.01
\end_layout

\begin_layout LyX-Code
MODEL mpt exp pairs equal allegro_exppairs_mpt.01
\end_layout

\begin_layout LyX-Code
MODEL spt exp pairs equal allegro_exppairs_spt.01
\end_layout

\begin_layout LyX-Code
MODEL mpt exp all equal allegro_expall_mpt.01
\end_layout

\begin_layout LyX-Code
MODEL spt exp all equal allegro_expall_spt.01
\end_layout

\begin_layout LyX-Code
MODEL mpt lin pairs equal allegro_linpairs_mpt.01
\end_layout

\begin_layout LyX-Code
MODEL spt lin pairs equal allegro_linpairs_spt.01
\end_layout

\begin_layout LyX-Code
MODEL mpt lin all equal allegro_linall_mpt.01
\end_layout

\begin_layout LyX-Code
MODEL spt lin all equal allegro_linall_spt.01    
\end_layout

\begin_layout Standard
This is the standard file produced by Mega2.
 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
hrule
\end_layout

\end_inset

 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:mlbqtl"

\end_inset

Convert to MLBQTL format
\end_layout

\begin_layout Standard
This creates files for analysis by MLBQTL.
 The pedigree and locus files are identical to the GeneHunter format.
 However, extended pedigrees are first converted to nuclear families.
 Each chromosome-specific set of files includes: 
\end_layout

\begin_layout LyX-Code
        Command file       : mlb_in.06
\end_layout

\begin_layout LyX-Code
        Locus file         : mlb_dat.06
\end_layout

\begin_layout LyX-Code
        Pedigree file      : mlb_ped.06
\end_layout

\begin_layout LyX-Code
        C-shell script     : mlb_script.06.sh
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
hrule
\end_layout

\end_inset

 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:sage"

\end_inset

Convert to S.A.G.E.
 4.0 format
\end_layout

\begin_layout Standard
S.A.G.E 4.0 files created by Mega2: 
\end_layout

\begin_layout LyX-Code
        Pedigree file:         sage4_ped.06
\end_layout

\begin_layout LyX-Code
        Locus file:            sage4_dat.06
\end_layout

\begin_layout LyX-Code
        Parameter file:        sage4_par.06
\end_layout

\begin_layout LyX-Code
        Map file:              sage4_map.06 
\end_layout

\begin_layout Standard
The pedigree file is identical to that produced by the older version of
 S.A.G.E., except that it does not contain the analysis name at the start of
 each record.
 The locus file formats are the same.
 The map file is a new addition.
 It lists marker loci and the distances between them: 
\end_layout

\begin_layout LyX-Code
genome, map=Haldane
\end_layout

\begin_layout LyX-Code
{
\end_layout

\begin_layout LyX-Code
  region=chr6
\end_layout

\begin_layout LyX-Code
  {
\end_layout

\begin_layout LyX-Code
    marker = D06G025
\end_layout

\begin_layout LyX-Code
    theta = 0.04431213
\end_layout

\begin_layout LyX-Code
    marker = D06G028
\end_layout

\begin_layout LyX-Code
    theta = 0.0381648
\end_layout

\begin_layout LyX-Code
    marker = D06G034
\end_layout

\begin_layout LyX-Code
    theta = 0.01400026
\end_layout

\begin_layout LyX-Code
    marker = D06G035
\end_layout

\begin_layout LyX-Code
    theta = 0.05306726
\end_layout

\begin_layout LyX-Code
    marker = D06G041
\end_layout

\begin_layout LyX-Code
    theta = 0.02094853
\end_layout

\begin_layout LyX-Code
    marker = D06G043
\end_layout

\begin_layout LyX-Code
  }
\end_layout

\begin_layout LyX-Code
}                     
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
The parameter file contains information about the pedigree file records.
 It should also contain an 
\begin_inset Quotes eld
\end_inset

analysis
\begin_inset Quotes erd
\end_inset

 description section at the bottom which is not currently generated by Mega2.
 The user should make sure to insert his/her own sections inside the parameter
 file.
 
\begin_inset Newline newline
\end_inset

 The pedinfo program can by run on the Mega2-generated files straightaway,
 without any modifications.
 
\begin_inset Newline newline
\end_inset

 S.A.G.E.
 4.0 flags the pedigree file currently produced for X-linked data as inconsistent.
 This is seen in male offspring which are written down as homozygotes by
 Mega2.
 When we are better aware of how S.A.G.E.
 4.0 handles X-linked marker data, Mega2 will also be updated with the correct
 format.
 Meanwhile, the user should use this option only for autosomal and pseudo-autoso
mal data.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:pre-makeped"

\end_inset

Convert to pre-makeped format
\end_layout

\begin_layout Standard
Pre-makeped files created by Mega2: 
\end_layout

\begin_layout LyX-Code
        Pedigree file:         Ppedin.06
\end_layout

\begin_layout LyX-Code
        Locus file:            Pdatain.06
\end_layout

\begin_layout Standard
This is analogous to the Linkage format option which generates post-makeped
 format files.
 If the input pedigree file was in post-makeped file with broken loops,
 this option will reconnect the loops.
 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:merlinsimwalk2-npl"

\end_inset

Convert to Merlin-SimWalk2 format
\end_layout

\begin_layout Standard
Output files created by Mega2 for Merlin:
\begin_inset Newline newline
\end_inset

 Note that the Merlin format file have new names.
\end_layout

\begin_layout LyX-Code
        Pedigree file:        sw2merlin_ped.06
\end_layout

\begin_layout LyX-Code
        Locus file:           sw2merlin_data.06
\end_layout

\begin_layout LyX-Code
        Map file:             sw2merlin_map.06
\end_layout

\begin_layout LyX-Code
	    Frequency file:       sw2merlin_freq.06
\end_layout

\begin_layout LyX-Code
        Order file:           sw2merlin_order.06
\end_layout

\begin_layout LyX-Code
        Perl script file:     sw2merlin2sw2.pl
\end_layout

\begin_layout Standard
Output files created by Mega2 for SimWalk2-NPL: 
\end_layout

\begin_layout LyX-Code
        Locus file:           LOCUS.06
\end_layout

\begin_layout LyX-Code
        Pedigree file:        PEDIGREE.06
\end_layout

\begin_layout LyX-Code
        Penetrance file:      PEN.06
\end_layout

\begin_layout LyX-Code
        Simwalk2 batch file:  BATCH2.06
\end_layout

\begin_layout LyX-Code
        C-Shell script:       npl.06.sh
\end_layout

\begin_layout Standard
In addition files are created which will generate R-graphics plots after
 the SimWalk2 analysis has been run.
 These are: 
\end_layout

\begin_layout LyX-Code
        Perl script file:     Rsimwalk2.pl
\end_layout

\begin_layout LyX-Code
        R-script file:        Rsimwalk2.R
\end_layout

\begin_layout LyX-Code
        Shell file to run R:  Rsimwalk2.sh
\end_layout

\begin_layout Standard
The C-shell script npl.06.sh runs Merlin on the Merlin format files to create
 exact npl scores for pedigrees which are amenable to exact computations
 i.e.
 do not require a great deal of computation.
 Merlin can be instructed to limit the amount of time spent on each pedigree
 by means of the
\emph on
 --minutes
\emph default
 switch.
 Currently, this value is set to
\series bold
 1 minute
\series default
 inside the Pedigrees that cannot be handled by Merlin are then analyzed
 by SimWalk2's NPL option, and Merlin's exact scores incorporated into the
 final STATS.06.ALL file which is the output file created by SimWalk2.
 
\begin_inset Newline newline
\end_inset

 At this point the Rsimwalk2.sh script should be invoked to generate postscript
 plots using R from the SimWalk2 output.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:prest"

\end_inset

Convert to PREST format
\end_layout

\begin_layout Standard
Output files created by Mega2 for PREST: 
\end_layout

\begin_layout LyX-Code
        Pedigree file : prest_ped.06
\end_layout

\begin_layout LyX-Code
        Chrom file    : prest_chrom.06
\end_layout

\begin_layout LyX-Code
        Shell file    : prest_script.06.sh
\end_layout

\begin_layout LyX-Code
        Locus file    : prest_loc.06
\end_layout

\begin_layout LyX-Code
        Genotype file : prest_geno.06
\end_layout

\begin_layout Standard
If there are multiple chromosomes, the following files are created:: 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
        Pedigree file : prest_ped.all
\end_layout

\begin_layout LyX-Code
        Chrom file    : prest_chrom.all
\end_layout

\begin_layout LyX-Code
        Shell file    : prest_script.all.sh
\end_layout

\begin_layout LyX-Code
        Locus file    : prest_loc.02
\end_layout

\begin_layout LyX-Code
        Genotype file : prest_geno.02
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
        Locus file    : prest_loc.03
\end_layout

\begin_layout LyX-Code
        Genotype file : prest_geno.03
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
        Locus file    : prest_loc.04
\end_layout

\begin_layout LyX-Code
        Genotype file : prest_geno.04
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout LyX-Code
        Locus file    : prest_loc.05
\end_layout

\begin_layout LyX-Code
        Genotype file : prest_geno.05
\end_layout

\begin_layout LyX-Code
==========================================================
\end_layout

\begin_layout Standard
The shell script prest_script.all.sh runs PREST over the marker data on the
 selected chromosomes to produce three output files: 
\begin_inset Newline newline
\end_inset

 prest_out1, prest_out2 and prest_out3
\begin_inset Newline newline
\end_inset

 and writes errors (if any) into prest_error.
 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:pap"

\end_inset

Convert to PAP format
\end_layout

\begin_layout Standard
Output files created by Mega2 for PAP: 
\end_layout

\begin_layout LyX-Code
        Pedigree file :   trip.06
\end_layout

\begin_layout LyX-Code
        Header file :     header.06
\end_layout

\begin_layout LyX-Code
        Phenotype file :  phen.06
\end_layout

\begin_layout LyX-Code
        Population file : popln.06
\end_layout

\begin_layout LyX-Code
        C-shell file :    pap_script.06.sh
\end_layout

\begin_layout Standard
The C-shell script simply copies the rest of the files into files with the
 proper names as required by PAP, e.g.
 trip.06 into trip.dat, header.06 into header.dat and so on.
 This option creates separate sets of files for each chromosome.
 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:merlin"

\end_inset

Convert to Merlin format
\end_layout

\begin_layout Standard
The Merlin format locus file used to be in Linkage format.
 It was brought to our attention that for a linkage format locus file, Merlin
 ignores the frequency and map files, even if they are specified via the
 -f and -m options.
 It uses allele frequencies and recombination fractions from the locus file
 instead.
 Therefore, we have now modified Mega2 to create a QTDT format file instead,
 which is identical to the 
\begin_inset Quotes eld
\end_inset

names
\begin_inset Quotes erd
\end_inset

 file used by Mega2, so that Merlin is forced to use the frequency and map
 files created by Mega2.
\end_layout

\begin_layout Standard
Output files created by Mega2 for Merlin:
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
        Pedigree file :   merlin_ped.06
\end_layout

\begin_layout LyX-Code
        Locus file :      merlin_dat.06
\end_layout

\begin_layout LyX-Code
	    Map file:         merlin_map.06
\end_layout

\begin_layout LyX-Code
	    Frequency file:   merlin_freq.06
\end_layout

\begin_layout LyX-Code
	    C-shell script:   merlin.06.sh
\end_layout

\begin_layout Standard
Merlin also sets up the following files for creating LOD score curves: 
\end_layout

\begin_layout LyX-Code
        R-script file:        Rmerlin.01.R
\end_layout

\begin_layout LyX-Code
        Shell file to run R:  Rmerlin.01.sh
\end_layout

\begin_layout Standard
Merlin files are created separately for each chromosome except for the shell-scr
ipt, which is created only once.
 This option also allows the user to choose which pedigree and person field
 to select.
 See the section on 
\begin_inset Quotes eld
\end_inset

using Ped, Per and ID identifiers in the pedigree file
\begin_inset Quotes erd
\end_inset

 .
 
\begin_inset Newline newline
\end_inset

 Merlin now allows the user to enter a string containing valid Merlin analysis
 options selected from a list displayed at the beginning of this menu.
 (these can also be seen at the beginning of each run of Merlin).
 Some of these options such as --steps, --grid etc.
 should be followed by a numeric argument, and Mega2 checks for this as
 well.
 Merlin graphics are only set up in --markerNames option is not selected,
 and if either or both of the linkage options are selected (--npl and --pairs).
 
\end_layout

\begin_layout Standard
Please note that Merlin requires a sex-averaged map as well when the user
 sets up for sex-specific analysis (Value_Genetic_Distance_SexTypeMap =
 1 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Value_Genetic_Distance_SexTypeMa"

\end_inset

).
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:loki"

\end_inset

Convert to Loki format
\end_layout

\begin_layout Standard
Output files created by Mega2 for Loki:
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
     Pedigree file:               Loki_ped.01
\end_layout

\begin_layout LyX-Code
     Frequency file:              Loki_freq.01
\end_layout

\begin_layout LyX-Code
     Map file:                    Loki_map.01
\end_layout

\begin_layout LyX-Code
     Marker control file:         Loki_locus.01
\end_layout

\begin_layout LyX-Code
     Link control file:           Loki_link.01
\end_layout

\begin_layout LyX-Code
     Overall Control file:        Loki_control.01
\end_layout

\begin_layout LyX-Code
     Overall Parameter file:      Loki_param.01
\end_layout

\begin_layout LyX-Code
     C-shell script:              Loki.01.sh
\end_layout

\begin_layout Standard
If multiple chromosomes are selected, Loki sets up chromosome-specific analyses
 as well as a combined analysis.
 In addition to the files above it will set up the following: 
\end_layout

\begin_layout LyX-Code
     Combined Control file for all chromosomes:   Loki_control.all
\end_layout

\begin_layout LyX-Code
     Combined Parameter file for all chromosomes: Loki_param.all
\end_layout

\begin_layout Standard
Combined analysis also requires the chromosome-specific files described
 above.This option also allows the user to choose which pedigree and person
 field to select.
 See the section on 
\begin_inset Quotes eld
\end_inset

using Ped, Per and ID identifiers in the pedigree file
\begin_inset Quotes erd
\end_inset

 .
 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:mendel"

\end_inset

Convert to Mendel format
\end_layout

\begin_layout Standard
Starting with version 4.2, Mega2 creates only in CSV format (comma-separated
 values).
\end_layout

\begin_layout Standard
Output files created by Mega2 for Mendel7:
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
     Pedigree file:               mendel_ped.01
\end_layout

\begin_layout LyX-Code
     Map file:                    mendel_map.01
\end_layout

\begin_layout LyX-Code
     Definition file:             mendel_locus.01
\end_layout

\begin_layout LyX-Code
     Control file:                mendel_control.01
\end_layout

\begin_layout LyX-Code
     Penetrance file:             mendel_pen.01
\end_layout

\begin_layout Standard
Note that the locus and variable files are now combined into a single definition
 file .
 In addition, the penetrance file is not created if there are no affection
 status loci.
 
\begin_inset Newline newline
\end_inset


\series bold
 Handling trait penetrances
\series default
 If all affection traits selected for output have a single liability class,
 the penetrance file is not written.
 Rather a simple penetrance model is defined inside the Mendel control file.
 However, if one or more affection status loci have multiple liability classes,
 these are written separately into a penetrance file with three pentrances
 per person, whose affection status in known.
 If the affection status is missing, then this person is assigned a penetrance
 of 1.0 for all three possible underlying genotypes.
 
\begin_inset Newline newline
\end_inset

 This is in keeping with the latest Mendel documentation, and you should
 fully understand how Mendel treats affection data before you set up files
 for Mendel using Mega2.
\end_layout

\begin_layout Standard
This option also allows the user to choose which pedigree and person field
 to select.
 See the section on 
\begin_inset Quotes eld
\end_inset

using Ped, Per and ID identifiers in the pedigree file
\begin_inset Quotes erd
\end_inset

 .
 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:sup"

\end_inset

Convert to SUP format
\end_layout

\begin_layout Standard
Output files created by Mega2 for SUP:
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
        Pedigree file:        sup_simped.01
\end_layout

\begin_layout LyX-Code
        SLINK locus file:     sup_simdata.01
\end_layout

\begin_layout LyX-Code
        SUP locus file:       sup_locus.all
\end_layout

\begin_layout LyX-Code
        SLINK control file:   slinkin.01
\end_layout

\begin_layout LyX-Code
        SUP shell file:       sup.01.sh
\end_layout

\begin_layout Standard
If the pedigree data contains either loops (pre-makeped format) or loop-breakers
 (post-makeped format), then three additional files are created: 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout LyX-Code
        Mega2 locus file:     sup_mega2_locus.01
\end_layout

\begin_layout LyX-Code
        Mega2 map file:       sup_mega2_map.01
\end_layout

\begin_layout LyX-Code
        Mega2 batch file:     sup_mega2_batch.01
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:plink"

\end_inset

Convert to PLINK format
\end_layout

\begin_layout Standard
Output files created by Mega2 for PLINK:
\begin_inset Newline newline
\end_inset

 To make running PLINK easier, we have adopted the PLINK convention for
 file naming rather than the Mega2 convention.
 Thus, the 
\begin_inset Quotes eld
\end_inset

fam
\begin_inset Quotes erd
\end_inset

, 
\begin_inset Quotes eld
\end_inset

map
\begin_inset Quotes erd
\end_inset

, and 
\begin_inset Quotes eld
\end_inset

lgen
\begin_inset Quotes erd
\end_inset

 file have a common prefix, as below: 
\end_layout

\begin_layout LyX-Code
        Pedigree file:    plink.05.fam
\end_layout

\begin_layout LyX-Code
        Map file:         plink.05.map
\end_layout

\begin_layout LyX-Code
        Genotype file:    plink.05.lgen
\end_layout

\begin_layout Standard
If there is a single trait, the phenotypes are written into the 
\begin_inset Quotes eld
\end_inset

fam
\begin_inset Quotes erd
\end_inset

 file.
 If multiple traits are combined into one output, these are written into
 a separate phenotype file named: 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Phenotype file: plinkpheno.05
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
The shell script for running PLINK is named: 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Shell file: plinkshell.05
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Since Family and phenotype information do not depend on marker and genotypes,
 we have saved on space requirements by creating an overall family and phenotype
 file where output includes multiple chromosomes.
 Then the shell script automatically creates symbolic links to these files
 with the appropriate names in order to run chromosome-by-chromosome analysis.
\end_layout

\begin_layout Standard
This option allows the user to choose which pedigree and person field to
 select.
 See the section on 
\begin_inset Quotes eld
\end_inset

using Ped, Per and ID identifiers in the pedigree file
\begin_inset Quotes erd
\end_inset

 .
 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
hrule
\end_layout

\end_inset

 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:cranefoot"

\end_inset

Convert to Cranefoot format
\end_layout

\begin_layout Standard
Output files created by Mega2 for Cranefoot 3.2.3:
\begin_inset Newline newline
\end_inset

 The following chromosome specific files are created for Cranefoot: 
\end_layout

\begin_layout LyX-Code
        Pedigree file:    crnft_ped.05
\end_layout

\begin_layout LyX-Code
	    Control file:     crnft_control.05
\end_layout

\begin_layout Standard
If there are multiple chromosomes in the data, the combined shell script
 is named 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
C-shell file: crnftshell.all.sh
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
Chromosome-specific shell scripts are named: 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
C-Shell file: crnftshell.05.sh
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
This option allows the user to choose which pedigree and person field to
 select.
 See the section on 
\begin_inset Quotes eld
\end_inset

using Ped, Per and ID identifiers in the pedigree file
\begin_inset Quotes erd
\end_inset

 .
 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
hrule
\end_layout

\end_inset

 
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:mega2"

\end_inset

Convert to Mega2 format
\end_layout

\begin_layout Standard
The following chromosome specific files are created for Mega2 format: 
\end_layout

\begin_layout LyX-Code
     Pedigree file:               pedin.01.mega2
\end_layout

\begin_layout LyX-Code
     Names file:                  names.01.mega2
\end_layout

\begin_layout LyX-Code
     Map file:                    map.01.mega2
\end_layout

\begin_layout LyX-Code
     Frequency file:              frequency.01.mega2
\end_layout

\begin_layout LyX-Code
     Penetrance file:             penetrance.01.mega2
\end_layout

\begin_layout Standard
Note that the default output file names have been chosen to match the Mega2
 input file naming convention.
 Thus, within a subsequent run, Mega2 will easily detect these as valid
 input files if you specify the extension 
\begin_inset Quotes eld
\end_inset

01.mega2
\begin_inset Quotes erd
\end_inset

 in the input menu.
 If multiple chromosomes are combined within a single set of output files,
 then the extension 
\begin_inset Quotes eld
\end_inset

all
\begin_inset Quotes erd
\end_inset

 will be used instead of chromosome numbers.
 This option allows covariates, and also supports the selection of different
 individual and pedigree ID fields.
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:iqlsidcoefs"

\end_inset

Convert to IQLS/Idcoefs format
\end_layout

\begin_layout Standard
The following chromosome specific files are created for IQLS/Idcoefs:
\end_layout

\begin_layout LyX-Code
     IQLS pedigree file:        IQLS_pedigree.05
\end_layout

\begin_layout LyX-Code
     IQLS marker file:          IQLS_marker.05
\end_layout

\begin_layout LyX-Code
     IQLS parameter file:       IQLS_parameter.05
\end_layout

\begin_layout LyX-Code
     IQLS shell script file:    IQLS.05.sh
\end_layout

\begin_layout LyX-Code
     Idcoefs pedigree file:     Idcoefs_pedigree.05
\end_layout

\begin_layout LyX-Code
     Idcoefs study file:        Idcoefs_study.05
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:fbat"

\end_inset

Convert to FBAT format
\end_layout

\begin_layout Standard
The following chromosome specific files are created for FBAT:
\end_layout

\begin_layout LyX-Code
     FBAT phenotype file:   fbat.phe
\end_layout

\begin_layout LyX-Code
     FBAT R code file:      fbat.R
\end_layout

\begin_layout LyX-Code
     FBAT shell file:       fbat.all.sh
\end_layout

\begin_layout LyX-Code
     FBAT commands file:    fbat.cmd.txt
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
     FBAT pedigree file:    fbat.05.ped
\end_layout

\begin_layout LyX-Code
     FBAT shell file:       fbat.05.sh
\end_layout

\begin_layout LyX-Code
     FBAT R hdr file:       Rfbat.05.hdr
\end_layout

\begin_layout LyX-Code
     FBAT map file:         fbat.05.map
\end_layout

\begin_layout Standard
The first file will be created only if there is more than one trait.
 The next file is an R program that parses the default FBAT output and produces
 graphs of the significance.
 The 
\emph on
fbat.all.sh
\emph default
 script will run the others scripts produced for all the chromosomes and
 traits.
 The 
\emph on
fbat.cmd.txt
\emph default
 script issues the commands for FBAT analyses.
 It is expected that you will change this file to suit your needs.
\end_layout

\begin_layout Standard
The next set of 4 files get repeated for each chromosome (if requested)
 and for each trait (if requested).
 The 
\emph on
ped
\emph default
 and 
\emph on
map
\emph default
 files satisfy requirements of FBAT.
 The 
\emph on
sh
\emph default
 file runs FBAT with the 
\emph on
ped
\emph default
 and 
\emph on
map
\emph default
 input performing the 
\emph on
fbat.cmd.txt
\emph default
 tasks and then runs the 
\series bold
fbat.R
\series default
 program to collect and plot the results.
 Finally, the 
\emph on
hdr
\emph default
 file is used by 
\series bold
nplplot
\series default
\emph on
 
\emph default
to provide arguments to the plot.
\end_layout

\begin_layout Standard
Note: The FBAT program requires that an affection trait be specified.
 Mega2 will choose the first affection phenotype from the phenotype list
 for FBAT's affection.
 If all the phenotypes are quantitative, an error will be given.
 Further, the trait selection menu can be used to select any affection trait
 and make it the first trait.
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:pangaea"

\end_inset

Convert to PANGAEA MORGAN format 
\begin_inset CommandInset label
LatexCommand label
name "sub:Detailed-info-Pangaea-Morgan"

\end_inset


\end_layout

\begin_layout Standard
\begin_inset Quotes eld
\end_inset

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.
\begin_inset Quotes erd
\end_inset

 (Taken from the tutorial introduction.) The 
\begin_inset Quotes eld
\end_inset

Morgan tutorial
\begin_inset Quotes erd
\end_inset

 is available at 
\begin_inset Flex URL
status open

\begin_layout Plain Layout

http://www.stat.washington.edu/thompson/Genepi/MORGAN/morgan311-tut-html/morgan-tut.
html
\end_layout

\end_inset

; there are also example data files that are provided to match the tutorial.
 
\end_layout

\begin_layout Standard
The software download is available via 
\begin_inset Flex URL
status open

\begin_layout Plain Layout

http://www.stat.washington.edu/thompson/Genepi/MORGAN/Morgan.shtml
\end_layout

\end_inset

 We have used version 3.1.1 in our Mega2 development work.
 You should 
\begin_inset Quotes eld
\end_inset


\emph on
untar
\emph default

\begin_inset Quotes erd
\end_inset

 the release file, 
\series bold
morgan311_release.tgz,
\series default
 (in our case) into a convenient directory and 
\begin_inset Quotes eld
\end_inset


\emph on
make
\emph default

\begin_inset Quotes erd
\end_inset

 the software.
 The are several 
\emph on
README
\emph default
 files that explain more of the details of 
\series bold
MORGAN
\series default
.
 
\end_layout

\begin_layout Standard
One very useful thing to note is that in each subdirectory that contains
 one or more executable programs (as opposed to libraries), there is a 
\begin_inset Quotes eld
\end_inset


\emph on
Gold
\emph default

\begin_inset Quotes erd
\end_inset

 subdirectory that contains tests for the programs.
 By necessity, these 
\begin_inset Quotes eld
\end_inset


\emph on
Gold
\emph default

\begin_inset Quotes erd
\end_inset

 directories also contain sample parameter files for these programs.
 In addition, the directory that contains the 
\begin_inset Quotes eld
\end_inset

Gold
\begin_inset Quotes erd
\end_inset

 subdirectory also contains a 
\begin_inset Quotes eld
\end_inset

README_userdoc
\begin_inset Quotes erd
\end_inset

 file that explains the programs and shows all the possible parameters for
 the programs.
 There are many dozens of possible options that can be present in a parameter
 file.
\end_layout

\begin_layout Standard
All of the 
\series bold
MORGAN
\series default
 programs accept the same format data files: a pedigree file, a marker file,
 and a parameter file; Mega2 will produce these files for you.
 We have chosen several representative 
\series bold
MORGAN
\series default
 programs to produce data and parameter files for rather than for all the
 
\series bold
MORGAN
\series default
 programs: we support: 
\emph on
pedcheck
\emph default
, 
\emph on
kin
\emph default
, 
\emph on
translink
\emph default
, 
\emph on
lm_linkage
\emph default
, 
\emph on
lm_bayes
\emph default
, and two versions of 
\emph on
lm_ibdtests
\emph default
 one using likelihood-ratios and the other not.
 Our design is intended to make it easy for a user to take one of these
 existing examples and just replace the program to be run to get different
 
\series bold
MORGAN
\series default
 functionality.
 We also have split the parameter files into two subfiles.
 One that refers to the pedigree and marker data and the other has the parameter
s for the desired program to be run.
 We do not expect to have specified all the parameters that someone might
 want in all cases and expect that the user will change and customize the
 parameters as needed.
 We have chosen default parameter values based on the examples provided
 in the 
\begin_inset Quotes eld
\end_inset

Gold
\begin_inset Quotes erd
\end_inset

 directories of the 
\series bold
MORGAN
\series default
 distribution - the user should carefully tune the parameter values to their
 particular data set and desired analysis.
\end_layout

\begin_layout Standard
We provide shell scripts to run 
\series bold
MORGAN
\series default
 programs for all the traits and chromosome selected by Mega2.
 These scripts must find the appropriate program.
 We require that the environment variable 
\series bold
MORGAN_RELEASE
\series default
 be set to the directory that 
\series bold
MORGAN
\series default
 release was 
\emph on
untared
\emph default
 into.
 Please see the section on 
\series bold
Beagle
\series default
 (below) for a discussion of several strategies for setting an environment
 variable.
\end_layout

\begin_layout Standard
One final note: In principle, 
\series bold
MORGAN
\series default
 allows a single marker file to have data from different chromosomes.
 But not all the 
\series bold
MORGAN
\series default
 programs support this extension.
 We have chosen not to implement the feature.
 So all output generated by Mega2 will have a separate marker file for each
 chromosome.
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:beagle"

\end_inset

Convert to Beagle format
\begin_inset CommandInset label
LatexCommand label
name "sub:Detailed-info-Beagle"

\end_inset


\end_layout

\begin_layout Standard
The following chromosome specific files are created for Beagle:
\end_layout

\begin_layout LyX-Code
BEAGLE shell top file:      beagle.all.sh
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
BEAGLE bp marker file:      beagle.01.pmrk.gz
\end_layout

\begin_layout LyX-Code
or
\end_layout

\begin_layout LyX-Code
BEAGLE gd marker file:      beagle.01.gmrk.gz
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
BEAGLE genotype file:       beagle.01.bgl.gz
\end_layout

\begin_layout LyX-Code
BEAGLE shell file:          beagle.01.sh
\end_layout

\begin_layout Standard
Beagle is used for imputing genotypes, inferring haplotype phase, and performing
 genetic association analysis.
 Since Beagle can read gzipped files, the marker and genotype files are
 output in gzip format for those platforms that support it.
\end_layout

\begin_layout Standard

\series bold
Important:
\series default
 Note that to get correct results when converting to Beagle, your input
 data must contain the appropriate data.
 If you wish to set up data in the 
\begin_inset Quotes eld
\end_inset

unphased unrelated
\begin_inset Quotes erd
\end_inset

 Beagle format, then your input data must consist of unrelated case/control
 individuals.
 If you wish to set up data in the 
\begin_inset Quotes eld
\end_inset

unphased trio
\begin_inset Quotes erd
\end_inset

 Beagle format, then your input data must consist of parent-child trio families
 with unaffected parents and affected children.
 
\end_layout

\begin_layout Standard
Mega2 supports three of the valid Beagle genotype files (unphased unrelated,
 unphased trio, and unphased pair) through the sub-analysis options for
 Beagle (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "Beagle"

\end_inset

).
 Beagle marker files can contain either physical or genetic map information.
 Both genetic (.gmrk.gz) and physical (.pmrk.gz) map files will be output if
 the maps are available on input.
 However, if both physical and genetic maps exist, the genetic map will
 be used by the shell file produced by Mega2 .
 You may change this by editing the shell file.
\end_layout

\begin_layout Standard
Beagle is written in Java and is distributed in the form of a Java ARchive
 (.jar) file as 'beagle.jar'.
 The shell script produced by Mega2 assumes that the Beagle .jar file is
 referenced by the shell environment variable BEAGLE_JAR (which defaults
 to a file named 'beagle.jar' in the current directory).
 The shell script will generate an error if the .jar file is not found.
 
\end_layout

\begin_layout Standard
Here are some examples of how to set the BEAGLE_JAR environment variable
 so that the shell script may locate the beagle .jar file in a different
 directory other than the current directory.
 These examples assume that you have installed the Beagle distribution at
 the location '/usr/local/src/beagle'.
\end_layout

\begin_layout Standard
If you are using a Bash or Korn shell, then you would use:
\end_layout

\begin_layout Standard
export BEAGLE_JAR=/usr/local/src/beagle/beagle.jar 
\end_layout

\begin_layout Standard
If you are using a C shell (csh), then you would use:
\end_layout

\begin_layout Standard
setenv BEAGLE_JAR /usr/local/src/beagle/beagle.jar
\end_layout

\begin_layout Standard
If you are using using Windows, then the setting of the environment variable
 is implementation dependent.
 It is generally done through the 
\begin_inset Quotes eld
\end_inset

User variables
\begin_inset Quotes erd
\end_inset

 section of the 
\begin_inset Quotes eld
\end_inset

Environment Variables
\begin_inset Quotes erd
\end_inset

 button located on the 
\begin_inset Quotes eld
\end_inset

Advanced
\begin_inset Quotes erd
\end_inset

 tab of the 
\begin_inset Quotes eld
\end_inset

System Properties
\begin_inset Quotes erd
\end_inset

 of the 
\begin_inset Quotes eld
\end_inset

Control Panel
\begin_inset Quotes erd
\end_inset

 item.
 Once it is set it is retained when the user logs out and in again.
\end_layout

\begin_layout Standard
In practice the environment variable should be placed in a file to be defined
 once on user login.
 This file is dependent on the shell that you are using.
 For the Bash shell it is the user's .bash_profie file; for the C shell it
 is the user's .login file; for the Korn shell it is the user's .profile file.
\end_layout

\begin_layout Standard
If you encounter a 
\begin_inset Quotes eld
\end_inset

Java heap space
\begin_inset Quotes erd
\end_inset

 exception while running Beagle, please consult the 
\begin_inset Quotes eld
\end_inset

Memory Management
\begin_inset Quotes erd
\end_inset

 section of the Beagle documentation for further assistance.
\end_layout

\begin_layout Standard
Please note that Unphased pair and trio data is not permitted to have any
 Mendelian inconsistencies.
 Genotypes causing Mendelian inconsistencies for a trio must be replaced
 with missing genotypes.
\end_layout

\begin_layout Standard
Please also note that Loop_Over_Chromosomes = y is assumed when converting
 to Beagle format files (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Loop_Over_Chromosomes"

\end_inset

).
\end_layout

\begin_layout Standard
The genetic map output for Beagle will be in Haldane cM.
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:eigenstrat"

\end_inset

Convert to Eigenstrat format
\begin_inset CommandInset label
LatexCommand label
name "sub:Detailed-info-Eigenstrat"

\end_inset


\end_layout

\begin_layout Standard
The following chromosome-specific files are created for Eigenstrat:
\end_layout

\begin_layout LyX-Code
EIGENSTRAT shell top file:  eigenstrat.all.sh
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
PLINK map file:             eigenstrat.01.pedsnp
\end_layout

\begin_layout LyX-Code
EIGENSTRAT binary file snp: eigenstrat.01.bed
\end_layout

\begin_layout LyX-Code
EIGENSTRAT pedigree file:   eigenstrat.all.pedind
\end_layout

\begin_layout LyX-Code
or
\end_layout

\begin_layout LyX-Code
PLINK map file:             eigenstrat.01.map
\end_layout

\begin_layout LyX-Code
EIGENSTRAT pedigree file:   eigenstrat.01.ped
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
EIGENSTRAT shell file:      eigenstrat.01.sh
\end_layout

\begin_layout Standard
Eigenstrat will take as input several different file formats.
 The formats that Mega2 creates for Eigenstrat are either PLINK binary format
 or PLINK ped format.
 The PLINK binary format is more efficient.
 The analysis sub-option for this analysis mode is used to the type of output
 produced (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "Eigenstrat"

\end_inset

).
\end_layout

\begin_layout Standard
In order to successfully run Eigenstrat from the shell scripts produced
 by Mega2 the Eigenstrat bin directory must be put in the PATH.
 Here are some examples of how to set the PATH so that smartpca.perl and
 smarteigenstrat.perl may be found as suggested by the EIG4.2/EIGENSTRAT/README
 documentation file.
 These examples assume that you have installed the Eigenstrat distribution
 at the location '/usr/local/src/EIG4.2'.
\end_layout

\begin_layout Standard
If you are using the Bash or Korn shell, then you would use:
\end_layout

\begin_layout Standard
export PATH=/usr/local/src/EIG4.2/bin:$PATH
\end_layout

\begin_layout Standard
If you are using the C shell (csh), then you would use:
\end_layout

\begin_layout Standard
setenv PATH /usr/local/src/EIG4.2/bin:$PATH
\end_layout

\begin_layout Standard
If you are using Windows, then the setting of the environment variable is
 implementation dependent.
 It is generally done through the 
\begin_inset Quotes eld
\end_inset

System variables
\begin_inset Quotes erd
\end_inset

 section of the 
\begin_inset Quotes eld
\end_inset

Environment Variables
\begin_inset Quotes erd
\end_inset

 button located on the 
\begin_inset Quotes eld
\end_inset

Advanced
\begin_inset Quotes erd
\end_inset

 tab of the 
\begin_inset Quotes eld
\end_inset

System Properties
\begin_inset Quotes erd
\end_inset

 of the 
\begin_inset Quotes eld
\end_inset

Control Panel
\begin_inset Quotes erd
\end_inset

 item.
 Once it is set it is retained when the user logs out and in again.
\end_layout

\begin_layout Standard
Eigenstrat was designed for the correction of trait values based on ancestry
 (population stratification).
 This implies that you need to specify a trait to produce a pedigree file.
 If no trait is provided, then Mega2 will exit with an error message stating
 that a trait must be provided.
\end_layout

\begin_layout Standard
Please note that if you wish to run the 'ploteig' program, you will need
 to install 'gnuplot' (home page is http://www.gnuplot.info).
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:structure"

\end_inset

Convert to Structure format
\begin_inset CommandInset label
LatexCommand label
name "sub:Detailed-info-Structure"

\end_inset


\end_layout

\begin_layout Standard
The following chromosome specific files are created for Structure:
\end_layout

\begin_layout LyX-Code
STRUCTURE mainparams:       structure.01.mainparams
\end_layout

\begin_layout LyX-Code
STRUCTURE data:             structure.01.data
\end_layout

\begin_layout LyX-Code
STRUCTURE shell file:       structure.01.sh
\end_layout

\begin_layout Standard
Structure is used for inferring population structure using genotype data.
 Mega2 will produce files that are used by the "computational part" (sometimes
 referred to the structure kernel or the console) of the program 
\begin_inset Quotes eld
\end_inset

structure
\begin_inset Quotes erd
\end_inset

 that is written in C.
 On the 
\begin_inset Quotes eld
\end_inset

Download Structure 2.3.4
\begin_inset Quotes erd
\end_inset

 web page, to obtain the kernel version of 'structure' you should use the
 links allowing you to 
\begin_inset Quotes eld
\end_inset

Download package without front end.
\begin_inset Quotes erd
\end_inset

 (See 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://pritch.bsd.uchicago.edu/structure_software/release_versions/v2.3.4/html/struct
ure.html
\end_layout

\end_inset

).
\end_layout

\begin_layout Standard
The structure kernel reads two control files and one data file.
 Examples of both of these control files and a data file are included as
 a part of the structure download.
 One of the control files "extraparams" contains parameters that describes
 algorithm variable settings (e.g., how the program runs) and so is not of
 concern for our purposes in data file conversion.
 Mega2 will create an empty 
\begin_inset Quotes eld
\end_inset

extraparams
\begin_inset Quotes erd
\end_inset

 file if one does not already exist, but you may need to customize this
 file for your specific needs.
 The "mainparams" control file contains parameters that describe the data
 file used as input to structure, and so is of concern here.
 Mega2 will produce a data file which stores data for each individual on
 one line (rather than the default two lines per individual).
 Mega2 allows you to choose to associate a quantitative phenotype to a populatio
n identifier through the use of the batch file parameter Structure.PopDataPheno
 (See 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Structure.PopDataPheno"

\end_inset

).
\end_layout

\begin_layout Subsection
\begin_inset CommandInset label
LatexCommand label
name "ext:pseq"

\end_inset

Convert to PSEQ (PLINK/SEQ) format
\begin_inset CommandInset label
LatexCommand label
name "sub:Detailed-info-PSEQ"

\end_inset


\end_layout

\begin_layout Standard
The following files are created for PSEQ:
\end_layout

\begin_layout LyX-Code
PSEQ phenotype file:        pseq.phe
\end_layout

\begin_layout LyX-Code
PLINK map file:             pseq.all.bim
\end_layout

\begin_layout LyX-Code
PLINK pedigree file:        pseq.all.fam
\end_layout

\begin_layout LyX-Code
PLINK binary file snp:      pseq.all.bed
\end_layout

\begin_layout LyX-Code
PSEQ shell file:            pseq.all.sh
\end_layout

\begin_layout Standard
PLINK/SEQ is a program and library for working with human genetic variation
 data.
 It is independent of, but complementary to the PLINK package.
\end_layout

\begin_layout Standard
A shell script is produced that, when run, creates a new PLINK/SEQ project
 and loads the data files into the project-specific PLINK/SEQ database.
 The data are converted to PLINK SNP Major Binary format (e.g., .bed, .bim,
 .fam files) by Mega2 and loaded with the appropriate PLINK/SEQ commands.
 If additional phenotypes are present in the input data (since the .fam file
 can only hold one phenotype), a phenotype file is created, and also processed
 by the shell script that loads the data.
\end_layout

\begin_layout Standard
The PLINK/SEQ shell script takes two optional arguments.
 The first optional argument is the name of the PLINK/SEQ project that you
 are creating (the default value is 'pseq.01').
 The project will be created in the directory in which the shell script
 is run.
 The second optional argument should be the path to the PLINK/SEQ resource
 directory (the default value is the project name appended with the string
 '_res').
 For a more complete description of these concepts, please see the PLINK/SEQ
 documentation at 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://atgu.mgh.harvard.edu/plinkseq/
\end_layout

\end_inset

.
\end_layout

\begin_layout Standard
When the PLINK/SEQ shell script is run, after creating a new project, it
 copies the trio of PLINK files into the project 
\begin_inset Quotes eld
\end_inset

_out
\begin_inset Quotes erd
\end_inset

 folder before importing them into the PLINK/SEQ project.
 As PLINK/SEQ does not make a copy of the PLINK data, the trio of PLINK
 files must remain in the project folder - do not move them or delete them.
\end_layout

\begin_layout Section
Utilities included with Mega2 
\end_layout

\begin_layout Subsection
Converting linkage format files to Mega2 format - l2a.py 
\end_layout

\begin_layout Standard
The Mega2 format consists of input files which contain white-space delimited
 tabular data with mandatory column headers for each column of the data.
 We encourage you to use this format, as it is much more robust to data
 errors than the linkage format-based input files, and also allows more
 types of data to be specified.
 Therefore, we have also provided a Python script to convert your existing
 linkage format data files to the Mega2 format.
 The l2a.py utility script is described in detail inside the Mega2 input
 files section.
 
\end_layout

\begin_layout Subsection
Map making utilities 
\end_layout

\begin_layout Standard
These map making utilities are very old, and we have not used these in a
 long time (Instead we currently use the Genetic Map Interpolator (GMI)
 available from 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/register/
\end_layout

\end_inset

).
 These utilities consist of awk scripts for creating map files.
\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="3" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="left" valignment="top">
<column alignment="none" valignment="top" width="12cm">
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
mapmarsh.awk 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Script to convert a frameworkMap file created by the 'Build your own map'
 option of the Marshfield Center for Medical Genetics web page (
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.marshmed.org/genetics/
\end_layout

\end_inset

) to a Mega2 format map file.
 However, note that this will create a map file in Kosambi cM, whereas Mega2
 expects a map file in Haldane cM.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
mapout.awk 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Script to convert from the Mega2 format map file into a format that is easier
 to edit.
 This format gives the distances between each pair of adjacent markers,
 so we will call it the 'intermarker format'.
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
kos2hal.awk 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Script to convert from an intermarker format map file in Kosambi cM to a
 Mega2 format file in Haldane cM.
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard

\series bold
Example: 
\end_layout

\begin_layout Standard
Here I illustrate the commands I used to convert some framework map files
 downloaded from the Marshfield site (which are in Kosambi cM) into Mega2
 format map files in Haldane cM.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Standard
Comments are in '[ ]' brackets.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Standard

\series bold
NOTES:
\end_layout

\begin_layout Standard
1) Make sure you save the files from Marshfield as text-only.
 The 'mapmarsh.awk' script will not work properly otherwise.
 2) You may have to edit the files from Marshfield, as sometime some markers
 are missing or alternative marker names are used.
 
\end_layout

\begin_layout LyX-Code
mapmarsh.awk frameworkMap.20 20 > mapk.20
\end_layout

\begin_layout LyX-Code
mapmarsh.awk frameworkMap.21 21 > mapk.21
\end_layout

\begin_layout LyX-Code
mapmarsh.awk frameworkMap.22 22 > mapk.22
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout Standard
[So now we have three chromosome specific map files in Kosambi cM.
 We will place these in one file using the 'cat' command: ] 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
cat mapk.* > map.kos
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset

 [Now we must edit the 'map.kos' file to remove the extra internal title
 lines.] 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
vi map.kos
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset

 [ Convert this file into intermarker format:] 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
mapout.awk map.kos > mapin.kos
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset

 [ Convert the intermarker format file into a Mega2 format file in Haldane
 cM: ] 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
kos2hal.awk mapin.kos > map.hal
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset

 [ And here it is: ] 
\end_layout

\begin_layout LyX-Code
    Chr      Haldane cM  Name        Haldane  Theta  Kosambi
\end_layout

\begin_layout LyX-Code
    20           0.000   D20S103      10.981 0.09859   9.990
\end_layout

\begin_layout LyX-Code
    20          10.981   GATA149E11   14.146 0.12321  12.580
\end_layout

\begin_layout LyX-Code
    20          25.128   D20S851       8.916 0.08166   8.240
\end_layout

\begin_layout LyX-Code
    20          34.043   D20S604       6.707 0.06277   6.310
\end_layout

\begin_layout LyX-Code
    20          40.751   D20S470      17.011 0.14419  14.840
\end_layout

\begin_layout LyX-Code
    20          57.761   D20S478       8.904 0.08156   8.230
\end_layout

\begin_layout LyX-Code
    20          66.666   D20S481      20.622 0.16899  17.590
\end_layout

\begin_layout LyX-Code
    20          87.288   D20S480      18.243 0.15285  15.790
\end_layout

\begin_layout LyX-Code
    20         105.531   D20S171     
\end_layout

\begin_layout LyX-Code
    21           0.000   D21S1432     11.065 0.09926  10.060
\end_layout

\begin_layout LyX-Code
    21          11.065   D21S1437     13.032 0.11472  11.680
\end_layout

\begin_layout LyX-Code
    21          24.097   D21S1442     13.476 0.11813  12.040
\end_layout

\begin_layout LyX-Code
    21          37.573   D21S1440      3.858 0.03713   3.720
\end_layout

\begin_layout LyX-Code
    21          41.431   D21S2055     20.208 0.16623  17.280
\end_layout

\begin_layout LyX-Code
    21          61.640   D21S1446    
\end_layout

\begin_layout LyX-Code
    22           0.000   D22S420      17.553 0.14803  15.260
\end_layout

\begin_layout LyX-Code
    22          17.553   D22S1174     10.101 0.09146   9.250
\end_layout

\begin_layout LyX-Code
    22          27.654   D22S689       3.966 0.03813   3.820
\end_layout

\begin_layout LyX-Code
    22          31.620   D22S685       3.977 0.03823   3.830
\end_layout

\begin_layout LyX-Code
    22          35.597   D22S683      10.516 0.09484   9.600
\end_layout

\begin_layout LyX-Code
    22          46.113   D22S445     
\end_layout

\begin_layout Standard

\series bold
Other scripts:
\series default

\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="5" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="left" valignment="top">
<column alignment="none" valignment="top" width="15cm">
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
mapin.awk 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Script to convert an intermarker format map file (without the chromosome
 numbers indicated) into a Mega2 format map file.
 Handles only files with markers from a single chromosome.
 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
mapin2.awk 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Script to convert an intermarker format map file into a Mega2 format map
 file.
 Handles files with markers from multiple chromosomes.
 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
mapmen.awk 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Script to convert an intermarker format map file into a Mendel 4 format
 map file.
 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
mapsage.awk 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Script to convert a Mega2 format map file into a map file in the new SAGE
 format.
 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
mapsum.awk 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Script to rearrange a Mega2 format map file so that the locus name is in
 the first column.
 
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
NOTE: 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Enumerate
These script were developed quickly for my personal use, and so may not
 be very robust to unexpected input file formats.
 Please check the files that are made by these scripts carefully.
 
\end_layout

\begin_layout Enumerate
Under Linux, you will need to change the word 'nawk' to the word 'gawk'
 at the top of each file in order for these scripts to run.
 
\end_layout

\begin_layout Enumerate
The scripts must be executable.
 Use 'chmod +x script.awk' to make the 'script.awk' file executable.
\end_layout

\begin_layout Subsection
Creating a Mega2 omit file 
\begin_inset CommandInset label
LatexCommand label
name "sub:omit-file"

\end_inset


\end_layout

\begin_layout Standard
The script omit.awk can generate a mega2 format omit file from the error
 file produced by running Pedcheck.
 This is strongly recommended in order to identify and remove inconsistent
 genotypes from the pedigree data.
 
\end_layout

\begin_layout Standard
To use it, first run pedcheck to create a 'pedcheck.err' error file.
 Then use omit.awk to parse pedcheck.err and reformat the information into
 Mega2 omit file format:
\end_layout

\begin_layout LyX-Code
omit.awk pedcheck.err > omit.01
\end_layout

\begin_layout Standard
The resulting omit file will contain instructions to zero out all genotypes
 within a given pedigree for each marker that is Mendelianly-inconsistent.
 This approach is conservative, and works well when one has large numbers
 of small pedigrees.
 It does not work well if one has a few extremely large pedigrees, as then
 this approach ends up zeroing out an entire large pedigree at each Mendelianly-
inconsistent marker.
\end_layout

\begin_layout Subsection
Scripts to generate formatted output for Hardy-Weinberg test:
\end_layout

\begin_layout Standard
The distribution provides two Perl scripts 
\begin_inset Quotes eld
\end_inset

make_hew_table.pl
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

make_gen_table.pl
\begin_inset Quotes erd
\end_inset

.
 These are used from within Mega2 to format the raw output produced by Guo
 & Thompson's HWE program and Lazzeroni & Lange's 
\begin_inset Quotes eld
\end_inset

GEN
\begin_inset Quotes erd
\end_inset

 program respectively.
 They should be placed in inside a directory that is in the user's execution
 path, otherwise Mega2 will fail to create the appropriate tables.
\end_layout

\begin_layout Section
List of third-party applications used by Mega2
\begin_inset CommandInset label
LatexCommand label
name "sec:List-of-third-party"

\end_inset


\end_layout

\begin_layout Enumerate
R statistical package and R-libraries 
\end_layout

\begin_layout Enumerate
Python 
\end_layout

\begin_layout Enumerate
Perl 
\end_layout

\begin_layout Enumerate
Awk 
\end_layout

\begin_layout Enumerate
C-shell
\end_layout

\begin_layout Standard
For the most part Mega2 does not require external programs, except a few
 instances.
 
\end_layout

\begin_layout Standard
Below is a list of third-party tools, and the analysis options that require
 these applications.
\end_layout

\begin_layout Standard
For instructions on obtaining these programs, please consult the installation
 instructions.
\end_layout

\begin_layout Subsection
R statistical package and its libraries
\end_layout

\begin_layout Standard
R can be obtained from the CRAN web-site.
 
\end_layout

\begin_layout Standard
R is required for creating LOD score plots for SimWalk2's npl option, Allegro,
 Merlin-SimWalk2 option, and Merlin's NPL and variance components options.
 This requires the 
\series bold
nplplot
\series default
 library in addition to the base R libraries.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Standard
Two of the Hardy-Weinberg tests use R routines included in the R library
 
\series bold
Genetics
\series default
.
 Please note that the HWE options require the following libraries also to
 be installed: 
\end_layout

\begin_layout Quote
\begin_inset Tabular
<lyxtabular version="3" rows="6" columns="2">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
combinat 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
combinatorics utilities 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
gdata 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Various R programming tools for data manipulation 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
genetics 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Population Genetics 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
gregmisc 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Backward compatibility package for gregmisc bundle 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
gtools 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Various R programming tools 
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
mvtnorm 
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Multivariate Normal and T Distribution
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsubsection
R Installation
\end_layout

\begin_layout Standard
The web page that explains the R installation procedure and contains the
 binaries is at:
\end_layout

\begin_layout LyX-Code
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://cran.r-project.org/bin/windows/base/
\end_layout

\end_inset


\end_layout

\begin_layout Subsection
Python
\end_layout

\begin_layout Standard
Mega2 includes a Python script to convert some Merlin analyses output into
 nplplot-readable files.
 These consist of Merlin's NPL, parametric and VC options.
\end_layout

\begin_layout Subsubsection
Python Installation
\end_layout

\begin_layout Standard
The web page that explains the Python installation procedure and contains
 the binaries is at:
\end_layout

\begin_layout LyX-Code
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.python.org/getit/
\end_layout

\end_inset


\end_layout

\begin_layout Standard
There are several different binaries to choose from.
 It would probably be wise to use Python 2.7.x version in either 32 or 64
 bit formats.
\end_layout

\begin_layout Subsection
Perl
\end_layout

\begin_layout Standard
Perl scripts are used by several of the options to format intermediate output
 files for further processing.
 Instructions for downloading and installing these scripts can be found
 in the download and install section.
 Perl scripts are used in: 
\end_layout

\begin_layout Standard
Allegro, SimWalk2-NPL
\begin_inset Newline newline
\end_inset

 If the user opts to create graphical plots for the LOD scores, then output
 from these programs are formatted into the 
\emph on
nplplot
\emph default
 input format using perl scripts Rallegro.pl, Rmerlin.pl and Rsimwalk2.pl.
\end_layout

\begin_layout Standard
Formatting Merlin's output for use by SimWalk2 in the Merlin-SimWalk2 interface
 option is done by merlin2simwalk2.pl
\end_layout

\begin_layout Standard
Formatting output from the HWE and GEN programs for the Hardy-Weinberg testing
 is carried out by make_hwe_table.pl and make_gen_table.pl respectively.
\end_layout

\begin_layout Subsubsection
Perl Installation
\end_layout

\begin_layout Standard
The web page that explains the Perl installation procedure and contains
 the binaries is at:
\end_layout

\begin_layout LyX-Code
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://www.perl.org/get.html
\end_layout

\end_inset


\end_layout

\begin_layout Subsection
Awk
\end_layout

\begin_layout Standard
The Unix text-formatting utility awk or its platform-specific implementations
 gawk (GNU awk) and nawk (new awk on solaris machines) is used by the script
 produced by the Genehunter option.
 Currently, the compilation platform decides which awk utility to use: gawk
 is used on the Linux platform, nawk is used on Solaris, and awk is used
 by Darwin (Mac OSX).
\end_layout

\begin_layout Subsubsection
Awk Installation
\end_layout

\begin_layout Standard
The web page that explains the Gawk installation procedure and contains
 the binaries is at:
\end_layout

\begin_layout LyX-Code
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://gnuwin32.sourceforge.net/packages/gawk.htm
\end_layout

\end_inset


\end_layout

\begin_layout Subsection
C-shell
\end_layout

\begin_layout Standard
C-shell scripts are produced for the many of the analysis options.
 These C-shell scripts will carry out a default analysis with the target
 analysis program, and, in some cases, will also create plots of the results
 and generate custom track files for plotting within the UCSC browser.
\end_layout

\begin_layout Section
Changes made to Mega2
\end_layout

\begin_layout Subsection
Recent releases
\end_layout

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="21" columns="4">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="right" valignment="top">
<column alignment="none" valignment="middle">
<column alignment="none" valignment="middle">
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Type of release
\end_layout

\end_inset
</cell>
<cell alignment="right" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Version
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Release date
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\series bold
Valid until
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.7.1
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Oct 17, 2014
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
June 15, 2015
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.7.0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
May 15, 2014
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
June 15, 2015
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.6.2
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Feb 28, 2014
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
June 15, 2014
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.6.1
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Oct 21, 2013
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
June 15, 2014
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.6.0
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Sep 6, 2013
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
June 15, 2014
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.5.9
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
July 5, 2013
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
June 15, 2014
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.5.8
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
June 6, 2013
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
June 15, 2014
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.5.7
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
January 11, 2013
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
June 15, 2013
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.5.6
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
July 6, 2012
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
June 15, 2013
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.5.5
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
June 15, 2012
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
June 15, 2013
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.5.4
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
July 26, 2011
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
June 15, 2012
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.5.3
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
June 15, 2011
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version:
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.0 R5.1
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
June 15, 2010
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version: 
\end_layout

\end_inset
</cell>
<cell alignment="right" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.0 R5.0 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
December 31, 2009 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version: 
\end_layout

\end_inset
</cell>
<cell alignment="right" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.0 R4.0 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
October 4, 2009 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version: 
\end_layout

\end_inset
</cell>
<cell alignment="right" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.0 R3.1 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
July 12, 2009 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version: 
\end_layout

\end_inset
</cell>
<cell alignment="right" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.0 R3 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
June 15, 2009 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version: 
\end_layout

\end_inset
</cell>
<cell alignment="right" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.0 R2 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
April 15, 2009 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Patched version: 
\end_layout

\end_inset
</cell>
<cell alignment="right" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.0 R1 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
June 13, 2008 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
Release version: 
\end_layout

\end_inset
</cell>
<cell alignment="right" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
4.0 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
March 31, 2008 
\end_layout

\end_inset
</cell>
<cell alignment="none" valignment="top" usebox="none">
\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Subsection
Changes from Version 4.6.2 to Version 4.7.1 (Released Oct 16, 2014)
\end_layout

\begin_layout Itemize
Mega2 now gives you complete control to specify missing values for quantitative
 and affection phenotypes, both in the input data and for the data that
 Mega2 will output.
\end_layout

\begin_layout Itemize
Mega2's performance is almost twice as fast as Version 4.7.0
\end_layout

\begin_layout Itemize
Bug Fix: Allow 0 markers or 0 traits w/o generating voluminous warnings.
\end_layout

\begin_layout Itemize
Bug Fix: Omit file now (again) allows 0 for person to represent ALL -- the
 entire pedigree.
\end_layout

\begin_layout Itemize
Bug Fix: Detect missing suboption when it is required.
\end_layout

\begin_layout Subsection
Changes from Version 4.6.2 to Version 4.7.0 (Released May 15, 2014)
\end_layout

\begin_layout Itemize
Mega2 now passes non-numeric alleles to analysis programs that will accept
 this format (section 
\begin_inset CommandInset ref
LatexCommand ref
reference "par:Using-non-numeric-allele"

\end_inset

).
 Conversion to numeric alleles can still be requested if desired (section
 
\begin_inset CommandInset ref
LatexCommand ref
reference "force_numeric_alleles_cmd_line"

\end_inset

).
\end_layout

\begin_layout Itemize
Bug Fix: A number of problems with Beagle Analysis have been addressed.
\end_layout

\begin_layout Itemize
Bug Fix: Resolved an issue in specifying PLINK mode interactively.
\end_layout

\begin_layout Itemize
Bug Fix: Problems discovered via the CLANG/LLVM compiler have been addressed.
\end_layout

\begin_layout Subsection
Changes from Version 4.6.1 to Version 4.6.2 (Released Feb 28, 2014)
\end_layout

\begin_layout Itemize
Mega2 can now read VCF files (See section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:VCF-file-formats"

\end_inset

).
\end_layout

\begin_layout Itemize
Initial interactive interface screens have been modified to improve the
 specification of different input file types (See section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sec:The-input-menu"

\end_inset

).
\end_layout

\begin_layout Itemize
Bug Fix: Binary file support (mainly .bed files) was broken on Windows and
 Mingw platforms.
\end_layout

\begin_layout Subsection
Changes from Version 4.6.0 to Version 4.6.1 (Released Oct 21st, 2013)
\end_layout

\begin_layout Itemize
Enhancement: Mega2 can now produce PLINK/SEQ format files and a script for
 loading these these files into a PLINK/SEQ project (See section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Detailed-info-PSEQ"

\end_inset

).
\end_layout

\begin_layout Itemize
Bug fix: Mega2 4.6.0 had broken support for Linkage format input when using
 a 
\begin_inset Quotes eld
\end_inset

Names file
\begin_inset Quotes erd
\end_inset

 (section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Names-file"

\end_inset

).
\end_layout

\begin_layout Itemize
Enhancement: Added binaries for native Microsoft Windows 8 and MinGW built
 on Microsoft Windows 8.
\end_layout

\begin_layout Subsection
Changes from Version 4.5.9 to Version 4.6.0 (Released Sept 6th, 2013)
\end_layout

\begin_layout Itemize
Enhancement: Mega2 compresses allele data to handle much larger datasets.
\end_layout

\begin_layout Subsection
Changes from Version 4.5.8 to Version 4.5.9 (Released July 5th, 2013)
\end_layout

\begin_layout Itemize
Bug fix: Mega2 will now compile properly on Red Hat (RHEL), CentOS, and
 Solaris systems.
\end_layout

\begin_layout Subsection
Changes from Version 4.5.7 to Version 4.5.8 (Released June 6th, 2013)
\end_layout

\begin_layout Itemize
Enhancement: Mega2 can now convert to PANGAEA MORGAN format (See section
 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Analysis-Morgan-option"

\end_inset

)
\end_layout

\begin_layout Itemize
Enhancement: Mega2 can now convert to Beagle format (See section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Analysis-BEAGLE-option"

\end_inset

)
\end_layout

\begin_layout Itemize
Enhancement: Mega2 can now convert to Eigenstrat format (See section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Analysis-Eigenstrat-option"

\end_inset

)
\end_layout

\begin_layout Itemize
Enhancement: Mega2 can now convert to Structure format (See section 
\begin_inset CommandInset ref
LatexCommand ref
reference "sub:Analysis-Structure-option"

\end_inset

)
\end_layout

\begin_layout Itemize
Bug fix: Liability classes now work according to the manual.
\end_layout

\begin_layout Itemize
Bug fix: You can now specific a value to represent the missing value code
 for a quantitative trait.
\end_layout

\begin_layout Subsection
Changes from Version 4.5.6 to Version 4.5.7 (Released January 11th, 2013) 
\end_layout

\begin_layout Itemize
Enhancement: Mega2 PLINK Analysis can now generate binary format PLINK PED
 files.
\end_layout

\begin_layout Itemize
Enhancement: Mega2 can now generate files for FBAT analysis.
\end_layout

\begin_layout Itemize
Enhancement: Mega2 can now support non-human species.
\end_layout

\begin_layout Itemize
Enhancement: Mega2 allows a value to be specified for output to replace
 a missing quantitative value.
\end_layout

\begin_layout Itemize
Enhancement: Some of the internals of Mega2 have been rewritten to use classes/o
bjects.
\end_layout

\begin_layout Itemize
Enhancement: Mega2 code files are now c++ files and require a c++ compiler.
\end_layout

\begin_layout Itemize
Bug-fix: Improve Mac Xcode support.
\end_layout

\begin_layout Itemize
Bug-fix: The program to generate html from the text files (mega2log2html.pl)
 was not finding files.
\end_layout

\begin_layout Itemize
Bug-fix: Allow blank lines and comment lines in any of the files of the
 Mega2 format.
\end_layout

\begin_layout Itemize
Bug-fix: Allow menus to input and output X, Y, XY, MT and U as chromosomes
 without referencing explicit numeric values.
\end_layout

\begin_layout Subsection
Changes from Version 4.5.5 to Version 4.5.6 (Released July 6th, 2012) 
\end_layout

\begin_layout Itemize
Bug-fix: PLINK Ped file input in non-batch mode was broken.
\end_layout

\begin_layout Itemize
Bug-fix: Fix Mingw compilation issues.
\end_layout

\begin_layout Itemize
Bug-fix: Generate better error diagnostics.
\end_layout

\begin_layout Subsection
Changes from Version 4.5.4 to Version 4.5.5 (Released June 15th, 2012) 
\end_layout

\begin_layout Itemize
Enhancement: Mega2 now accepts PLINK binary PED input files.
\end_layout

\begin_layout Itemize
Enhancement: Mega2 now accepts PLINK PED input files.
\end_layout

\begin_layout Itemize
Enhancement: Mega2 now handles multiple genetic and/or physical maps in
 the MAP file.
\end_layout

\begin_layout Itemize
Enhancement: Mega2 now generates PLINK output files which may contain both
 a genetic and physical map.
\end_layout

\begin_layout Itemize
Enhancement: Selecting maps and outputting maps for analysis is more general
 and robust.
\end_layout

\begin_layout Itemize
Enhancement: Mega2 now uses much less storage to represent alleles and no
 longer copies allele sets.
\end_layout

\begin_layout Itemize
Bug-fix: Frequency calculations were incorrect for microsatellite alleles
 with more than 9 allele values.
\end_layout

\begin_layout Itemize
Bug-fix: Negative genetic distances between out of order markers are now
 replaced with the absolute value instead of 0.
\end_layout

\begin_layout Itemize
Bug-fix: The *.keys mapping file has been reformatted.
 And IDs have been made consistent between linkage input and Mega2 input.
\end_layout

\begin_layout Itemize
Bug-fix: In general, code in critical loops or using large memory allocations
 has been recoded for efficiency.
\end_layout

\begin_layout Subsection
Changes from Version 4.5.3 to Version 4.5.4 (Released July 26th, 2011) 
\end_layout

\begin_layout Itemize
Bug-fix: Attempting to convert to SimWalk2 - Mistyping format with an input
 file that contained no trait loci resulted in a segmentation fault.
\end_layout

\begin_layout Itemize
Bug-fix: Attempting to convert to Mendel output (Option 29) resulted in
 a segmentation fault.
\end_layout

\begin_layout Itemize
Bug-fix: The install.sh installation script incorrectly failed to install
 a binary version when available; it always compiled from source.
\end_layout

\begin_layout Itemize
Bug-fix: The mega2log2html.pl Perl program in some cases tried to read from
 a closed file handle.
\end_layout

\begin_layout Subsection
Changes from Version 4.0 R5.2 Beta -
\begin_inset Formula $>$
\end_inset

 Version 4.5.3 (Released June 15th, 2011) 
\end_layout

\begin_layout Itemize
Enhancement: Mega2 now supports conversion to IQLS/Idcoefs format.
\end_layout

\begin_layout Itemize
Enhancement: Changes were made towards making Mega2 64-bit compatible.
\end_layout

\begin_layout Itemize
Enhancement: The memory allocation routines were enhanced to better report
 out-of-memory errors.
\end_layout

\begin_layout Itemize
Enhancement: Removed the Python code from the Mega2 source code, replacing
 it with C++ code instead.
 This should avoid installation problems that some users were encountering
 in the Cygwin environment because their Python libraries/headers were out
 of sync with the ones used to compile Mega2.
\end_layout

\begin_layout Itemize
Bug-fix: The use of unique Ped_Per IDs like 1_21 was improperly turned on
 in PAP, so the resulting trip.dat was no longer in proper PAP format.
\end_layout

\begin_layout Itemize
Bug-fix: When doing quantitative summaries output to a sub-directory, the
 phenotyping table got written into the subdirectory, but the header got
 written into the root directory.
\end_layout

\begin_layout Itemize
Bug-fix: When converting Mega2 files to Merlin format, the MEGA2.ERR file
 had two strange extraneous lines at the end.
\end_layout

\begin_layout Itemize
Bug-fix: When converting to Merlin while zeroing out half-typed people,
 the 
\begin_inset Quotes eld
\end_inset

Half-typed genotypes
\begin_inset Quotes erd
\end_inset

 in MEGA2.RESET was incomplete.
\end_layout

\begin_layout Itemize
Bug-fix: When default batch file options are set to 'yes', Mega2 no longer
 stops at the 'SPLINK option selection' menu when in batch mode.
\end_layout

\begin_layout Itemize
Bug-fix: Under certain conditions, an array storing trait loci indicies
 was too short in the locus reordering function ReOrderLociByPositionNumber.
\end_layout

\begin_layout Itemize
Bug-fix: When only markers were selected, the SUP routine read off the end
 of the line and created incorrect files.
 SUP requires at least one trait locus, so this restriction has been implemented.
\end_layout

\begin_layout Itemize
Bug-fix: Conversion to SLINK format did not work correctly if the trait
 locus was not at the beginning of the locus list.
\end_layout

\begin_layout Itemize
Bug-fix: Corrected behavior of the 'Disease locus selection menu' for the
 SLINK option.
 It was giving the wrong prompt and not correctly indicating the currently
 selected option.
 
\end_layout

\begin_layout Itemize
Bug-fix: Under certain conditions, one of the theta values was being written
 into the wrong position of the 'theta' array when converting to SLINK format.
\end_layout

\begin_layout Itemize
Bug-fix: When setting up for a Quantitative Trait Summary in batch mode,
 the loci were reordered twice when they only needed to be reordered once.
 
\end_layout

\begin_layout Itemize
Bug-fix: The create_nuked_fids() function, when trying to rename the pedigree
 ID, wrote a string into itself, generating a 'source and destination overlap
 in memcpy' error.
\end_layout

\begin_layout Itemize
Bug-fix: Failed to detect when the input batch file contained a trait number
 out of bounds.
 Added this check in.
\end_layout

\begin_layout Itemize
Bug-fix: In copy_annotated_to_premake(), there was an error in the logic
 which led to reading a value from beyond the end of the persons[] array.
\end_layout

\begin_layout Itemize
Bug-fix: There was a failure to initialize the missing_quant value correctly
 when none of the trait loci were quantitative and only the covariates were
 quantitative.
\end_layout

\begin_layout Itemize
Bug-fix: When manually-reordering using the GeneHunter option, the code
 contained an error where it tried to access the '-1' element of the global_trai
t_entries[] array.
\end_layout

\begin_layout Itemize
Bug-fix: check_map_positions() was not printing error messages properly.
\end_layout

\begin_layout Itemize
Bug-fix: The 'Locus Reordering Menu' in the Quantitative Summary option
 was not working correctly.
\end_layout

\begin_layout Itemize
Bug-fix: When reading an annotated pedigree file that contains unmapped
 markers (chromosome 'U'), the cumulative counts of markers per chromosomes
 in the chromo_loci_counts array was missing an entry for the 'unknown'
 chromosome.
\end_layout

\begin_layout Itemize
Bug-fix: The 'Select by locus number' option of the 'Locus Reordering Menu'
 was not working correctly when Mega2 was run interactively (It worked correctly
 when Mega2 was run in batch mode).
\end_layout

\begin_layout Itemize
Bug-fix: When attempting to break two loops in a pedigree, Mega2 incorrectly
 assigned proband/loop IDs 1 2 2 2, but this should have been (2,2) (3,3)
 or (1,2) (3,3).
 The person assigned proband ID 1 on input ended up being a member of the
 second loop.
 Since the user can avoid such an error by changing their choice of proband
 or by changing their loop breaker selection criteria, a partial solution
 was implemented so that Mega2 exits whenever it is trying to assign a loop
 breaker who is the proband to a loop other than loop number 2.
 
\end_layout

\begin_layout Itemize
Bug-fix: When the user chose to put the output files in a new output folder,
 the resulting MEGA2run.html did not work properly because the time-dated
 summary folder was not being copied into the new output folder.
\end_layout

\begin_layout Subsection*
Changes from Ver 4.0 R5.1 -
\begin_inset Formula $>$
\end_inset

 Ver 4.0 R5.2 Beta 
\end_layout

\begin_layout Itemize
Bug-fix: Merlin plots contained an extra straight line when the steps option
 is selected.
 
\end_layout

\begin_layout Itemize
Bug-fix: For X-linked and Y-linked data, homozygous genotypes were mistakenly
 flagged as being heterozygous and vice versa, and always labeled as X-chromosom
e errors.
 
\end_layout

\begin_layout Itemize
Bug-fix: The allele-frequency summary option gave wrong counts and frequencies
 on Y-linked markers.
\end_layout

\begin_layout Subsection*
Changes from Ver 4.0 R5.0 -
\begin_inset Formula $>$
\end_inset

 Ver 4.0 R5.1 (Released June 15th, 2010) 
\end_layout

\begin_layout Itemize
Bug-fix: The l2a.py converter script now checks the input pedigree file to
 make sure that each line contains the required number of headers, since
 otherwise the converted output file may be invalid.
 It terminates if there are too few, continues with a warning, if too many.
 See details on l2a.py for examples.
 
\end_layout

\begin_layout Itemize
Enhancement: Merlin option now includes creation of PDF plots using 
\emph on
nplplot
\emph default
 for the parametric option.
 
\end_layout

\begin_layout Itemize
Enhancement: Mega2 now optionally creates a Merlin model file for use by
 the parametric analysis option 
\emph on
--model
\emph default
 .
 This contains trait penetrances and frequencies specified in the input
 data (or default values if data was recoded).
 
\end_layout

\begin_layout Itemize
Enhancement: Mega2 now recognized markers on the mitochondrial chromosomes.
 The chromosome label should be 26 in non-annotated format file and MT in
 annotated format.
 For more details, see the MT chromosome section on how Mega2 recognizes
 and handles genotypes on this chromosome.
 
\end_layout

\begin_layout Itemize
Enhancement: Mendel's Hardy-Weinberg testing option now allows bi-allelic
 markers.
 
\end_layout

\begin_layout Itemize
Bug-fix: The allele summary option did not include half-typed individuals'
 genotypes in the counts, even if their genotypes are passed through to
 the output.
 
\end_layout

\begin_layout Itemize
Bug-fix: Mega2 did not allow setting unknown phenotype value for covariates.
 
\end_layout

\begin_layout Itemize
Bug-fix: The linkage option was missing the Ped: value field at the end,
 if the input pedigree file did not contain a Ped: field.
\end_layout

\begin_layout Subsection*
Changes from Ver 4.0 R4.0 -
\begin_inset Formula $>$
\end_inset

 Ver 4.0 R5.0 (Released Dec 31st, 2009) 
\end_layout

\begin_layout Itemize
Bug-fix: Mendel8 format control file contained multiple affection definitions
 if the user opted for combined output of multiple affection traits, causing
 Mendel to fail.
 Now, only the first affection trait is listed in the control file.
 
\end_layout

\begin_layout Itemize
Bug-fix: Mega2 aborted right after starting up on Mac OS X Snow Leopard
 machines.
 This has been fixed.
 
\end_layout

\begin_layout Itemize
Enhancement: Mega2's support for Merlin has been improved: the Merlin non-parame
tric LOD score script now turns on the --tabulate option and stores the
 resulting tables in appropriately named files.
 
\end_layout

\begin_layout Itemize
Enhancement: Handling of YLINK markers has been improved.
 
\end_layout

\begin_layout Itemize
Enhancement: This version uses Python dictionaries to speed up reading in
 of the input files.
 You may notice a marked improvement on large data sets (100K markers or
 more).
\end_layout

\begin_layout Subsection*
Changes from Ver 4.0 R3.1 -
\begin_inset Formula $>$
\end_inset

 Ver 4.0 R4.0 (Released October 4th, 2009) 
\end_layout

\begin_layout Itemize
Enhancement: New supported option CRANEFOOT: Mega2 now creates output files
 in CRANEFOOT format.
 CRANEFOOT is a publicly available program to draw pedigrees.
 
\end_layout

\begin_layout Itemize
Enhancement: New option to output Mega2 annotated format files.
 This option can be used to create annotated format files starting with
 linkage format files.
 
\end_layout

\begin_layout Itemize
Bug-fix: Mendel7+ and X-linked markers: if the input map file contains only
 sex-averaged map positions, the Mendel map file positions would be set
 to 0 for annotated format input file.
 This has been fixed; average positions are taken to be the female positions,
 and male positions are set to 0.
\end_layout

\begin_layout Subsection*
Changes from Ver 4.0 R3 -
\begin_inset Formula $>$
\end_inset

 Ver 4.0 R3.1 (Released July 12, 2009) 
\end_layout

\begin_layout Itemize
Bug-fix: Mendel 9.0 did not accept, nor use any special missing quantitative
 phenotype value when analyzing quantitative traits, instead, it used the
 default value of 0.0.
 
\end_layout

\begin_layout Itemize
Bug-fix: Linkage format options (LINKAGE, SLINK, SPLINK, SIMULATE, VITESSE
 etc.) erroneously set the first paternal and maternal sibling fields to
 0, even when such siblings were present inside the pedigree.
\end_layout

\begin_layout Subsection*
Changes from Ver 4.0 R2 -
\begin_inset Formula $>$
\end_inset

 Ver 4.0 R3 (Released Jun 15, 2009) 
\end_layout

\begin_layout Itemize
Enhancement:The nplplot package has been re-vamped and extended to include
 the generation of formatted custom-track files for viewing within the UCSC
 genome browser.
 
\end_layout

\begin_layout Itemize
Enhancement:The nplplot() function itself has changed; for more detail please
 consult the documentation.
 
\end_layout

\begin_layout Itemize
Modification: We have added the 
\begin_inset Quotes eld
\end_inset

strsep
\begin_inset Quotes erd
\end_inset

 function as part of our source code, to be conditionally compiled for solaris
 platforms (use the flag -DSOLARIS in your Makedefs_solaris file to include
 our strsep).
 This was necessary since certain Solaris installations are missing this
 particular function from their standard libraries.
\end_layout

\begin_layout Subsection*
Changes from Ver 4.0 R1 -
\begin_inset Formula $>$
\end_inset

 Ver 4.0 R2 (Released April 15, 2009) 
\end_layout

\begin_layout Standard

\series bold
Version 4.0 R2 has several improvements and bug-fixes, so the list has been
 divided up into these sections.
 
\end_layout

\begin_layout Itemize
PLINK bugs and improvements 
\end_layout

\begin_layout Itemize
Mendel bugs and improvements 
\end_layout

\begin_layout Itemize
Annotated file bugs and improvements 
\end_layout

\begin_layout Itemize
Handling X,Y,XY, and unmapped loci
\begin_inset Newline newline
\end_inset

 For more details, consult this page on handling special chromosomes.
 
\end_layout

\begin_layout Itemize
Menu related changes 
\end_layout

\begin_layout Itemize
Other bug-fixes and modifications
\end_layout

\begin_layout Standard
The bug fixes listed on this page are also separately listed in the section
 Updated bug list .
 
\end_layout

\begin_layout Standard

\series bold
PLINK bugs and improvements
\series default
 
\end_layout

\begin_layout Itemize
Bug-fix: PLINK long format output files were not named correctly, as per
 PLINK specifications.
 
\end_layout

\begin_deeper
\begin_layout Itemize
Bug-fix: PLINK shell script had problems and failed to run.
 This has been fixed.
 
\end_layout

\begin_layout Itemize
Bug-fix: Affection status inside the fam file was set to 0 for everyone.
 
\end_layout

\begin_layout Itemize
Enhancement: PLINK map files are now created with genetic distances, by
 using the --cm analysis option.
 
\end_layout

\begin_layout Itemize
Enhancement: Allows the creation of output files that are separated by chromosom
es or combined into one set of files.
\end_layout

\begin_layout Standard

\series bold
Mendel bugs and improvements
\end_layout

\begin_layout Itemize
Modification: Old format Mendel files are no longer supported within the
 new Mendel option (option 29).
 The old Mendel option (option 2) still continues to produce old Mendel
 format files.
 
\end_layout

\begin_layout Itemize
Bug-fix: Newest version of Mendel does not accept the variable file, which
 lists quantitative variables, instead quantitative loci are now added to
 the definition file (which is named mendel_locus.* by default).
 
\end_layout

\begin_layout Itemize
Modification: Since Mendel expects quantitative variables to be listed at
 the end of the definition file, the user-specified locus order may not
 be honored.
 
\end_layout

\begin_layout Itemize
Modification: There was some confusion regarding whether Mendel map file
 should include traits, and these were excluded in the last revision.
 However, it seems that trait loci also need to be in the map file, so they
 have been re-introduced into the map file.
 
\end_layout

\begin_layout Itemize
Enhancement: Mendel's newest version now supports longer locus names, up-to
 16 characters long.
\end_layout

\begin_layout Standard

\series bold
Annotated file bugs and improvements 
\end_layout

\begin_layout Standard
Enhancement: Mega2 does not require all loci from the names file to be inside
 allele-frequency and penetrance files.
 However, if you do enter a locus in one of these files, it has to be defined
 inside the names file, and it needs to be completely specified, i.e., with
 the required number of frequencies and penetrances.
 
\begin_inset Newline newline
\end_inset

 If some loci are missing from the frequency file, Mega2 will estimate their
 allele frequencies from the data.
\end_layout

\begin_layout Itemize
Modification:Missing value indicators to the conversion script l2a.py no
 longer need to be enclosed within 
\begin_inset Quotes eld
\end_inset


\begin_inset Quotes erd
\end_inset

s.
 
\end_layout

\begin_layout Itemize
Bug-fix: Mega2 crashed if frequency file was not specified.
 This has been fixed.
 
\end_layout

\begin_layout Itemize
Enhancement: The l2a.py conversion script now allows the missing quantitative
 missing value to be specified as a number if no quotes are used, or a string,
 by enclosing your values within quotes.
 Affection and quantitative missing values are interpreted as strings.
 
\end_layout

\begin_layout Itemize
Enhancement: NAs are now acceptable as unknown value indicator for affection
 status loci as well.
\end_layout

\begin_layout Standard

\series bold
Handling X,Y,XY, and unmapped loci
\end_layout

\begin_layout Itemize
Enhancement: Mega2 now allows inclusion of marker loci with unknown positions
 for a limited number of options that do not require a map.
 Unmapped loci can be specified using a special label inside the map file,
 and are output in order of their appearance inside the names file.
 
\end_layout

\begin_layout Itemize
Enhancement: Mega2 now implements special handling of Y-linked markers.
 You can create output files for most options using Y-linked markers, but
 note that very few analysis programs do linkage analysis on these.
\end_layout

\begin_layout Standard

\series bold
Menu related changes
\end_layout

\begin_layout Itemize
Bug-fix: The menu option for changing the unknown status and allele designator
 in the first menu was not working.
 
\end_layout

\begin_layout Itemize
Enhancement: Mega2 now allows the user to specify affection labels (lists
 of status-class pairs) separately for each affection trait that has multiple
 liability classes.
 Previously, only a single set of labels was allowed over all traits.
 
\end_layout

\begin_layout Itemize
Enhancement: Analysis options and sub-options can now be denoted by their
 names inside the batch file instead of numbers.
 For a list of these names, please consult the documentation.
\end_layout

\begin_layout Standard

\series bold
Other bug-fixes and modifications
\end_layout

\begin_layout Itemize
Modification: Simwalk2 option output files for haplotype, parametric, non-parame
tric, mistyping-estimation, and IBD estimation are now named sw2_pedigree,
 sw2_locus, sw2_map etc.
 
\end_layout

\begin_layout Itemize
Bug-fix: Conversion from pre-makeped format to post-makeped format output
 options (such as SLINK, Vitesse etc.) created wrong first-sibling links
 to be created for pedigrees that had half-siblings.
 This has been fixed.
 
\end_layout

\begin_layout Itemize
Bug-fix: Allegro, Gene Hunter, Gene Hunter-Plus and MLB-QTL output locus
 files had default trait penetrances set to 0.0 rather than the usual 0.5.
 
\end_layout

\begin_layout Itemize
Enhancement: Mega2 automatically limits the display of warnings and error
 messages during the error-checking steps, as these can run into large numbers.
\end_layout

\end_deeper
\begin_layout Standard

\series bold
Version 4.0 beta, 4.0 beta R1, 4.0
\series default
 introduces a new input file format called the annotated format.
 observed under somewhat rare circumstances.
 Version 12 also implements a new output option for the simulation program
 SUP.
 Please check the SUP option details in section VI .
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection*
Changes from Ver 4.0 -
\begin_inset Formula $>$
\end_inset

 Ver 4.0 R1 (Released Jun 13, 2008) 
\end_layout

\begin_layout Itemize
Enhancement: User-defined missing codes for affection status and marker
 alleles in menu1.
 Default value is NA.
 
\end_layout

\begin_layout Itemize
Bug-fix: Output file names were garbled when output folder name had a 
\begin_inset Quotes eld
\end_inset

.
\begin_inset Quotes erd
\end_inset

 inside it.
 This has been fixed.
 
\end_layout

\begin_layout Itemize
Bug-fix: SLINK crashed when multiple chromosomes were selected.
 This has been fixed.
 
\end_layout

\begin_layout Itemize
Bug-fix: Rsimwalk2.pl did not read in SimWalk2 scores correctly.
 
\end_layout

\begin_layout Itemize
Enhancement: The linkage2annotated.py is now named l2a.py.
 Also removed the requirement that input missing codes need to be enclosed
 inside 
\begin_inset Quotes eld
\end_inset


\begin_inset Quotes erd
\end_inset

.
 
\end_layout

\begin_layout Itemize
Enhancement: Mega2 now compares the version number on watson web-site against
 itself, to figure out if it needs to be updated.
 This can be turned off using the -noweb option.
 
\end_layout

\begin_layout Itemize
Modification: Trait loci are no longer included inside the Mendel CSV map
 file.
 
\end_layout

\begin_layout Itemize
Bug-fix: Quantitative summary gave wrong standard deviation values.
 This has been fixed.
 
\end_layout

\begin_layout Itemize
Bug-fix: Random simulation of genotyping errors did not work correctly from
 4.0 beta onwards.
 This has been fixed.
\end_layout

\begin_layout Subsection*
Changes from Ver 4.0 Beta R1 -
\begin_inset Formula $>$
\end_inset

 Ver 4.0 (Released March 31, 2008) 
\end_layout

\begin_layout Itemize
Bug-fix: Annotated files caused Mega2 to crash if a frequency file was not
 provided.
 This has been fixed, and Mega2 will now calculate observed allele frequencies
 from the pedigree data as usual.
 
\end_layout

\begin_layout Itemize
Bug-fix: Merlin format output files were missing covariates, if these were
 included in the selected traits.
 
\end_layout

\begin_layout Itemize
Bug-fix: For these options, Mega2 falsely detected Mendelian inheritance
 errors for male X-linked genotypes: PREST, HWE (all options), SUMMARIES
 (all options).
 
\end_layout

\begin_layout Itemize
Bug-fix: Several bugs in handling of X-linked data have been fixed for options
 that allow X-linked analysis on data that contains both autosomal and X-linked
 loci.
 These include setting special X-linked analysis flags for the X-chromosome
 output.
 
\end_layout

\begin_layout Itemize
Enhancement: Annotated format now allows male, female, and sex-averaged
 penetrances inside the penetrance file to be defined for each binary trait
 locus.
 
\end_layout

\begin_layout Itemize
Enhancement: SUP option now supports simulation of X-linked data.
 
\end_layout

\begin_layout Itemize
Enhancement: Trait selection menu now allows ranges inside input trait numbers
 e.g 1-10 etc.
 This makes it easier to handle data with a large number of phenotypes.
 
\end_layout

\begin_layout Itemize
Enhancement: In keeping with the above enhancement, the Trait_Subdirs keyword
 now allows a special value 
\begin_inset Quotes eld
\end_inset

Use trait names
\begin_inset Quotes erd
\end_inset

, which tells Mega2 to use the trait names are trait-specific output sub-directo
ry names.
 
\end_layout

\begin_layout Itemize
Modification: The batch file keywords Traits_Selected_Num and Covariates_Num
 are no longer required.
 If present, they will be ignored.
 
\end_layout

\begin_layout Itemize
Bug-fix: R plot menu behavior was incorrect.
 
\end_layout

\begin_layout Itemize
Enhancement: R plot now allows Merlin's trait-combination mode.
 Also allows traits to be separated out even when Merlin output has these
 combined.
 
\end_layout

\begin_layout Itemize
Modification: The nplplot function now allows two extra arguments, lgndx,
 and lgndy to specify positions for legends inside the graph.
 The default values are NULL.
 
\end_layout

\begin_layout Itemize
Modification: The lgnd argument now takes three values, TRUE, FALSE, 
\begin_inset Quotes eld
\end_inset

page
\begin_inset Quotes erd
\end_inset

, and a list of plot numbers.
 TRUE or FALSE causes legends to be plotted for all plots or none respectively.
 The 
\begin_inset Quotes eld
\end_inset

page
\begin_inset Quotes erd
\end_inset

 value causes a legend to be inserted into the first plot of every page.
 The plots numbers specify which plots to insert legends into.
 Default value is 
\begin_inset Quotes eld
\end_inset

page
\begin_inset Quotes erd
\end_inset

.
 
\end_layout

\begin_layout Itemize
Enhancement: Using the new nplplot arguments, Mega2 now inserts a legend
 into the first plot for every trait if the user chooses to combine traits
 for several traits into the same file.
 
\end_layout

\begin_layout Itemize
Enhancement: A y-axis label has been added to the LOD score and P-value
 plots.
\end_layout

\begin_layout Subsection*
Changes from Ver 4.0 Beta-
\begin_inset Formula $>$
\end_inset

 Ver 4.0 Beta R1 (Released August 7, 2007) 
\end_layout

\begin_layout Itemize
Bug-fix: The implementations for better memory utilization were not implemented
 correctly for the nuclear pedigree option, aspex option, and PAP option,
 which segfaulted.
 These options are working now.
 
\end_layout

\begin_layout Itemize
Bug-fix: Sage 3.0 sibpal parameter file was wrong 
\end_layout

\begin_layout Itemize
Bug-fix: R plot menu behavior has been improved: wasn't working for a single
 trait in LoopOverTrait mode.
 
\end_layout

\begin_layout Itemize
Bug-fix: Affected sib-pair summaries had wrong parental affection status.
 All parents were set to unknown.
 This has been corrected 
\end_layout

\begin_layout Itemize
Bug-fix: Trait names in the Mendel formatted locus files (mendel_locus,
 locus and LOCUS), are now shortened to 8 characters as for the 3.0 version
 and revisions.
 
\end_layout

\begin_layout Itemize
Modification: Merlin command line options were out-of-date.
 This revision of Mega2 has now been brought up-to-date.
\end_layout

\begin_layout Standard

\series bold
Version 3.0 Revision 10,11,12
\series default
 fixes a few more bugs that were observed under somewhat rare circumstances.
 Version 12 also implements a new output option for the simulation program
 SUP.
 Please check the SUP option details in section VI .
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Subsection*
Changes from Ver 3.0 R11-
\begin_inset Formula $>$
\end_inset

 Ver 3.0 R12 and Ver 4.0 Beta (Released June 14, 2007) 
\end_layout

\begin_layout Itemize
Bug-fix: Nuclear pedigree files had redundant chromosome number extensions
 when multiple chromosomes were selected.
 
\end_layout

\begin_layout Itemize
Enhancement: There is new option to create files for the genotype simulation
 program SUP, which is based on SLINK, but can handle large numbers of loci
 unlike SLINK.
 For more details, consult the section on SUP .
 
\end_layout

\begin_layout Itemize
Modification: The APM, APM-Mult and TDTMAX options have been disabled, and
 will no longer be supported.
 The menu still contains these options, but with DISABLED labels.
\end_layout

\begin_layout Subsection*
Changes from Ver 3.0 R10-
\begin_inset Formula $>$
\end_inset

 Ver 3.0 R11 (Released May 17, 2007) 
\end_layout

\begin_layout Itemize
Bug-fix: In some cases, large pedigrees in pre-makeped format files caused
 Mega2 to crash, if the number of individuals within a pedigree exceeded
 the number of pedigrees.
 For data with smaller pedigrees, the KEYS file contained wrong information,
 however, output files would not have been affected.
\end_layout

\begin_layout Subsection*
Changes from Ver 3.0 R9-
\begin_inset Formula $>$
\end_inset

 Ver 3.0 R10 (Released February 1, 2007) 
\end_layout

\begin_layout Itemize
Bug-fix: Several options produced wrong pedigree file with missing pedigree
 IDs when using a pre-makeped pedigree file as input.
 These involve options which skip pre-makeped to post-makeped conversion
 including Mendel format options, Merlin, Prest, and Solar.
 
\end_layout

\begin_layout Itemize
Bug-fix: Reordering of traits contained a bug, where the trait locus was
 set to the wrong locus, if user changed the ordering from the input order.
 
\end_layout

\begin_layout Itemize
Bug-fix: Old SAGE format files wrote spaces for missing trait values instead
 of a missing value.
 
\end_layout

\begin_layout Itemize
Bug-fix: HLOD scores were not read in from Allegro's output for plotting.
 These scores are produced by Allegro's parametric linkage analysis.
 
\end_layout

\begin_layout Itemize
Bug-fix: HWE files for Mendel's Hardy-Weinberg estimation contained completely
 ungenotyped individuals.
 
\end_layout

\begin_layout Itemize
Bug-fix: Loop-breaking in premakeped format pedigrees produced false error
 messages about failure to break loops for pedigrees that did not contain
 loops.
 
\end_layout

\begin_layout Itemize
Enhancement: The R-plotting now handles LOD scores produced by Merlin's
 --grid option in non-parametric linkage analysis, where marker names are
 not output.
 
\end_layout

\begin_layout Itemize
Enhancement: The R-plotting process has been made more robust to errors
 in the plot data produced by Allegro, Merlin and SimWalk2.
 If these analyses failed to run and produced no LOD scores, then Mega2
 would produce empty plot files.
 These errors are detected now, and the user informed accordingly.
 Plot files are not produced.
 
\end_layout

\begin_layout Itemize
Modification: For data containing multiple plots, such as genome-scan data,
 the user can now selectively ignore y-axis bounds set in the menu for plots
 containing data that exceed these bounds.
 Previously, bounds would be used for all or none of the plots.
\end_layout

\begin_layout Subsection*
Very old versions 
\end_layout

\begin_layout Standard

\series bold
Version 3.0 Revision 8, 9
\series default
 are patched versions of Mega2 3.0.
 They contains some important bug-fixes that was introduced in the 3.0 R7
 version.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\series bold
Version 3.0 Revision 7
\series default
 is a patched version of Mega2 3.0.
 It contains a couple of bug-fixes, and the expiry date has been changed
 to June 15, 2007.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\series bold
Version 3.0 Revisions 1, 2,3, 4 and 5
\series default
 are patched versions of Mega2 3.0.
 They contain some important bug-fixes which are listed below.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\series bold
Version 3.0
\series default
 is the fifth major release of Mega2.
 This version contains some important changes in Mega2's behavior.
 Please consult the documentation for a detailed explanation of these changes.
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\series bold
Version 2.5
\series default
 is the fourth major release of Mega2.
 This version contains many bug-fixes and new features.
 The user should consult this documentation for new features and bug-fixes
 prior to using version 2.5.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\series bold
Version 2.3
\series default
 is the third major release of Mega2.
 This version and its revisions will be no longer supported, and their licenses
 expire on June 15, 2003.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\series bold
Version 2.3
\series default
 had three revisions 
\series bold
R2
\series default
 , 
\series bold
R3
\series default
 , and 
\series bold
R4
\series default
 containing several bug-fixes.
 These bugs and the options they might affect are listed below.
 
\begin_inset Newline newline
\end_inset

 
\begin_inset Newline newline
\end_inset

 
\end_layout

\begin_layout Subsection*
Changes from Ver 3.0 R8-
\begin_inset Formula $>$
\end_inset

 Ver 3.0 R9 (Released July 14, 2006) 
\end_layout

\begin_layout Itemize
Bug-fix: The old Mendel format marker file was incorrectly read in by the
 RELPAIR conversion Perl script because there was no space between the chromosom
e number and marker position.
 
\end_layout

\begin_layout Itemize
Bug-fix: The Rallegro.pl, Rmerlin.pl and Rsimwalk2.pl Perl scripts failed to
 distinguish between marker loci that had identical map positions on a chromosom
e (very dense markers would have the same problem, if the output did not
 have enough precision), producing incorrectly formatted plot-output files.
\end_layout

\begin_layout Subsection*
Changes from Ver 3.0 R7-
\begin_inset Formula $>$
\end_inset

 Ver 3.0 R8 (Released June 19, 2006) 
\end_layout

\begin_layout Itemize
Bug-fix: Premakeped format pedigrees with affection status loci caused Mega2
 to crash.
 This has been fixed in 3.0R8.
 
\end_layout

\begin_layout Itemize
Bug-fix: For pre-makeped format files, output files did not contain pedigree
 numbers, if user selected premakeped pedigree IDs as the output pedigree
 id.
 
\end_layout

\begin_layout Itemize
Bug-fix: Mega2 failed to reset Mendelianly inconsistent genotypes even if
 the menu item for this action in the 
\begin_inset Quotes eld
\end_inset

Incorrect genotypes reset menu
\begin_inset Quotes erd
\end_inset

 was set to yes.
\end_layout

\begin_layout Subsection*
Changes from Ver 3.0 R5,R6 -
\begin_inset Formula $>$
\end_inset

 Ver 3.0 R7 (Released June 15, 2006) 
\end_layout

\begin_layout Itemize
Modification:In the omit file, keyword 
\begin_inset Quotes eld
\end_inset

All
\begin_inset Quotes erd
\end_inset

 in the marker column reset trait phenotypes as well as marker genotypes.
 This has been changed so that only marker genotypes are set to unknown.
 
\end_layout

\begin_layout Itemize
Bug-fix:Unconnected individuals in premakeped format pedigrees went undetected,
 if the pedigrees consisted only of disconnected individuals.
 This has been fixed.
 
\end_layout

\begin_layout Itemize
Bug-fix:Mendel option did not label X-linked loci as such when the combined
 output option was selected.
\end_layout

\begin_layout Subsection*
Changes from Ver 3.0 R4 -
\begin_inset Formula $>$
\end_inset

 Ver 3.0 R5 (Released Feb 2, 2006) 
\end_layout

\begin_layout Itemize
Bug-fix: Merlin format pedigree files created by Mega2 were not read in
 correctly by Merlin if affection status traits included a liability column,
 since there is no way to specify such loci using the QTDT format names
 file.
 Now, when Mega2 is converting to Merlin format and it encounters an affection
 status trait with a liability column, the user is prompted to select status-cla
ss labels to be designated as affected, and only the status is output in
 the pedigree file.
 
\end_layout

\begin_layout Itemize
Bug-fix: When a names file is used so that alleles are recoded, the random
 selection of individuals was not working correctly.
 Hence, allele frequencies computed via options 2 and 3 of the individual-select
ion menu may have been incorrect under certain conditions.
 Option 2 selects typed founders or a random member if a pedigree has no
 typed founders, and option 3 includes individuals selected via option 2
 as well as one non-founder per pedigree with an allele not found by option
 2.
 For more details, see the section on recode bug.
 
\end_layout

\begin_layout Itemize
Enhancement: When a names file is used so that alleles are recoded, Mega2
 now computes and reports allele-frequencies in four different ways (see
 Recode section for details) and reports a table of these different allele
 frequency estimates in the MEGA2.RECODE summary file.
 Subsequent output, however, uses only frequencies computed from the subset
 (founders, founders+random etc.) specified by the user.
 
\end_layout

\begin_layout Itemize
Modification: The omit file is read in prior to recoding now.
 Also, untyped or incompletely-typed pedigrees are omitted as specified
 via menu 1 prior to recoding and allele-frequency computation.
 
\end_layout

\begin_layout Itemize
Enhancement: The individual selection menu now has an option to include
 half-typed individuals (where only one allele is known and the other is
 unknown) in the recoding process.
 For the subsequent output analysis options, half-typed individuals are
 included or excluded from the output files depending on the user's choices
 in the Invalid genotypes exclusion menu.
 
\end_layout

\begin_layout Itemize
Modification: The Rallegro.pl Perl script has changed in keeping with the
 new Allegro output in which the absolute value of the NPL LOD score and
 the delta are reported in two separate columns.
 Results from older versions of Allegro used a single column with the actual
 value preceded by the sign.
 Users are advised not to use the new script to read Allegro output produced
 by Allegro versions older than 1.2c.
 For the purposes of graphing Allegro results, we follow the convention
 of Merlin and multiply the NPL LOD score by the sign if the delta before
 plotting it.
 
\end_layout

\begin_layout Itemize
Enhancement: Total squared deviation between observed and input allele frequenci
es Mega2 scans the observed genotype data and computes observed allele frequenci
es over full-typed as well as half-typed individuals to see if these match
 input frequencies within a certain tolerance.
 Exceeding this threshold is a non-fatal error, i.e., mega2 will stop and
 warn the user, with the option to continue.
 The tolerance value is decided by item 10 of the input menu.
 Tolerance can be set to a large value (e.g.
 set threshold to N or greater, if where N is the maximum number of alleles)
 to avoid warnings.
 
\end_layout

\begin_layout Itemize
Bug-fix: When recoding took place, Option 3 of of individual selection menu
 did not count all alleles present in data - it still gave 0 allele counts.
 
\end_layout

\begin_layout Itemize
Enhancement: In the recoding step, Option 3 has been changed now to include
 other individuals only after it goes through the selection process specified
 by option 2.
 Then it looks at alleles with 0 counts, and selects the first person from
 each pedigree with that allele, counting both alleles of that person.
 
\end_layout

\begin_layout Itemize
Bug-fix: Incorrect displaying of omitted pedigree and person numbers has
 been fixed.
 
\end_layout

\begin_layout Itemize
Enhancement: The default output format for NPL LOD score plots (various
 options) is now PDF instead of post-script.
 The nplplot() function decides this format based on the output file name's
 extension, [.ps or .pdf].
 
\end_layout

\begin_layout Itemize
Enhancement: If the data contain both X-linked and autosomal markers, the
 user can choose whether to (a) treat all markers as sex-linked, (b) all
 markers as autosomal, or (c) only markers on chromosome 23 as sex-linked
 and the rest as autosomal.
 
\end_layout

\begin_layout Itemize
Enhancement: When creating plots with nplplot, yaxis bounds can now be enforced
 strictly by setting a flag in the plot-parameters menu.
 
\end_layout

\begin_layout Itemize
Enhancement: Merlin LOD scores can now be graphed when either the --grid
 or the --steps options is used.
 The --markerNames option is included by default when executing Merlin within
 the Merlin C-shell script.
 
\end_layout

\begin_layout Itemize
Bug-fix: The Allegro script for running and plotting results of analysis
 on multiple traits did not work.
 This has been fixed.
 
\end_layout

\begin_layout Itemize
Bug-fix: The R shell script contained mal-formed file-names when a single
 trait was selected for Merlin and SimWalk2 such as (null)/merlin.01.out.
 This has been fixed.
\end_layout

\begin_layout Subsection*
Changes from Ver 3.0 R3 -
\begin_inset Formula $>$
\end_inset

 Ver 3.0 R4 (Released June 10, 2005) 
\end_layout

\begin_layout Itemize
Bug-fix: In recoding alleles, wrong frequencies were being assigned to the
 alleles if and only if the ORIGINAL alleles were numbered 1 to N (N 
\begin_inset Formula $>$
\end_inset

= 10), making renaming unnecessary.
 
\end_layout

\begin_layout Itemize
Bug-fix: Due to floating-point precision error, the missing quantitative
 phenotype value was not read in correctly.
 The precision has been increased now.
 
\end_layout

\begin_layout Itemize
Bug-fix: When recoding alleles, total allele count was wrong in MEGA2.RECODE
 file.
 
\end_layout

\begin_layout Itemize
Important change: The usage of Rmerlin.pl script has been changed: *Names*
 of statistics are used instead of numbers, therefore older Mega2 generated
 Rmerlin.*.sh scripts will no longer work with the new Rmerlin.pl Perl script.
 See the R-graphics section for details on how to regenerate plots on older
 analysis results.
 
\end_layout

\begin_layout Itemize
Enhancement: R-plots can be generated when Merlin's --vc -- --(variance
 components) is selected for analysis, see R-plots section for details.
 
\end_layout

\begin_layout Itemize
Enhancement: Output R-plots can be saved in either postscript or pdf format,
 see R-plots section for details.
 
\end_layout

\begin_layout Itemize
Enhancement: In option 2 of locus-reordering menu, we can select numbers
 during the display.
 Consult the locus reordering section for details.
 
\end_layout

\begin_layout Itemize
Enhancement: Added selection of covariates to the Merlin analysis option,
 premakeped format option and SOLAR.
 
\end_layout

\begin_layout Itemize
Enhancement: Mega2 checks entire pedigree file for pedigree errors before
 terminating Mega2 (instead of at the first error encountered).
 
\end_layout

\begin_layout Itemize
Enhancement: Mega2 checks entire map file for errors before terminating
 due to fatal errors.
 The reading is is also more robust to invalid values in the columns, (e.g.
 non-numeric strings in chromosome or position columns).
\end_layout

\begin_layout Subsection*
Changes from Ver 3.0 R2 -
\begin_inset Formula $>$
\end_inset

 Ver 3.0 R3 (Released November 29, 2004) 
\end_layout

\begin_layout Itemize
Bug-fix:The R options for Hardy-Weinberg equilibrium testing were generating
 spurious error messages on skipping markers.
 This has been fixed.
 
\end_layout

\begin_layout Itemize
Bug-fix: Wrong column names were being written in the output table created
 by the HWE R exact option.
 This has been corrected.
 
\end_layout

\begin_layout Itemize
Bug-fix:Unique IDs were not carried over during conversion from Pre-makeped
 format to post-makeped format.
\end_layout

\begin_layout Subsection*
Changes from Ver 3.0 R1 -
\begin_inset Formula $>$
\end_inset

 Ver 3.0 R2 (Released September 30, 2004) 
\end_layout

\begin_layout Itemize
Bug-fix:The ID: field not read in when multiple chromosomes were selected
 for analysis.
 
\end_layout

\begin_layout Itemize
Bug-fix: HWE-R EXACT option: R-script was wrong, this has been fixed.
 
\end_layout

\begin_layout Itemize
Bug-fix: Mendel5 pedigree files contained quantitative variable for affection
 loci at the end of each record, which does not work with the new version
 of Mendel.
 
\end_layout

\begin_layout Itemize
Bug-fix: Mendel5 requires a variable file for defining QTLs.
 This has been added to the list of output files created for Mendel.
 
\end_layout

\begin_layout Itemize
Bug-fix: Selection of individuals for allele-frequency estimation using
 the founders + all unique alleles did not work.
 It still produced zero allele frequencies which should not be the case.
 
\end_layout

\begin_layout Itemize
Bug-fix: HWE R options: Spurious error message even when table was created
 correctly.
 
\end_layout

\begin_layout Itemize
Bug-fix: Linkage option - Only pedigrees with non-numeric names assigned
 numbers causing possible conflicts with pedigrees whose original numeric
 IDs were maintained in the output.
 
\end_layout

\begin_layout Itemize
Bug-fix: Merlin gave a segmentation-fault, if the user selected only one
 statistic for graphical output.
 
\end_layout

\begin_layout Itemize
Bug-fix: Vitesse shell script was missing its header and hence could not
 be run.
 
\end_layout

\begin_layout Itemize
Enhancement: New keyword Count_Genotypes to indicate which option of the
 select-individual menus to use.
\end_layout

\begin_layout Subsection*
Changes from Ver 3.0 -
\begin_inset Formula $>$
\end_inset

 Ver 3.0 R1 (Released August 15, 2004) 
\end_layout

\begin_layout Itemize
Bug-fix: Hardy-Weinberg - HWE option (Guo and Thompson) had a bug, it either
 crashed or produced wrong genotype counts.
 
\end_layout

\begin_layout Itemize
Bug-fix: SimWalk2-npl option crashed while setting R-plots 
\end_layout

\begin_layout Itemize
Bug-fix: Merlin's R-plot shell script had the wrong file names and didn't
 work for a single trait.
 
\end_layout

\begin_layout Itemize
Enhancement: Saving run-specific files can be turned off by invoking: 
\begin_inset Formula $>$
\end_inset


\begin_inset Formula $>$
\end_inset

 mega2 --nosave [optional batch_file_name] 
\end_layout

\begin_layout Itemize
Important change: Merlin output locus file format is now QTDT format instead
 of linkage format.
 See section on Merlin option for details.
 
\end_layout

\begin_layout Itemize
Bug-fix: In rare cases, Mega2 crashed while breaking loops.
 
\end_layout

\begin_layout Itemize
Bug-fix: In the Combine-traits mode, Mega2 would not allow selection of
 all the markers and traits.
 
\end_layout

\begin_layout Itemize
Bug-fix: HWE-R based options produced incorrect MEGA2.KEYS file.
 
\end_layout

\begin_layout Itemize
Bug-fix: Corrected handling of missing R formatted data files for R-graphics
 - Allegro continued through the reading even when files were missing 
\end_layout

\begin_layout Itemize
Bug-fix: HWE-Mendel file names menu had two options numbered 3.
 
\end_layout

\begin_layout Itemize
Enhancement: Mega2 now stores a copy of the batch file along with the run-specif
ic files.
\end_layout

\begin_layout Subsection*
Changes from Ver 2.5 R4 -
\begin_inset Formula $>$
\end_inset

 Ver 3.0 (Released June 15, 2004) 
\end_layout

\begin_layout Itemize
Bug-Fix: SAGE4 parameter file was wrong.
 The field-widths were not set correctly.
 
\end_layout

\begin_layout Itemize
Enhancement: Mega2 now allows to the user to specify an alternate location
 for the output files, the default is the current directory.
 
\end_layout

\begin_layout Itemize
Enhancement: An html format page is created with links to input files, run
 summary files and output files, for easy access.
 
\end_layout

\begin_layout Itemize
Important Change: A new Perl script is now included with the others, mega2log2ht
ml.pl for the creation of the html page.
 
\end_layout

\begin_layout Itemize
Enhancement: New Hardy-Weinberg options, two from the R 
\begin_inset Quotes eld
\end_inset

genetics
\begin_inset Quotes erd
\end_inset

 library, and Mendel version 5.0.
 
\end_layout

\begin_layout Itemize
Enhancement: We preserve run summaries for each run, by creating a unique
 directory identified by the run date and time, and storing the summaries
 within this directory.
 
\end_layout

\begin_layout Itemize
Bug-Fix: X-linked analysis was not working, caused Mega2 to crash.
 
\end_layout

\begin_layout Itemize
Bug-Fix: Alleles are not recoded if they are already numbered from 1 through
 N (N= number of alleles), and all N alleles are present in the data.
 
\end_layout

\begin_layout Itemize
Enhancement: New selection choice for counting genotypes for recoding alleles
 with the names file option.
 
\end_layout

\begin_layout Itemize
Enhancement: SOLAR option now also generates a TCL script that provides
 a function within the SOLAR environment to load in the pedigree, locus,
 map and phenotype files.
 
\end_layout

\begin_layout Itemize
Important Change: The trait-selection menu has changed.
 It DOES NOT include the markers by default in the 
\begin_inset Quotes eld
\end_inset

Combine
\begin_inset Quotes erd
\end_inset

 mode.
 See the trait menu section for more details.
 
\end_layout

\begin_layout Itemize
Important Change: Batch file keywords have changed: Markers_Selected is
 now Loci_Selected.
 Markers_Selected_Num is no longer valid.
 MEGA2 will produce a warning message and ignore this keyword.
 
\end_layout

\begin_layout Itemize
Enhancement: Untyped persons are not included in the per-person typing rate
 table in genotyping-rate summary.
 Instead the persons are listed at the end of the summary file.
 
\end_layout

\begin_layout Itemize
Bug-Fix: Since bash is not available on DEC-Alpha, the install script now
 uses 
\begin_inset Quotes eld
\end_inset

sh
\begin_inset Quotes erd
\end_inset

.
 
\end_layout

\begin_layout Itemize
Bug-Fix: In the BATCH mode, Mega2 appended new declarations for Value_MissingQua
nt to any existing MEGA2.BATCH file.
 This has been fixed.
 
\end_layout

\begin_layout Itemize
Bug-Fix: SAGE 4.0 parameter file now includes a default 0 as missing genotype
 value to prevent error messages in the GENIBD output about unrecognized
 genotype value.
 
\end_layout

\begin_layout Itemize
Bug-Fix: Mendel5 option created incorrect keys file.
 
\end_layout

\begin_layout Itemize
Bug-Fix: Duplicate names in the names files caused Mega2 to run incorrectly.
 These are detected and causes Mega2 to exit.
\end_layout

\begin_layout Subsection*
Changes from Ver 2.5 R3 -
\begin_inset Formula $>$
\end_inset

 Ver 2.5 R4 (Released April 22, 2004) 
\end_layout

\begin_layout Itemize
Bug-Fix: SOLAR bug fixed: In the 
\begin_inset Quotes eld
\end_inset

loop-over traits
\begin_inset Quotes erd
\end_inset

 mode person IDs in the phenotype file did not match person IDs in the pedigree
 file.
\end_layout

\begin_layout Subsection*
Changes from Ver 2.5 R2 -
\begin_inset Formula $>$
\end_inset

 Ver 2.5 R3 (Released April 15, 2004) 
\end_layout

\begin_layout Itemize
Important Change: Names file locus codes have been changed to match Merlin's
 locus file format codes.
 Consult the section on Names file for details.
 
\end_layout

\begin_layout Itemize
Bug-Fix: SOLAR bug fixed: Mega2 crashed while looping over quantitative
 trait loci, one at a time.
 
\end_layout

\begin_layout Itemize
Bug-Fix: RECODE bug fixed: Mega2 crashed while recoding loci from 
\emph on
names file
\emph default
 , if there were no mapped loci.
 
\end_layout

\begin_layout Itemize
Bug-Fix: MERLIN bug fixed: Merlin analysis option menu was displayed twice.
 
\end_layout

\begin_layout Itemize
Bug-Fix: GENOTYPING ERROR simulation mode bug fixed: Locus selection was
 not working properly.
 
\end_layout

\begin_layout Itemize
Bug-Fix: SIMWALK2 bug fixed: Location scores option produced an incorrect
 penetrance file for multiple affection liability classes.
 
\end_layout

\begin_layout Itemize
Enhancement: Improved messages with respect to pedigree format (pre- or
 post-makeped) detection.
 Warns the user if there are 0s in the fifth column, and proceeds to read
 in post-makeped.
\end_layout

\begin_layout Subsection*
Changes from Ver 2.5 R1 -
\begin_inset Formula $>$
\end_inset

 Ver 2.5 R2 (Released August 8, 2003) 
\end_layout

\begin_layout Itemize
Bug-Fix: ASPEX bug fixed - nuclear pedigree naming/numbering options did
 not allow numbering with extensions.
 
\end_layout

\begin_layout Itemize
Bug-Fix: SPLINK bug fixed - did not put all markers into one file, when
 user selected the global output file option from the file-selection menu.
 
\end_layout

\begin_layout Itemize
Bug-Fix: S.A.G.E.
 4.x bug fixed - The format statement in the parameter file did not match
 pedigree records.
 
\end_layout

\begin_layout Itemize
Bug-Fix: R-graphics bug fixed - The output file was not renumbered according
 to the chromosome correctly.
 
\end_layout

\begin_layout Itemize
Enhancement: Combined shell-scripts - For SimWalk2, Merlin and Allegro options,
 a combined shell script is generated if there are multiple traits to loop
 over.
 This runs the trait-specific shell-scripts, then the R-graphics script
 if appropriate.
 See details on SimWalk2 for an example.
 
\end_layout

\begin_layout Itemize
Enhancement: R-graphics scripts are now more robust to missing files, incomplete
 analysis etc.
 Perl scripts now return an error if it doesn't find the input file, and
 this error is trapped by the shell script.
 
\emph on
nplplot()
\emph default
 now returns a 
\begin_inset Quotes eld
\end_inset

FALSE
\begin_inset Quotes erd
\end_inset

 value if the formatted data file is empty or has some problems.
 This is trapped by the R-script.
 
\end_layout

\begin_layout Itemize
Enhancement: Mega2 batch file is now more robust to errors such as empty
 value field, and value lists which do not contain enough items.
\end_layout

\begin_layout Subsection*
Changes from Ver 2.5 -
\begin_inset Formula $>$
\end_inset

 Ver 2.5 R1 (Released July 5th, 2003)
\end_layout

\begin_layout Itemize
Enhancement: Option selection for Merlin-only format - The user is prompted
 to enter a string consisting of Merlin analysis options.
 For details see the Merlin analysis section.
 
\end_layout

\begin_layout Itemize
Enhancement: Merlin graphics are set up only if either or both the --npl
 and --pairs options are selected, and the --markerNames option is not selected.
 
\end_layout

\begin_layout Itemize
Bug-Fix: Fixed S.A.G.E.
 4 parameter file bug in the format statement.
 
\end_layout

\begin_layout Itemize
Bug-Fix: Fixed S.A.G.E.
 3 counts parameter file bug in the format statement.
 
\end_layout

\begin_layout Itemize
Bug-Fix: Fixed PREST pedigree file bug, all lines were combined into one
 long line.
 
\end_layout

\begin_layout Itemize
Bug-Fix: Fixed Merlin/SW2-NPL pedigree naming mismatch.
 This option filed to work because the pedigree names in the Merlin NPL
 output did not match the names in the SimWalk2 pedigree file.
 
\end_layout

\begin_layout Itemize
Bug-Fix: Pedigree and individual id menu behavior has been fixed.
 The different options were not being selected and displayed correctly.
 
\end_layout

\begin_layout Itemize
Bug-Fix: Fixed SPLINK format bug - was writing individual IDs in place of
 mother's IDs.
 
\end_layout

\begin_layout Itemize
Bug-Fix: Fixed bug in SimWalk2 for handling more than 100 liability classes.
 
\end_layout

\begin_layout Itemize
Bug-Fix: Fixed bug in the Win 32 version of Mega2, where the locus order
 line was not read in correctly.
 The 2.5 version will work correctly however, as long as there is an extra
 non-numeric character before the newline.
 
\end_layout

\begin_layout Itemize
Bug-Fix: Blank lines are allowed before the locus-order line again, the
 check for locus order in Ver 2.5 did not accept blank lines just before
 the locus order line.
\end_layout

\begin_layout Subsection*
Changes from Ver 2.3 R4 -
\begin_inset Formula $>$
\end_inset

 Ver 2.5 (Released June 3, 2003)
\end_layout

\begin_layout Itemize
Enhancement: New option for creating Loki format files.
 
\end_layout

\begin_layout Itemize
Enhancement: New Recode utility for converting a minimal locus data file
 with only locus types and names as input, then creating a linkage format
 locus file with allele frequencies computed from the pedigree data.
 
\end_layout

\begin_layout Itemize
Enhancement: New batch file options for greater automation 
\begin_inset Newline newline
\end_inset

 Default_Outfile_Names 
\begin_inset Newline newline
\end_inset

 Default_Reset_Invalid 
\begin_inset Newline newline
\end_inset

 Default_Other_Values 
\begin_inset Newline newline
\end_inset

 Default_Ignore_Nonfatal 
\begin_inset Newline newline
\end_inset

 Default_Ignore_Xlinked 
\begin_inset Newline newline
\end_inset

 See Batch file documentation for details.
 
\end_layout

\begin_layout Itemize
Enhancement: R-plot labels for each curve can now be input separately from
 a header file.
 Mega2 creates this header file by default, and instructs the nplplot()
 routine to skip the first line of the input plot data file.
 
\end_layout

\begin_layout Itemize
Bug-Fix: in SOLAR where the phenotype file and marker genotype file didn't
 match the person IDs in the pedigree file (id choice was not implemented
 for the former).
 
\end_layout

\begin_layout Itemize
Bug-Fix: in locus reordering, for multiple chromosomes and multiple traits,
 traits were being output at the beginning of the order irrespective of
 the user's ordering.
 
\end_layout

\begin_layout Itemize
Bug-Fix: in selection of loci for random genotype error detection from the
 batch file.
 
\end_layout

\begin_layout Itemize
Bug-Fix: in renaming chromosome number extension for output files.
 
\end_layout

\begin_layout Itemize
Bug-Fix: for segmentation fault for 0 recombination fractions (where there
 is only a single locus in premakeped format output files.
 
\end_layout

\begin_layout Itemize
Bug-Fix: existing vstrm files are removed before each Vitesse run.
 
\end_layout

\begin_layout Itemize
Enhancement: Flag too few locus numbers in locus order line of input linkage
 format locus file.
 
\end_layout

\begin_layout Itemize
Enhancement: Creating a marker frequency file for Merlin format.
 
\end_layout

\begin_layout Itemize
Enhancement: Improved user-interface for selecting pedigree and individual
 id for output files, these can be either selected from the input, or generated
 in some cases, e.g.
 unique IDs can be generated by mega2.
 
\end_layout

\begin_layout Itemize
Enhancement: Changed y/n user-prompt for per-chromosome files in various
 options to a numbered menu (with separate files as the default).
 
\end_layout

\begin_layout Itemize
Enhancement: Menu for selecting Allegro scores to plot now have more descriptive
 names.
 
\end_layout

\begin_layout Itemize
Enhancement: R-setup menu called only once for the SimWalk2-Merlin interface
 option.
 
\end_layout

\begin_layout Itemize
Enhancement: For Merlin, cannot handle generating plots for multiple traits
 if they are combined (each trait separately works).
\end_layout

\begin_layout Subsection*
Changes from Ver 2.3 R3 -
\begin_inset Formula $>$
\end_inset

 Ver 2.3 R4 (Released Feb 7, 2003) 
\end_layout

\begin_layout Itemize
Bug-Fix: SimWalk2 penetrance file had invalid liability class values.
 Acceptable values are 1-99.
 Currently, if the input data has affection loci with 100 or more classes,
 Mega2 will produce a penetrance file that is not acceptable to SimWalk2.
 Efforts are underway to modify SimWalk2 to accept a larger number of liability
 classes.
 
\end_layout

\begin_layout Itemize
Bug-Fix: SPLINK option produced garbled individual IDs in the pedigree file
 if the user opted to combine all loci into one pedigree file.
 This has been rectified.
\end_layout

\begin_layout Subsection*
Changes from Ver 2.3 R2 -
\begin_inset Formula $>$
\end_inset

 Ver 2.3 R3 (Released Dec 13, 2002) 
\end_layout

\begin_layout Itemize
Bug-Fix: For SOLAR, the HHID phenotype was being written into the phenotype
 file, this has been moved to the pedigree file.
 
\end_layout

\begin_layout Itemize
Enhancement: Number of allowable liability classes has been increased up
 to a million.
 Theoretically, there really is no limit, except for Mendel format output
 which has a field size limitation.
 
\end_layout

\begin_layout Itemize
Enhancement: New MEGA2.KEYS file now gives a mapping to pedigree and person
 IDs between the input and output.
 
\end_layout

\begin_layout Itemize
Bug-fix: Fixed major bug in loop reconnection - the older version assumed
 that the proband numbers were ordered in the pedigree file.
 Also, the renumbering of links (first_off, sibs etc.) was off.
 For each loop-reconnection pair (delete_person, keep_person), we have to
 follow two steps: 
\begin_inset Newline newline
\end_inset

 1) Look at each occurrence of delete_person and change it to the corresponding
 keep_person.
 
\begin_inset Newline newline
\end_inset

 2) Then look at the links fields of keep_person, and make sure they match
 the delete_person's fields.
 
\begin_inset Newline newline
\end_inset


\end_layout

\begin_layout Itemize
New analysis option: Merlin 0.9.x format files merlin_ped.01, merlin_data.01,
 and merlin_map.01.
 
\end_layout

\begin_layout Itemize
Changed the Merlin files for Simwalk2-Merlin option to sw2merlin_ped.01,
 sw2merlin_data.01 and sw2merlin_map.01.
 
\end_layout

\begin_layout Itemize
Bug-fix: Fixed individual-count for pre-makeped format input pedigrees.
 
\end_layout

\begin_layout Itemize
Enhancement: Sex-specific map positions in the map file, This requires the
 two words, 
\begin_inset Quotes eld
\end_inset

male
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

female
\begin_inset Quotes erd
\end_inset

 in the header line of the map file AFTER the first three columns.
 The type of map (kosambi or not) is decided by the title of the sex-averaged
 distance column.
 
\end_layout

\begin_layout Itemize
Enhancement: Several options can now select which pedigree id to output
 (Ped: or linkage id) and which person id to output (Per:, linkage or ID:).
 If these fields (at least the Ped:, Per: and ID:) don't exist in the input
 they are generated, and the user is informed of the fact.
 These options are Simwalk2, Mendel, Aspex, SAGE, SOLAR, Genotyping Summary,
 Pre-makeped, Merlin-SimWalk2, and Merlin.
 Refer to Using unique person IDs for details.
 
\end_layout

\begin_layout Itemize
Bug-fix: Selecting only trait loci in S.A.G.E.
 4.0 resulted in a segfault.
 This has been fixed.
 
\end_layout

\begin_layout Itemize
Minor bug - Menu wording in SimWalk2 file names menu was a bit strange,
 so changed the wording.
\end_layout

\begin_layout Subsection*
Changes from Ver 2.3 -
\begin_inset Formula $>$
\end_inset

 Ver 2.3 R2 (Released July 20 2002) 
\end_layout

\begin_layout Itemize
Bug-fix: Versions 2.3 and 2.3 R1 may have had a segmentation fault when creating
 nuclear pedigrees from post-makeped pedigrees which did not have person
 IDs numbered consecutively from 1 through the number of pedigree members.
 Nuclear pedigrees are also created in the S.A.G.E.
 3.0, ASPEX, and GHMLB options.
 Pre-makeped pedigrees do not cause segmentation faults in either version
 2.3.
 
\end_layout

\begin_layout Itemize
Bug-fix: Post-makeped pedigrees with non-ordinal entry IDs may have also
 created segmentation faults in the 
\begin_inset Quotes eld
\end_inset

create summary
\begin_inset Quotes erd
\end_inset

 option for segregation summary.
 Again pre-makeped files are not a problem.
 
\end_layout

\begin_layout Itemize
Bug-fix: Mendel pedigree file format statement has been fixed.
 The format statement for reading in pedigree members was incorrect.
 
\end_layout

\begin_layout Itemize
Enhancement: A totals line has been added to the affected sib count section
 of the sib_sum.* file.
 
\end_layout

\begin_layout Itemize
Enhancement: In addition to chromosome-specific genotyping success rates,
 an overall genotyping-success rate file is created (if analysis includes
 multiple chromosomes).
 
\end_layout

\begin_layout Itemize
Bug-fix: The script sage_cnt.*.sh was not working in case of a single affection
 trait.
 This script has been corrected.
 
\end_layout

\begin_layout Itemize
Bug-fix: In some cases, nuclear families included half-sibs This bug affects
 Aspex, Affected Sib Counts, GHMLB and S.A.G.E.
\end_layout

\begin_layout Subsection*
Changes from Ver 2.2 R3 -
\begin_inset Formula $>$
\end_inset

 Ver 2.3 (Released June 14 2002) 
\end_layout

\begin_layout Itemize
Removed a bug from the loop-reconnection process.
 Mega2 failed to reconnect loops if proband number 1 did not appear before
 all other probands in the post-makeped format pedigree file.
 
\end_layout

\begin_layout Itemize
A mistyping simulation option can be activated via the first menu, so that
 random genotyping errors according to an error probability distribution
 is introduced within the known genotypes.
 Currently, there are 3 models, uniform (across all markers), uniform within
 each specific marker, and the SimWalk2 error model.
 
\end_layout

\begin_layout Itemize
Added a batch file which will automatically fill most user input up to the
 analysis-specific menus.
 See the Mega2 Batch section for details.
 
\end_layout

\begin_layout Itemize
PREST analysis option - Relationship estimation 
\end_layout

\begin_layout Itemize
PAP analysis option 
\end_layout

\begin_layout Itemize
Simwalk2/Merlin interface option for NPL This creates two sets of data files,
 Merlin format files and Simwalk2 format files with a modified npl.sh script
 that first executes Merlin, then feeds Merlin's p-values into Simwalk2.
 See documentation for more details and on how to use this option.
 
\end_layout

\begin_layout Itemize

\series bold
SimWalk2 graphs:
\series default
 For Simwalk2 - NPL, we can now create an R script to plot the LOD scores
 and store them in a postscript file.
 There are user menus to set options for these plots.
 
\end_layout

\begin_layout Itemize

\series bold
Allegro graphs:
\series default
 We have added an R script for graphing Allegro results.
 
\end_layout

\begin_layout Itemize
The analysis menu is changed in appearance, it is in two columns with slightly
 different analysis names in order to accommodate the additional analysis
 options.
 
\end_layout

\begin_layout Itemize
We now allow an additional field (:ID) in the input linkage format pedigree
 file as well as pre-makeped format pedigree file.
 The post-makeped file can also contain the :Ped and :Per fields in addition
 to the :ID field.
 
\end_layout

\begin_layout Itemize
Linkage format now warns if there are 
\begin_inset Quotes eld
\end_inset

real
\begin_inset Quotes erd
\end_inset

 phenotypes which are 0.0 which is the default 
\begin_inset Quotes eld
\end_inset

unknown
\begin_inset Quotes erd
\end_inset

 value in Linkage.
 
\end_layout

\begin_layout Itemize
Mega2 was computing the biased (population) std-dev value, this has been
 changed to the unbiased (sample) std-dev.
\end_layout

\begin_layout Subsection*
Changes from Ver 2.2 R2 -
\begin_inset Formula $>$
\end_inset

 Ver 2.2 R3 (Released January 23rd, 2002) 
\end_layout

\begin_layout Itemize
For X-linked markers, Mega2 Version 2.2 R2 was incorrectly finding inheritance
 errors that weren't really there.
 This has been fixed.
 
\end_layout

\begin_layout Itemize
New allele frequency summary format: now the histogram is drawn along with
 the table.
 For sex-linked markers, we have an overall table without histograms, then
 the sex-specific tables with histograms.
 
\end_layout

\begin_layout Itemize
SAGE 3.0 option was buggy, the formats of the fsp and fcor files were incorrect.
 The shell file did not work correctly.
 New implementation now has correct formats.
 Handling of multiple trait loci is improved: Excerpt of mega2 message from
 reordering-traits menu: 
\begin_inset Quotes eld
\end_inset

If multiple affection status loci are selected, FCOR files will be set up
 in trait sub-directories.
 SIBPAL files will be set up in the main directory If multiple QTLs are
 selected, FCOR and SIBPAL files will be set up in the main directory.
\begin_inset Quotes erd
\end_inset

 Other changes include elimination of 
\begin_inset Quotes eld
\end_inset

no match
\begin_inset Quotes erd
\end_inset

 messages from the 
\begin_inset Quotes eld
\end_inset

rm
\begin_inset Quotes erd
\end_inset

 command inside the shell files.
 In general, this option has undergone major re-vamping.
 Also, if there are QTLs only, the file-names menu does not ask for sage_cnt
 and cntpar file names.
 The list of files displayed as created at the end of a run also match this
 behavior.
 
\end_layout

\begin_layout Itemize
Mega2 LOG file has more details on the run options such as Mega2 version
 number, pedigree omission criteria, analysis option etc.
 
\end_layout

\begin_layout Itemize
Half-types have to be compulsorily set to 0/0 for Mendel and Simwalk options,
 so the reset-option menu is not presented to the user if Mega2 detects
 half-types, instead a notification is printed.
 
\end_layout

\begin_layout Itemize
Mega2 exits if no loci are selected via option 2 reordering.
 
\end_layout

\begin_layout Itemize
Mega2 now checks for empty input files in addition to DOS files.
 It terminates with an error message.
 
\end_layout

\begin_layout Itemize
For ASPEX, Simwalk and Sage4 options, the marker order is checked for negative
 intervals (only for user-input order).
 Files are created with a warning.
 
\end_layout

\begin_layout Itemize
The log and error files were being appended to instead of overwritten.
 This has been rectified.
 
\end_layout

\begin_layout Itemize
Mega2 crashed if no marker loci were selected, this has been corrected.
\end_layout

\begin_layout Subsection*
Changes from version 2.2 -
\begin_inset Formula $>$
\end_inset

 version 2.2 R2 (Released 28th June 2001) 
\end_layout

\begin_layout Itemize
Expiry date checking has been fixed.
 
\end_layout

\begin_layout Itemize
Checking for too many alleles within a sibship produced spurious error messages
 because it did not handle half-siblings properly.
 It now only checks full siblings.
 
\end_layout

\begin_layout Itemize
Menu for resetting genotypes has been fixed, the EXIT option did not work
 properly, it failed to terminate Mega2.
\end_layout

\begin_layout Subsection*
Changes from version 2.1 beta R3 -
\begin_inset Formula $>$
\end_inset

 version 2.2 (Released 15 Jun 2001) 
\end_layout

\begin_layout Itemize
Partial ordering of individuals inside a pedigree that simply makes sure
 that parents are numbered lower than offspring instead of the more rigorous
 sorting that was being used (tried to sort uncles half-siblings too), which
 caused infinite loops for highly inbred pedigrees.
 
\end_layout

\begin_layout Itemize
Added a new SimWalk2 option called Mistyping analysis, in anticipation of
 the release of SimWalk2 version 2.82.
 
\end_layout

\begin_layout Itemize
Other minor changes in the batch file for Simwalk2.
 
\end_layout

\begin_layout Itemize
Added check for DOS format input files, Mega2 exits with a message if any
 file is a DOS format file.
 
\end_layout

\begin_layout Itemize
Better detection of Mendelian inconsistencies in the presence of untyped
 parents.
 
\end_layout

\begin_layout Itemize
User has the option of specifying which set of invalid genotypes to set
 to (0,0), half-typed, Mendelian inconsistencies, neither or both.
 So the 
\begin_inset Quotes eld
\end_inset

Inconsistencies found - how shall we proceed
\begin_inset Quotes erd
\end_inset

 menu looks a little bit different now.
 
\end_layout

\begin_layout Itemize
Fixed SLINK to handle QTLs properly - does not ask about affecteds if trait
 chosen is a QTL.
 
\end_layout

\begin_layout Itemize
More information about unconnected components of a pedigree is displayed,
 consisting of some of the individuals that make up the pedigree.
 
\end_layout

\begin_layout Itemize
Fixed bugs in how Mendel handles a set of loci with only QTLs.
 
\end_layout

\begin_layout Itemize
Fixed handling of allele_count option for untyped markers, these are skipped
 as they should be.
 
\end_layout

\begin_layout Itemize
Corrected shell file headers for ASPEX and SPLINK.
\end_layout

\begin_layout Subsection*
Changes from version 2.1 beta R2 -
\begin_inset Formula $>$
\end_inset

 version 2.1 beta R3 (Released 30 Mar 2001) 
\end_layout

\begin_layout Itemize
Bug found and fixed in SPLINK whereby a space was missing between the affection
 status locus and following data.
 
\end_layout

\begin_layout Itemize
Added affection status definition menu inside the SPLINK option, since SPLINK
 does not handle multiple liability classes.
 
\end_layout

\begin_layout Itemize
More informative error messages for input Pedigree files.
 
\end_layout

\begin_layout Itemize
Fixed string overflow problem where the long version of output option name
 is stored.
 
\end_layout

\begin_layout Itemize
Further fix to Vitesse Linkmap files, ordinal locus numbers are NOT used
 anymore, so that the program 
\begin_inset Quotes eld
\end_inset

map
\begin_inset Quotes erd
\end_inset

 can create a composite map from several windows analyzed by Vitesse Linkmap
 option.
\end_layout

\begin_layout Subsection*
Changes from version 2.1 beta -
\begin_inset Formula $>$
\end_inset

 version 2.1 beta R2 (Released 16 Mar 2001) 
\end_layout

\begin_layout Itemize
Bug in Vitesse LOG and STM files, the loci numbers and names were incorrect.
 These are generated correctly now.
 
\end_layout

\begin_layout Itemize
Bug in ASPEX sib-phase graph scripts for the theta grid option, the files
 gph.*.*.*.
\begin_inset Formula $<$
\end_inset

chr
\begin_inset Formula $>$
\end_inset

 files did not have the proper curve data.
 This has been fixed.
 
\end_layout

\begin_layout Itemize
Added some checking in Vitesse that verifies user-input interval size inside
 Linkmap.
 If input consists of a single chromosome, this is checked within the Linkmap
 interval menu, otherwise, it is checked during the processing of each chromosom
e.
 If there are fewer markers on any chromosome than the requested interval
 size, the user is given the opportunity to define a smaller size for that
 chromosome, the original length is used for chromosomes that have the requisite
 number of markers.
 
\end_layout

\begin_layout Itemize
Bug in Output linkage format files (GeneHunter options, SLINK, Vitesse etc.),
 the affection status and liability class columns ran into each other.
 They are separated with a space now.
\end_layout

\begin_layout Subsection*
Changes from version 2.05 to version 2.1 beta (Released 16 Feb 2001) 
\end_layout

\begin_layout Itemize
Added support for pre-Makeped files.
 
\end_layout

\begin_layout Itemize
Automatic loop-breaker selection for options that need post-Makeped pedigree
 files.
 
\end_layout

\begin_layout Itemize
Multiple marriages are allowed, and one loop-breaker can break more than
 1 loop.
 
\end_layout

\begin_layout Itemize
Added support for Allegro, MLBQTL and S.A.G.E.
 4.0 formats.
 
\end_layout

\begin_layout Itemize
Map files with kosambi distances are allowed.
 
\end_layout

\begin_layout Itemize
Original person IDs can be output in Mendel and Aspex output files, if provided
 in the post-Makeped format pedigree file.
 
\end_layout

\begin_layout Itemize
Untyped pedigree omission options to specify minimum number of genotyped
 individuals in a pedigree for it to be included in the output.
 
\end_layout

\begin_layout Itemize
Easier way to select loci in option 2 of locus reordering menu by specifying
 a range e.g 
\begin_inset Quotes eld
\end_inset

1-10
\begin_inset Quotes erd
\end_inset

.
 Ranges can be interspersed with specific locus numbers each separated by
 whitespace (e.g., 1-5 9 11 12-15).
 
\end_layout

\begin_layout Itemize
Handling of multiple trait loci, where the analysis option allows such data.
 Otherwise, selection of multiple traits causes separate sets of output
 files to be produced for each trait.
 
\end_layout

\begin_layout Itemize
Improved handling of QTLs.
 Now has checks to see that QTLs are included in output only if the analysis
 option allows them.
 
\end_layout

\begin_layout Itemize
Simwalk2 batch file now uses 
\end_layout

\begin_layout Section
List of fixed bugs
\end_layout

\begin_layout Standard
This section is no longer being updated because it is redundant with the
 'Changes made to Mega2' section above.
\end_layout

\begin_layout Standard
\align center

\series bold
Last updated: June 15, 2011 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 4.0 R5.2 Beta 
\end_layout

\begin_layout Standard
The use of unique Ped_Per IDs like 1_21 was improperly turned on in PAP,
 so the resulting trip.dat was no longer in proper PAP format.
\end_layout

\begin_layout Standard
When doing quantitative summaries output to a sub-directory, the phenotyping
 table got written into the subdirectory, but the header got written into
 the root directory.
\end_layout

\begin_layout Standard
When converting annotated files to Merlin format, the MEGA2.ERR file had
 two strange extraneous lines at the end.
\end_layout

\begin_layout Standard
When converting to Merlin while zeroing out half-typed people, the 
\begin_inset Quotes eld
\end_inset

Half-typed genotypes
\begin_inset Quotes erd
\end_inset

 in MEGA2.RESET was incomplete.
\end_layout

\begin_layout Standard
When default batch file options are set to 'yes', Mega2 no longer stops
 at the 'SPLINK option selection' menu when in batch mode.
\end_layout

\begin_layout Standard
Under certain conditions, an array storing trait loci indicies was too short
 in the locus reordering function ReOrderLociByPositionNumber.
\end_layout

\begin_layout Standard
When only markers were selected, the SUP routine read off the end of the
 line and created incorrect files.
 SUP requires at least one trait locus, so this restriction has been implemented.
\end_layout

\begin_layout Standard
Conversion to SLINK format did not work correctly if the trait locus was
 not at the beginning of the locus list.
\end_layout

\begin_layout Standard
Corrected behavior of the 'Disease locus selection menu' for the SLINK option.
 It was giving the wrong prompt and not correctly indicating the currently
 selected option.
 
\end_layout

\begin_layout Standard
Under certain conditions, one of the theta values was being written into
 the wrong position of the 'theta' array when converting to SLINK format.
\end_layout

\begin_layout Standard
When setting up for a Quantitative Trait Summary in batch mode, the loci
 were reordered twice when they only needed to be reordered once.
 
\end_layout

\begin_layout Standard
The create_nuked_fids() function, when trying to rename the pedigree ID,
 wrote a string into itself, generating a 'source and destination overlap
 in memcpy' error.
\end_layout

\begin_layout Standard
Failed to detect when the input batch file contained a trait number out
 of bounds.
 Added this check in.
\end_layout

\begin_layout Standard
In copy_annotated_to_premake(), there was an error in the logic which led
 to reading a value from beyond the end of the persons[] array.
\end_layout

\begin_layout Standard
There was a failure to initialize the missing_quant value correctly when
 none of the trait loci were quantitative and only the covariates were quantitat
ive.
\end_layout

\begin_layout Standard
When manually-reordering using the GeneHunter option, the code contained
 an error where it tried to access the '-1' element of the global_trait_entries[
] array.
\end_layout

\begin_layout Standard
The check_map_positions() function was not printing error messages properly.
\end_layout

\begin_layout Standard
The 'Locus Reordering Menu' in the Quantitative Summary option was not working
 correctly.
\end_layout

\begin_layout Standard
When reading an annotated pedigree file that contains unmapped markers (chromoso
me 'U'), the cumulative counts of markers per chromosomes in the chromo_loci_cou
nts array was missing an entry for the 'unknown' chromosome.
\end_layout

\begin_layout Standard
The 'Select by locus number' option of the 'Locus Reordering Menu' was not
 working correctly when Mega2 was run interactively (It worked correctly
 when Mega2 was run in batch mode).
\end_layout

\begin_layout Standard
When attempting to break two loops in a pedigree, Mega2 incorrectly assigned
 proband/loop IDs 1 2 2 2, but this should have been (2,2) (3,3) or (1,2)
 (3,3).
 The person assigned proband ID 1 on input ended up being a member of the
 second loop.
 Since the user can avoid such an error by changing their choice of proband
 or by changing their loop breaker selection criteria, a partial solution
 was implemented so that Mega2 exits whenever it is trying to assign a loopbreak
er who is the proband to a loop other than loop number 2.
 
\end_layout

\begin_layout Standard
When the user chose to put the output files in a new output folder, the
 resulting MEGA2run.html did not work properly because the time-dated summary
 folder was not being copied into the new output folder.
\end_layout

\begin_layout Subsection*
Bugs in Mega2 4 R5.1
\end_layout

\begin_layout Standard
Merlin plots contained an extra straight line when the steps option is selected.
 
\end_layout

\begin_layout Standard
For X-linked and Y-linked data, homozygous genotypes were mistakenly flagged
 as being heterozygous and vice versa, and always labeled as X-chromosome
 errors.
 
\end_layout

\begin_layout Standard
The allele-frequency summary option gave wrong counts and frequencies on
 Y-linked markers.
\end_layout

\begin_layout Subsection*
Bugs in Mega2 4 R5.0 
\end_layout

\begin_layout Standard
The allele summary option did not include half-typed individuals' genotypes
 in the counts, even if their genotypes are passed through to the output.
\end_layout

\begin_layout Standard
The l2a.py converter script did not check the input pedigree file to make
 sure that each line contains the required number of headers, this may have
 resulted in an invalid annotated format pedigree file.
\end_layout

\begin_layout Standard
Mega2 did not allow setting unknown phenotype value for covariates.
\end_layout

\begin_layout Standard
The linkage option was missing the Ped: value field at the end, if the input
 pedigree file did not contain a Ped: field.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 4 R4.0 
\end_layout

\begin_layout Standard
Mendel8 format control file contained multiple affection definitions if
 the user opted for combined output of multiple affection traits, causing
 Mendel to fail.
 Now, only the first affection trait is listed in the control file.
\end_layout

\begin_layout Standard
Mega2 aborted right after starting up on Mac OS X Snow Leopard machines.
 This has been fixed.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 4 R3.1 
\end_layout

\begin_layout Standard
Mendel7+ and X-linked markers: if the input map file contains only sex-averaged
 map positions, the Mendel map file positions would be set to 0 for annotated
 format input file.
 This has been fixed; average positions are taken to be the female positions,
 and male positions are set to 0.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 4 R3 
\end_layout

\begin_layout Standard
Mendel 9.0 did not accept, nor use any special missing quantitative phenotype
 value when analyzing quantitative traits, instead, it used the default
 value of 0.0.
\end_layout

\begin_layout Standard
Linkage format options (LINKAGE, SLINK, SPLINK, SIMULATE, VITESSE etc.) erroneous
ly set the first paternal and maternal sibling fields to 0, even when such
 siblings were present inside the pedigree.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 4.0 R1 
\end_layout

\begin_layout Standard
PLINK long format output files were not named correctly, as per PLINK specificat
ions.
\end_layout

\begin_layout Standard
PLINK shell script had problems and failed to run.
 This has been fixed.
\end_layout

\begin_layout Standard
Affection status inside the PLINK fam file was set to 0 for everyone.
\end_layout

\begin_layout Standard
Newest version of Mendel does not accept the variable file, which lists
 quantitative variables, instead quantitative loci are now added to the
 definition file (which is named mendel_locus.* by default).
\end_layout

\begin_layout Standard
Mega2 crashed if frequency file was not specified.
 This has been fixed.
\end_layout

\begin_layout Standard
The menu option for changing the unknown status and allele designator in
 the first menu was not working.
\end_layout

\begin_layout Standard
Conversion from pre-makeped format to post-makeped format output options
 (such as SLINK, Vitesse etc.) created wrong first-sibling links to be created
 for pedigrees that had half-siblings.
 This has been fixed.
\end_layout

\begin_layout Standard
Allegro, Gene Hunter, Gene Hunter-Plus and MLB-QTL output locus files had
 default trait penetrances set to 0.0 rather than the usual 0.5.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 4.0 
\end_layout

\begin_layout Standard
Output file names were garbled when output folder name had a 
\begin_inset Quotes eld
\end_inset

.
\begin_inset Quotes erd
\end_inset

 inside it.
 This has been fixed.
\end_layout

\begin_layout Standard
SLINK crashed when multiple chromosomes were selected.
 This has been fixed.
\end_layout

\begin_layout Standard
Rsimwalk2.pl did not read in SimWalk2 scores correctly.
\end_layout

\begin_layout Standard
Quantitative summary gave wrong standard deviation values.
 This has been fixed.
\end_layout

\begin_layout Standard
Random simulation of genotyping errors did not work correctly from 4.0 beta
 onwards.
 This has been fixed.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 4.0 beta R1
\end_layout

\begin_layout Standard
Annotated files caused Mega2 to crash if a frequency file was not provided.
 This has been fixed, and Mega2 will now calculate observed allele frequencies
 from the pedigree data as usual.
\end_layout

\begin_layout Standard
Merlin format output files were missing covariates, if these were included
 in the selected traits.
\end_layout

\begin_layout Standard
For these options, Mega2 falsely detected Mendelian inheritance errors for
 male X-linked genotypes: PREST, HWE (all options), SUMMARIES (all options).
\end_layout

\begin_layout Standard
Several bugs in handling of X-linked data have been fixed for options that
 allow X-linked analysis on data that contains both autosomal and X-linked
 loci.
 These include setting special X-linked analysis flags for the X-chromosome
 output.
\end_layout

\begin_layout Standard
R plot menu behavior was incorrect.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 4.0 beta 
\end_layout

\begin_layout Standard
These options caused mega2 to segfault: 
\begin_inset Newline newline
\end_inset

 1) Nuclear pedigree option, 2) Aspex option crashed, 3) PAP option.
\end_layout

\begin_layout Standard
Sage 3.0 sibpal parameter file was wrong.
\end_layout

\begin_layout Standard
R plot menu wasn't working for a single trait in trait-combine mode.
 Note that plots are still restricted to the trait-specific mode, if there
 are multiple trait loci.
\end_layout

\begin_layout Standard
Affected sib-pair summaries had wrong parental affection status.
\end_layout

\begin_layout Standard
In the Mendel formatted locus files, mendel_locus (Mendel 7+), locus (Mendel
 3.0) , and LOCUS (SimWalk2), long trait names were not shortened to 8 characters.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 3.0 R11 
\end_layout

\begin_layout Standard
Nuclear pedigree files had redundant chromosome number extensions when multiple
 chromosomes were selected.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 3.0 R10 
\end_layout

\begin_layout Standard
In some cases, large pedigrees in pre-makeped format files caused Mega2
 to crash.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 3.0 R9 
\end_layout

\begin_layout Standard
Several options produced wrong pedigree file with missing pedigree IDs when
 using a pre-makeped pedigree file as input.
 These involve options which skip pre-makeped to post-makeped conversion
 including Mendel-format options, Merlin, Prest, and Solar.
\end_layout

\begin_layout Standard
Reordering of traits contained a bug, where the trait locus was set to the
 wrong locus, if user changed the ordering from the input order.
\end_layout

\begin_layout Standard
Old SAGE-format files wrote spaces for missing trait values instead of a
 missing value.
\end_layout

\begin_layout Standard
HLOD scores were not read in from Allegro's output for plotting.
 These scores are produced by Allegro's parametric linkage analysis.
\end_layout

\begin_layout Standard
HWE files for Mendel's Hardy-Weinberg estimation contained completely ungenotype
d individuals.
\end_layout

\begin_layout Standard
Loop-breaking in premakeped format pedigrees produced false error messages
 about failure to break loops for pedigrees that did not contain loops.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 3.0 R8 
\end_layout

\begin_layout Standard
The old Mendel-format marker file was incorrectly read in by the RELPAIR
 conversion Perl script because there was no space between the chromosome
 number and marker position.
\end_layout

\begin_layout Standard
The Rallegro.pl, Rmerlin.pl and Rsimwalk2.pl Perl scripts failed to distinguish
 between marker loci that had identical map positions on a chromosome (very
 dense markers would have the same problem, if the output did not have enough
 precision), producing incorrectly formatted plot-output files.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 3.0 R7 
\end_layout

\begin_layout Standard
Premakeped-format pedigrees with affection status loci caused Mega2 to crash.
 This has been fixed in 3.0R8.
\end_layout

\begin_layout Standard
For pre-makeped format files, output files did not contain pedigree numbers,
 if user selected the premakeped pedigree IDs as the output pedigree id.
\end_layout

\begin_layout Standard
Mega2 failed to reset Mendelianly inconsistent genotypes even if the menu
 item for this action in the 
\begin_inset Quotes eld
\end_inset

Incorrect genotypes reset menu
\begin_inset Quotes erd
\end_inset

 was set to yes.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 3.0 R5, R6 
\end_layout

\begin_layout Standard
Unconnected individuals in premakeped-format pedigrees went undetected,
 if the pedigrees consisted only of disconnected individuals.
 This has been fixed.
\end_layout

\begin_layout Standard
Mendel option did not label X-linked loci as such when the combined output
 option was selected.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 3.0 R4 
\end_layout

\begin_layout Standard
Merlin format pedigree files created by Mega2 were not read in correctly
 by Merlin if affection status traits included a liability column, since
 there is no way to specify such loci using the QTDT-format names file.
 Now, when Mega2 is converting to Merlin-format and it encounters an affection
 status trait with a liability column, the user is prompted to select status-cla
ss labels to be designated as affected, and only the status is output in
 the pedigree file.
\end_layout

\begin_layout Standard
When a names file is used so that alleles are recoded, the random selection
 of individuals was not working correctly.
 Hence, allele frequencies computed via options 2 and 3 of the individual-select
ion menu may have been incorrect under certain conditions.
 Option 2 selects typed founders or a random member if a pedigree has no
 typed founders, and option 3 includes individuals selected via option 2
 as well as one non-founder per pedigree with an allele not found by option
 2.
 For more details, see the section on recode bug.
\end_layout

\begin_layout Standard
When recoding took place, Option 3 of of individual selection menu did not
 count all alleles present in data - it still gave 0 allele counts.
\end_layout

\begin_layout Standard
Incorrect displaying of omitted pedigree and person numbers has been fixed.
\end_layout

\begin_layout Standard
Allegro script for running and plotting results of analysis on multiple
 traits did not work.
 This has been fixed.
\end_layout

\begin_layout Standard
The R shell script contained mal-formed file-names when a single trait was
 selected for Merlin and SimWalk2 such as (null)/merlin.01.out.
 This has been fixed.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 3.0 R3 
\end_layout

\begin_layout Standard
In recoding alleles, wrong frequencies were being assigned to the alleles
 if and only if the ORIGINAL alleles were numbered 1 to N (N 
\begin_inset Formula $>$
\end_inset

= 10), making renaming unnecessary.
\end_layout

\begin_layout Standard
Due to floating-point precision error, the missing quantitative phenotype
 value was not read in correctly.
\end_layout

\begin_layout Standard
When recoding alleles, total allele count was wrong in MEGA2.RECODE file.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 3.0 R2 
\end_layout

\begin_layout Standard
The R options for Hardy-Weinberg equilibrium testing were generating spurious
 error messages on skipping markers.
\end_layout

\begin_layout Standard
Wrong column names in the output table created by the HWE R exact option.
\end_layout

\begin_layout Standard
Unique IDs were not carried over during conversion from Pre-makeped format
 to post-makeped format.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 3.0 R1 
\end_layout

\begin_layout Standard
The ID: field was not read in when multiple chromosomes were selected for
 analysis.
\end_layout

\begin_layout Standard
HWE-R EXACT option: R-script was wrong.
\end_layout

\begin_layout Standard
Mendel5 pedigree files contained quantitative variable for affection loci
 at the end of each record, which does not work with the new version of
 Mendel.
\end_layout

\begin_layout Standard
Mendel5 option did not produce a variable file for defining QTLs.
\end_layout

\begin_layout Standard
Selection of individuals for allele-frequency estimation using the founders
 + all unique alleles did not work.
 It still produced zero allele frequencies which should not be the case.
 for Mendel.
\end_layout

\begin_layout Standard
HWE R options: Spurious error message even when table was created correctly.
\end_layout

\begin_layout Standard
Linkage option - Only pedigrees with non-numeric names assigned numbers
 causing possible conflicts with pedigrees whose original numeric IDs were
 maintained in the output.
\end_layout

\begin_layout Standard
Merlin gave a segmentation-fault, if the user selected only one statistic
 for graphical output.
\end_layout

\begin_layout Standard
Vitesse shell script was missing its header and hence could not be run.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 3.0 
\end_layout

\begin_layout Standard
Hardy-Weinberg - HWE option (Guo and Thompson) had a bug, it either crashed
 or produced wrong genotype counts.
\end_layout

\begin_layout Standard
SimWalk2-npl option crashed while setting R-plots
\end_layout

\begin_layout Standard
Merlin's R-plot shell script had the wrong file names and didn't work for
 a single trait.
\end_layout

\begin_layout Standard
In rare cases, Mega2 crashed while breaking loops.
\end_layout

\begin_layout Standard
In the Combine-traits mode, Mega2 would not allow selection of all the markers
 and traits.
\end_layout

\begin_layout Standard
HWE-R based options produced incorrect MEGA2.KEYS file.
\end_layout

\begin_layout Standard
Corrected handling of missing R-formatted data files for R-graphics - Allegro
 continued through the reading even when files were missing
\end_layout

\begin_layout Standard
HWE-Mendel file names menu had two options numbered 3.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 2.5 R4
\end_layout

\begin_layout Standard
SAGE4 parameter file was wrong.
 The field-widths were not set correctly, caused the pedigree data to be
 read in incorrectly.
\end_layout

\begin_layout Standard
X-linked analysis was not working, caused Mega2 to crash.
\end_layout

\begin_layout Standard
In the BATCH mode, Mega2 appended new declarations for Value_MissingQuant
 to any existing MEGA2.BATCH file.
 This has been fixed.
\end_layout

\begin_layout Standard
SAGE 4.0 parameter file now includes a default 0 as missing genotype value
 to prevent error messages in the GENIBD output about unrecognized genotype
 value.
\end_layout

\begin_layout Standard
Mendel5 option created incorrect keys file.
\end_layout

\begin_layout Standard
Duplicate names in the names files caused Mega2 to run incorrectly.
 These are detected and causes Mega2 to exit.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 2.5 R3
\end_layout

\begin_layout Standard
SOLAR bug fixed: In the 
\begin_inset Quotes eld
\end_inset

loop-over traits
\begin_inset Quotes erd
\end_inset

 mode person IDs in the phenotype file did not match person IDs in the pedigree
 file.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 2.5 R2
\end_layout

\begin_layout Standard
SOLAR bug fixed: Mega2 crashed while looping over quantitative loci.
\end_layout

\begin_layout Standard
RECODE bug fixed: Mega2 crashed while recoding loci from 
\emph on
names file
\emph default
 , if there were no mapped loci.
\end_layout

\begin_layout Standard
MERLIN bug fixed: Merlin analysis option menu was displayed twice.
\end_layout

\begin_layout Standard
GENOTYPING ERROR simulation mode bug fixed: Locus selection was not working
 properly.
\end_layout

\begin_layout Standard
SIMWALK2 bug fixed: Location scores option produced an incorrect penetrance
 file for multiple affection liability classes.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 2.5 R1
\end_layout

\begin_layout Standard
ASPEX bug fixed - nuclear pedigree naming/numbering options did not allow
 numbering with extensions.
\end_layout

\begin_layout Standard
ASPEX bug fixed - nuclear pedigree naming/numbering options did not allow
 numbering with extensions.
\end_layout

\begin_layout Standard
SPLINK bug fixed - did not put all markers to be put into one file, when
 asked to do so.
\end_layout

\begin_layout Standard
S.A.G.E 4.x bug fixed - The format statement in the parameter file was incorrect.
\end_layout

\begin_layout Standard
R-graphics bug fixed - The output file was not renumbered according to the
 chromosome correctly.
\end_layout

\begin_layout Subsection*
Bugs in Mega2 2.5
\end_layout

\begin_layout Standard
S.A.G.E.
 3.x affected relative counts files are not set up correctly.
\end_layout

\begin_layout Standard
S.A.G.E.
 4.x parameter file did not have the correct pedigree field formats.
\end_layout

\begin_layout Standard
PREST pedigree file was not set up correctly.
 It contained one big line.
\end_layout

\begin_layout Standard
Merlin/SimWalk2-NPL option did not work due to a mismatch in pedigree naming
 between the two sets of files.
\end_layout

\begin_layout Standard
Pedigree and individual id menu behavior has been fixed.
 The different options were not being selected and displayed correctly.
\end_layout

\begin_layout Standard
Fixed SPLINK format bug - was writing individual IDs in place of mother's
 IDs.
\end_layout

\begin_layout Standard
Fixed bug in SimWalk2 for handling more than 100 liability classes.
\end_layout

\begin_layout Standard
Fixed bug in the Win 32 version of Mega2, where the locus order line was
 not read in correctly.
 The 2.5 version will work correctly however, as long as there is an extra
 non-numeric character before the newline.
\end_layout

\begin_layout Standard
Blank lines are allowed before the locus-order line again, the check for
 locus order in Ver 2.5 did not accept blank lines just before the locus
 order line.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 2.3 R4
\end_layout

\begin_layout Standard
In SOLAR, the phenotype file and marker genotype file don't match the person
 IDs in the pedigree file (id choice was not implemented for the former).
\end_layout

\begin_layout Standard
In locus reordering, for multiple chromosomes and multiple traits, traits
 were being output at the beginning of the order irrespective of the user's
 ordering.
\end_layout

\begin_layout Standard
Selection of loci for random genotype error detection from the batch file
 was incorrectly implemented.
\end_layout

\begin_layout Standard
\begin_inset Formula $>$
\end_inset

 Renaming chromosome number extension for some output files was wrong.
\end_layout

\begin_layout Standard
Segmentation fault for 0 recombination fractions (where there is only a
 single locus in premakeped-format output files.
\end_layout

\begin_layout Standard
Existing vstrm files were not removed before each Vitesse run.
 This would cause the old file to be used when Vitesse failed to create
 a new one.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 2.3 R3
\end_layout

\begin_layout Standard
SimWalk2 penetrance file had invalid liability class values.
 Acceptable values are 1-99.
\end_layout

\begin_layout Standard
SPLINK option produced garbled pedigree files if the user selected the option
 to combine all markers into one pedigree file.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 2.3 R2
\end_layout

\begin_layout Standard
For SOLAR, the HHID phenotype was being written into the phenotype file,
 this has been moved to the pedigree file.
\end_layout

\begin_layout Standard
Bug in loop reconnection - Mega2 assumed that the proband numbers were ordered
 in the pedigree file which caused the numbering of links (first_off, sibs
 etc.) to be wrong.
\end_layout

\begin_layout Standard
Individual-count for pre-makeped format input pedigrees (in the screen output
 as well as log file) was wrong.
\end_layout

\begin_layout Standard
Selecting only trait loci in S.A.G.E.
 4.0 resulted in a segfault.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 2.3 and Mega2 2.3 R1
\end_layout

\begin_layout Standard
Versions 2.3 and 2.3 R1 may have had a segmentation fault when creating nuclear
 pedigrees from post-makeped pedigrees which did not have person IDs numbered
 consecutively from 1 through the number of pedigree members.
 Nuclear pedigrees are also created in the S.A.G.E.
 3.0, ASPEX, and GHMLB options.
 Pre-makeped pedigrees do not cause segmentation faults in either version
 2.3.
\end_layout

\begin_layout Standard
Post-makeped pedigrees with non-ordinal entry IDs may have also created
 segmentation faults in the 
\begin_inset Quotes eld
\end_inset

create summary
\begin_inset Quotes erd
\end_inset

 option for segregation summary.
 Again pre-makeped files are not a problem.
\end_layout

\begin_layout Standard
Mendel pedigree file format statement has been fixed.
 The format statement for reading in pedigree members was incorrect.
\end_layout

\begin_layout Standard
The script sage_cnt.*.sh was not working in case of a single affection trait.
 This script has been corrected.
\end_layout

\begin_layout Standard
In some cases, nuclear families included half-sibs This bug affects Aspex,
 Affected Sib Counts, GHMLB and S.A.G.E.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 2.2 R3
\end_layout

\begin_layout Standard
Loop reconnection had a bug.
 If the individual with the proband field set to 1 appeared AFTER individuals
 with other proband numbers, the loops were not reconnected.
\end_layout

\begin_layout Standard
Computation of sample variance for QTLs was biased before.
\end_layout

\begin_layout Standard
HWE option crashed if any marker locus had less than 3 alleles using GUO's
 hwe program.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 2.2 R2
\end_layout

\begin_layout Standard
Spurious inheritance errors for X-linked loci namely too many distinct alleles,
 even when there were at most three alleles in a mixed-gender sibship.
\end_layout

\begin_layout Standard
S.A.G.E.
 3.0 fsp and fcor file formats were wrong.
 Shell file also had a bug.
 Handling of multiple trait loci was not correctly implemented.
\end_layout

\begin_layout Standard
The LOG and ERROR files were appended to in each run, instead of being overwritt
en.
\end_layout

\begin_layout Standard
Segmentation fault if no loci were selected.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 2.2
\end_layout

\begin_layout Standard
The Mendelian inconsistency checking routine produces spurious inconsistency
 messages because it does not handling half-siblings properly.
\end_layout

\begin_layout Standard
The 
\begin_inset Quotes eld
\end_inset

reset genotypes
\begin_inset Quotes erd
\end_inset

 menu does not EXIT, but continues to loop.
 After a few turns this will result in a buffer overflow as it keeps appending
 to the message at the bottom of the menu.
 
\end_layout

\begin_layout Subsection*
Bugs in Mega2 2.1 beta
\end_layout

\begin_layout Standard
This is a list of bugs reported by users of Mega2 2.1 beta: 
\end_layout

\begin_layout Standard
No spacing between the liability status and liability class if the selected
 affection locus had multiple liability classes.
 Affected options are: 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
begin{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
4) Convert to GeneHunter-Plus format 5) Convert to GeneHunter-format 9)
 Convert to SLINK-format 11) Set up for homogeneity analyses 12) Convert
 to SIMULATE-format 17) Convert to Vitesse-format 18) Convert to Linkage-format
 20) Convert to Allegro-format 21) Convert to MLBQTL format
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
end{verbatim}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
The sib-phase XMGR scripts do not work for a grid of risk-ratios, the curve-data
 is missing the second column.
\end_layout

\begin_layout Standard
The Vitesse LOG and STM files may contain bogus locus names and numbers,
 and, therefore, may not produce correct results.
\end_layout

\begin_layout Standard
The fix to the previous bug made locus numbers ordinal (i.e.
 1..N, where N is the window size, including trait) with trait locus always
 as locus number 1.
 This prevents the program 
\begin_inset Quotes eld
\end_inset

map
\begin_inset Quotes erd
\end_inset

 from creating the correct combined map from all these sliding windows.
 So, the locus numbers have been changed back to the original numbers.
 Version beta 2.1 has an additional bug in this ordering, so use Version
 R3 for a complete fix.
\end_layout

\begin_layout Standard
A space was missing between the affection status column and the next locus
 data column in the SPLINK output pedigree file.
\end_layout

\begin_layout Standard
Mega2 ran into infinite loops trying to sort pedigree members if the structure
 was highly complicated with inbreeding and matings across generations.
\end_layout

\begin_layout Standard
SLINK option crashed if the only trait locus chosen was a QTL.
\end_layout

\begin_layout Standard
Mendel output the first marker locus twice in the locus file if no affection
 locus was selected.
\end_layout

\begin_layout Standard
Allele count option did not skip untyped markers, so it gave meaningless
 output due to divide-by-zero errors.
\end_layout

\begin_layout Standard
Aspex and Splink options did not have the correct headers in the c-shell
 scripts when more than one analysis was put into the same file.
\end_layout

\begin_layout Section
License agreements
\end_layout

\begin_layout Subsection
GNU General Public License Version 3 for Mega2
\begin_inset CommandInset label
LatexCommand label
name "sub:GNU-General-Public"

\end_inset


\end_layout

\begin_layout LyX-Code
                    GNU GENERAL PUBLIC LICENSE
\end_layout

\begin_layout LyX-Code
                       Version 3, 29 June 2007
\end_layout

\begin_layout LyX-Code
 Copyright (C) 2007 Free Software Foundation, Inc.
 <http://fsf.org/>
\end_layout

\begin_layout LyX-Code
 Everyone is permitted to copy and distribute verbatim copies
\end_layout

\begin_layout LyX-Code
 of this license document, but changing it is not allowed.
\end_layout

\begin_layout LyX-Code
                            Preamble
\end_layout

\begin_layout LyX-Code
  The GNU General Public License is a free, copyleft license for
\end_layout

\begin_layout LyX-Code
software and other kinds of works.
\end_layout

\begin_layout LyX-Code
  The licenses for most software and other practical works are designed
\end_layout

\begin_layout LyX-Code
to take away your freedom to share and change the works.
  By contrast,
\end_layout

\begin_layout LyX-Code
the GNU General Public License is intended to guarantee your freedom to
\end_layout

\begin_layout LyX-Code
share and change all versions of a program--to make sure it remains free
\end_layout

\begin_layout LyX-Code
software for all its users.
  We, the Free Software Foundation, use the
\end_layout

\begin_layout LyX-Code
GNU General Public License for most of our software; it applies also to
\end_layout

\begin_layout LyX-Code
any other work released this way by its authors.
  You can apply it to
\end_layout

\begin_layout LyX-Code
your programs, too.
\end_layout

\begin_layout LyX-Code
  When we speak of free software, we are referring to freedom, not
\end_layout

\begin_layout LyX-Code
price.
  Our General Public Licenses are designed to make sure that you
\end_layout

\begin_layout LyX-Code
have the freedom to distribute copies of free software (and charge for
\end_layout

\begin_layout LyX-Code
them if you wish), that you receive source code or can get it if you
\end_layout

\begin_layout LyX-Code
want it, that you can change the software or use pieces of it in new
\end_layout

\begin_layout LyX-Code
free programs, and that you know you can do these things.
\end_layout

\begin_layout LyX-Code
  To protect your rights, we need to prevent others from denying you
\end_layout

\begin_layout LyX-Code
these rights or asking you to surrender the rights.
  Therefore, you have
\end_layout

\begin_layout LyX-Code
certain responsibilities if you distribute copies of the software, or if
\end_layout

\begin_layout LyX-Code
you modify it: responsibilities to respect the freedom of others.
\end_layout

\begin_layout LyX-Code
  For example, if you distribute copies of such a program, whether
\end_layout

\begin_layout LyX-Code
gratis or for a fee, you must pass on to the recipients the same
\end_layout

\begin_layout LyX-Code
freedoms that you received.
  You must make sure that they, too, receive
\end_layout

\begin_layout LyX-Code
or can get the source code.
  And you must show them these terms so they
\end_layout

\begin_layout LyX-Code
know their rights.
\end_layout

\begin_layout LyX-Code
  Developers that use the GNU GPL protect your rights with two steps:
\end_layout

\begin_layout LyX-Code
(1) assert copyright on the software, and (2) offer you this License
\end_layout

\begin_layout LyX-Code
giving you legal permission to copy, distribute and/or modify it.
\end_layout

\begin_layout LyX-Code
  For the developers' and authors' protection, the GPL clearly explains
\end_layout

\begin_layout LyX-Code
that there is no warranty for this free software.
  For both users' and
\end_layout

\begin_layout LyX-Code
authors' sake, the GPL requires that modified versions be marked as
\end_layout

\begin_layout LyX-Code
changed, so that their problems will not be attributed erroneously to
\end_layout

\begin_layout LyX-Code
authors of previous versions.
\end_layout

\begin_layout LyX-Code
  Some devices are designed to deny users access to install or run
\end_layout

\begin_layout LyX-Code
modified versions of the software inside them, although the manufacturer
\end_layout

\begin_layout LyX-Code
can do so.
  This is fundamentally incompatible with the aim of
\end_layout

\begin_layout LyX-Code
protecting users' freedom to change the software.
  The systematic
\end_layout

\begin_layout LyX-Code
pattern of such abuse occurs in the area of products for individuals to
\end_layout

\begin_layout LyX-Code
use, which is precisely where it is most unacceptable.
  Therefore, we
\end_layout

\begin_layout LyX-Code
have designed this version of the GPL to prohibit the practice for those
\end_layout

\begin_layout LyX-Code
products.
  If such problems arise substantially in other domains, we
\end_layout

\begin_layout LyX-Code
stand ready to extend this provision to those domains in future versions
\end_layout

\begin_layout LyX-Code
of the GPL, as needed to protect the freedom of users.
\end_layout

\begin_layout LyX-Code
  Finally, every program is threatened constantly by software patents.
\end_layout

\begin_layout LyX-Code
States should not allow patents to restrict development and use of
\end_layout

\begin_layout LyX-Code
software on general-purpose computers, but in those that do, we wish to
\end_layout

\begin_layout LyX-Code
avoid the special danger that patents applied to a free program could
\end_layout

\begin_layout LyX-Code
make it effectively proprietary.
  To prevent this, the GPL assures that
\end_layout

\begin_layout LyX-Code
patents cannot be used to render the program non-free.
\end_layout

\begin_layout LyX-Code
  The precise terms and conditions for copying, distribution and
\end_layout

\begin_layout LyX-Code
modification follow.
\end_layout

\begin_layout LyX-Code
                       TERMS AND CONDITIONS
\end_layout

\begin_layout LyX-Code
  0.
 Definitions.
\end_layout

\begin_layout LyX-Code
  "This License" refers to version 3 of the GNU General Public License.
\end_layout

\begin_layout LyX-Code
  "Copyright" also means copyright-like laws that apply to other kinds of
\end_layout

\begin_layout LyX-Code
works, such as semiconductor masks.
\end_layout

\begin_layout LyX-Code
  "The Program" refers to any copyrightable work licensed under this
\end_layout

\begin_layout LyX-Code
License.
  Each licensee is addressed as "you".
  "Licensees" and
\end_layout

\begin_layout LyX-Code
"recipients" may be individuals or organizations.
\end_layout

\begin_layout LyX-Code
  To "modify" a work means to copy from or adapt all or part of the work
\end_layout

\begin_layout LyX-Code
in a fashion requiring copyright permission, other than the making of an
\end_layout

\begin_layout LyX-Code
exact copy.
  The resulting work is called a "modified version" of the
\end_layout

\begin_layout LyX-Code
earlier work or a work "based on" the earlier work.
\end_layout

\begin_layout LyX-Code
  A "covered work" means either the unmodified Program or a work based
\end_layout

\begin_layout LyX-Code
on the Program.
\end_layout

\begin_layout LyX-Code
  To "propagate" a work means to do anything with it that, without
\end_layout

\begin_layout LyX-Code
permission, would make you directly or secondarily liable for
\end_layout

\begin_layout LyX-Code
infringement under applicable copyright law, except executing it on a
\end_layout

\begin_layout LyX-Code
computer or modifying a private copy.
  Propagation includes copying,
\end_layout

\begin_layout LyX-Code
distribution (with or without modification), making available to the
\end_layout

\begin_layout LyX-Code
public, and in some countries other activities as well.
\end_layout

\begin_layout LyX-Code
  To "convey" a work means any kind of propagation that enables other
\end_layout

\begin_layout LyX-Code
parties to make or receive copies.
  Mere interaction with a user through
\end_layout

\begin_layout LyX-Code
a computer network, with no transfer of a copy, is not conveying.
\end_layout

\begin_layout LyX-Code
  An interactive user interface displays "Appropriate Legal Notices"
\end_layout

\begin_layout LyX-Code
to the extent that it includes a convenient and prominently visible
\end_layout

\begin_layout LyX-Code
feature that (1) displays an appropriate copyright notice, and (2)
\end_layout

\begin_layout LyX-Code
tells the user that there is no warranty for the work (except to the
\end_layout

\begin_layout LyX-Code
extent that warranties are provided), that licensees may convey the
\end_layout

\begin_layout LyX-Code
work under this License, and how to view a copy of this License.
  If
\end_layout

\begin_layout LyX-Code
the interface presents a list of user commands or options, such as a
\end_layout

\begin_layout LyX-Code
menu, a prominent item in the list meets this criterion.
\end_layout

\begin_layout LyX-Code
  1.
 Source Code.
\end_layout

\begin_layout LyX-Code
  The "source code" for a work means the preferred form of the work
\end_layout

\begin_layout LyX-Code
for making modifications to it.
  "Object code" means any non-source
\end_layout

\begin_layout LyX-Code
form of a work.
\end_layout

\begin_layout LyX-Code
  A "Standard Interface" means an interface that either is an official
\end_layout

\begin_layout LyX-Code
standard defined by a recognized standards body, or, in the case of
\end_layout

\begin_layout LyX-Code
interfaces specified for a particular programming language, one that
\end_layout

\begin_layout LyX-Code
is widely used among developers working in that language.
\end_layout

\begin_layout LyX-Code
  The "System Libraries" of an executable work include anything, other
\end_layout

\begin_layout LyX-Code
than the work as a whole, that (a) is included in the normal form of
\end_layout

\begin_layout LyX-Code
packaging a Major Component, but which is not part of that Major
\end_layout

\begin_layout LyX-Code
Component, and (b) serves only to enable use of the work with that
\end_layout

\begin_layout LyX-Code
Major Component, or to implement a Standard Interface for which an
\end_layout

\begin_layout LyX-Code
implementation is available to the public in source code form.
  A
\end_layout

\begin_layout LyX-Code
"Major Component", in this context, means a major essential component
\end_layout

\begin_layout LyX-Code
(kernel, window system, and so on) of the specific operating system
\end_layout

\begin_layout LyX-Code
(if any) on which the executable work runs, or a compiler used to
\end_layout

\begin_layout LyX-Code
produce the work, or an object code interpreter used to run it.
\end_layout

\begin_layout LyX-Code
  The "Corresponding Source" for a work in object code form means all
\end_layout

\begin_layout LyX-Code
the source code needed to generate, install, and (for an executable
\end_layout

\begin_layout LyX-Code
work) run the object code and to modify the work, including scripts to
\end_layout

\begin_layout LyX-Code
control those activities.
  However, it does not include the work's
\end_layout

\begin_layout LyX-Code
System Libraries, or general-purpose tools or generally available free
\end_layout

\begin_layout LyX-Code
programs which are used unmodified in performing those activities but
\end_layout

\begin_layout LyX-Code
which are not part of the work.
  For example, Corresponding Source
\end_layout

\begin_layout LyX-Code
includes interface definition files associated with source files for
\end_layout

\begin_layout LyX-Code
the work, and the source code for shared libraries and dynamically
\end_layout

\begin_layout LyX-Code
linked subprograms that the work is specifically designed to require,
\end_layout

\begin_layout LyX-Code
such as by intimate data communication or control flow between those
\end_layout

\begin_layout LyX-Code
subprograms and other parts of the work.
\end_layout

\begin_layout LyX-Code
  The Corresponding Source need not include anything that users
\end_layout

\begin_layout LyX-Code
can regenerate automatically from other parts of the Corresponding
\end_layout

\begin_layout LyX-Code
Source.
\end_layout

\begin_layout LyX-Code
  The Corresponding Source for a work in source code form is that
\end_layout

\begin_layout LyX-Code
same work.
\end_layout

\begin_layout LyX-Code
  2.
 Basic Permissions.
\end_layout

\begin_layout LyX-Code
  All rights granted under this License are granted for the term of
\end_layout

\begin_layout LyX-Code
copyright on the Program, and are irrevocable provided the stated
\end_layout

\begin_layout LyX-Code
conditions are met.
  This License explicitly affirms your unlimited
\end_layout

\begin_layout LyX-Code
permission to run the unmodified Program.
  The output from running a
\end_layout

\begin_layout LyX-Code
covered work is covered by this License only if the output, given its
\end_layout

\begin_layout LyX-Code
content, constitutes a covered work.
  This License acknowledges your
\end_layout

\begin_layout LyX-Code
rights of fair use or other equivalent, as provided by copyright law.
\end_layout

\begin_layout LyX-Code
  You may make, run and propagate covered works that you do not
\end_layout

\begin_layout LyX-Code
convey, without conditions so long as your license otherwise remains
\end_layout

\begin_layout LyX-Code
in force.
  You may convey covered works to others for the sole purpose
\end_layout

\begin_layout LyX-Code
of having them make modifications exclusively for you, or provide you
\end_layout

\begin_layout LyX-Code
with facilities for running those works, provided that you comply with
\end_layout

\begin_layout LyX-Code
the terms of this License in conveying all material for which you do
\end_layout

\begin_layout LyX-Code
not control copyright.
  Those thus making or running the covered works
\end_layout

\begin_layout LyX-Code
for you must do so exclusively on your behalf, under your direction
\end_layout

\begin_layout LyX-Code
and control, on terms that prohibit them from making any copies of
\end_layout

\begin_layout LyX-Code
your copyrighted material outside their relationship with you.
\end_layout

\begin_layout LyX-Code
  Conveying under any other circumstances is permitted solely under
\end_layout

\begin_layout LyX-Code
the conditions stated below.
  Sublicensing is not allowed; section 10
\end_layout

\begin_layout LyX-Code
makes it unnecessary.
\end_layout

\begin_layout LyX-Code
  3.
 Protecting Users' Legal Rights From Anti-Circumvention Law.
\end_layout

\begin_layout LyX-Code
  No covered work shall be deemed part of an effective technological
\end_layout

\begin_layout LyX-Code
measure under any applicable law fulfilling obligations under article
\end_layout

\begin_layout LyX-Code
11 of the WIPO copyright treaty adopted on 20 December 1996, or
\end_layout

\begin_layout LyX-Code
similar laws prohibiting or restricting circumvention of such
\end_layout

\begin_layout LyX-Code
measures.
\end_layout

\begin_layout LyX-Code
  When you convey a covered work, you waive any legal power to forbid
\end_layout

\begin_layout LyX-Code
circumvention of technological measures to the extent such circumvention
\end_layout

\begin_layout LyX-Code
is effected by exercising rights under this License with respect to
\end_layout

\begin_layout LyX-Code
the covered work, and you disclaim any intention to limit operation or
\end_layout

\begin_layout LyX-Code
modification of the work as a means of enforcing, against the work's
\end_layout

\begin_layout LyX-Code
users, your or third parties' legal rights to forbid circumvention of
\end_layout

\begin_layout LyX-Code
technological measures.
\end_layout

\begin_layout LyX-Code
  4.
 Conveying Verbatim Copies.
\end_layout

\begin_layout LyX-Code
  You may convey verbatim copies of the Program's source code as you
\end_layout

\begin_layout LyX-Code
receive it, in any medium, provided that you conspicuously and
\end_layout

\begin_layout LyX-Code
appropriately publish on each copy an appropriate copyright notice;
\end_layout

\begin_layout LyX-Code
keep intact all notices stating that this License and any
\end_layout

\begin_layout LyX-Code
non-permissive terms added in accord with section 7 apply to the code;
\end_layout

\begin_layout LyX-Code
keep intact all notices of the absence of any warranty; and give all
\end_layout

\begin_layout LyX-Code
recipients a copy of this License along with the Program.
\end_layout

\begin_layout LyX-Code
  You may charge any price or no price for each copy that you convey,
\end_layout

\begin_layout LyX-Code
and you may offer support or warranty protection for a fee.
\end_layout

\begin_layout LyX-Code
  5.
 Conveying Modified Source Versions.
\end_layout

\begin_layout LyX-Code
  You may convey a work based on the Program, or the modifications to
\end_layout

\begin_layout LyX-Code
produce it from the Program, in the form of source code under the
\end_layout

\begin_layout LyX-Code
terms of section 4, provided that you also meet all of these conditions:
\end_layout

\begin_layout LyX-Code
    a) The work must carry prominent notices stating that you modified
\end_layout

\begin_layout LyX-Code
    it, and giving a relevant date.
\end_layout

\begin_layout LyX-Code
    b) The work must carry prominent notices stating that it is
\end_layout

\begin_layout LyX-Code
    released under this License and any conditions added under section
\end_layout

\begin_layout LyX-Code
    7.
  This requirement modifies the requirement in section 4 to
\end_layout

\begin_layout LyX-Code
    "keep intact all notices".
\end_layout

\begin_layout LyX-Code
    c) You must license the entire work, as a whole, under this
\end_layout

\begin_layout LyX-Code
    License to anyone who comes into possession of a copy.
  This
\end_layout

\begin_layout LyX-Code
    License will therefore apply, along with any applicable section 7
\end_layout

\begin_layout LyX-Code
    additional terms, to the whole of the work, and all its parts,
\end_layout

\begin_layout LyX-Code
    regardless of how they are packaged.
  This License gives no
\end_layout

\begin_layout LyX-Code
    permission to license the work in any other way, but it does not
\end_layout

\begin_layout LyX-Code
    invalidate such permission if you have separately received it.
\end_layout

\begin_layout LyX-Code
    d) If the work has interactive user interfaces, each must display
\end_layout

\begin_layout LyX-Code
    Appropriate Legal Notices; however, if the Program has interactive
\end_layout

\begin_layout LyX-Code
    interfaces that do not display Appropriate Legal Notices, your
\end_layout

\begin_layout LyX-Code
    work need not make them do so.
\end_layout

\begin_layout LyX-Code
  A compilation of a covered work with other separate and independent
\end_layout

\begin_layout LyX-Code
works, which are not by their nature extensions of the covered work,
\end_layout

\begin_layout LyX-Code
and which are not combined with it such as to form a larger program,
\end_layout

\begin_layout LyX-Code
in or on a volume of a storage or distribution medium, is called an
\end_layout

\begin_layout LyX-Code
"aggregate" if the compilation and its resulting copyright are not
\end_layout

\begin_layout LyX-Code
used to limit the access or legal rights of the compilation's users
\end_layout

\begin_layout LyX-Code
beyond what the individual works permit.
  Inclusion of a covered work
\end_layout

\begin_layout LyX-Code
in an aggregate does not cause this License to apply to the other
\end_layout

\begin_layout LyX-Code
parts of the aggregate.
\end_layout

\begin_layout LyX-Code
  6.
 Conveying Non-Source Forms.
\end_layout

\begin_layout LyX-Code
  You may convey a covered work in object code form under the terms
\end_layout

\begin_layout LyX-Code
of sections 4 and 5, provided that you also convey the
\end_layout

\begin_layout LyX-Code
machine-readable Corresponding Source under the terms of this License,
\end_layout

\begin_layout LyX-Code
in one of these ways:
\end_layout

\begin_layout LyX-Code
    a) Convey the object code in, or embodied in, a physical product
\end_layout

\begin_layout LyX-Code
    (including a physical distribution medium), accompanied by the
\end_layout

\begin_layout LyX-Code
    Corresponding Source fixed on a durable physical medium
\end_layout

\begin_layout LyX-Code
    customarily used for software interchange.
\end_layout

\begin_layout LyX-Code
    b) Convey the object code in, or embodied in, a physical product
\end_layout

\begin_layout LyX-Code
    (including a physical distribution medium), accompanied by a
\end_layout

\begin_layout LyX-Code
    written offer, valid for at least three years and valid for as
\end_layout

\begin_layout LyX-Code
    long as you offer spare parts or customer support for that product
\end_layout

\begin_layout LyX-Code
    model, to give anyone who possesses the object code either (1) a
\end_layout

\begin_layout LyX-Code
    copy of the Corresponding Source for all the software in the
\end_layout

\begin_layout LyX-Code
    product that is covered by this License, on a durable physical
\end_layout

\begin_layout LyX-Code
    medium customarily used for software interchange, for a price no
\end_layout

\begin_layout LyX-Code
    more than your reasonable cost of physically performing this
\end_layout

\begin_layout LyX-Code
    conveying of source, or (2) access to copy the
\end_layout

\begin_layout LyX-Code
    Corresponding Source from a network server at no charge.
\end_layout

\begin_layout LyX-Code
    c) Convey individual copies of the object code with a copy of the
\end_layout

\begin_layout LyX-Code
    written offer to provide the Corresponding Source.
  This
\end_layout

\begin_layout LyX-Code
    alternative is allowed only occasionally and noncommercially, and
\end_layout

\begin_layout LyX-Code
    only if you received the object code with such an offer, in accord
\end_layout

\begin_layout LyX-Code
    with subsection 6b.
\end_layout

\begin_layout LyX-Code
    d) Convey the object code by offering access from a designated
\end_layout

\begin_layout LyX-Code
    place (gratis or for a charge), and offer equivalent access to the
\end_layout

\begin_layout LyX-Code
    Corresponding Source in the same way through the same place at no
\end_layout

\begin_layout LyX-Code
    further charge.
  You need not require recipients to copy the
\end_layout

\begin_layout LyX-Code
    Corresponding Source along with the object code.
  If the place to
\end_layout

\begin_layout LyX-Code
    copy the object code is a network server, the Corresponding Source
\end_layout

\begin_layout LyX-Code
    may be on a different server (operated by you or a third party)
\end_layout

\begin_layout LyX-Code
    that supports equivalent copying facilities, provided you maintain
\end_layout

\begin_layout LyX-Code
    clear directions next to the object code saying where to find the
\end_layout

\begin_layout LyX-Code
    Corresponding Source.
  Regardless of what server hosts the
\end_layout

\begin_layout LyX-Code
    Corresponding Source, you remain obligated to ensure that it is
\end_layout

\begin_layout LyX-Code
    available for as long as needed to satisfy these requirements.
\end_layout

\begin_layout LyX-Code
    e) Convey the object code using peer-to-peer transmission, provided
\end_layout

\begin_layout LyX-Code
    you inform other peers where the object code and Corresponding
\end_layout

\begin_layout LyX-Code
    Source of the work are being offered to the general public at no
\end_layout

\begin_layout LyX-Code
    charge under subsection 6d.
\end_layout

\begin_layout LyX-Code
  A separable portion of the object code, whose source code is excluded
\end_layout

\begin_layout LyX-Code
from the Corresponding Source as a System Library, need not be
\end_layout

\begin_layout LyX-Code
included in conveying the object code work.
\end_layout

\begin_layout LyX-Code
  A "User Product" is either (1) a "consumer product", which means any
\end_layout

\begin_layout LyX-Code
tangible personal property which is normally used for personal, family,
\end_layout

\begin_layout LyX-Code
or household purposes, or (2) anything designed or sold for incorporation
\end_layout

\begin_layout LyX-Code
into a dwelling.
  In determining whether a product is a consumer product,
\end_layout

\begin_layout LyX-Code
doubtful cases shall be resolved in favor of coverage.
  For a particular
\end_layout

\begin_layout LyX-Code
product received by a particular user, "normally used" refers to a
\end_layout

\begin_layout LyX-Code
typical or common use of that class of product, regardless of the status
\end_layout

\begin_layout LyX-Code
of the particular user or of the way in which the particular user
\end_layout

\begin_layout LyX-Code
actually uses, or expects or is expected to use, the product.
  A product
\end_layout

\begin_layout LyX-Code
is a consumer product regardless of whether the product has substantial
\end_layout

\begin_layout LyX-Code
commercial, industrial or non-consumer uses, unless such uses represent
\end_layout

\begin_layout LyX-Code
the only significant mode of use of the product.
\end_layout

\begin_layout LyX-Code
  "Installation Information" for a User Product means any methods,
\end_layout

\begin_layout LyX-Code
procedures, authorization keys, or other information required to install
\end_layout

\begin_layout LyX-Code
and execute modified versions of a covered work in that User Product from
\end_layout

\begin_layout LyX-Code
a modified version of its Corresponding Source.
  The information must
\end_layout

\begin_layout LyX-Code
suffice to ensure that the continued functioning of the modified object
\end_layout

\begin_layout LyX-Code
code is in no case prevented or interfered with solely because
\end_layout

\begin_layout LyX-Code
modification has been made.
\end_layout

\begin_layout LyX-Code
  If you convey an object code work under this section in, or with, or
\end_layout

\begin_layout LyX-Code
specifically for use in, a User Product, and the conveying occurs as
\end_layout

\begin_layout LyX-Code
part of a transaction in which the right of possession and use of the
\end_layout

\begin_layout LyX-Code
User Product is transferred to the recipient in perpetuity or for a
\end_layout

\begin_layout LyX-Code
fixed term (regardless of how the transaction is characterized), the
\end_layout

\begin_layout LyX-Code
Corresponding Source conveyed under this section must be accompanied
\end_layout

\begin_layout LyX-Code
by the Installation Information.
  But this requirement does not apply
\end_layout

\begin_layout LyX-Code
if neither you nor any third party retains the ability to install
\end_layout

\begin_layout LyX-Code
modified object code on the User Product (for example, the work has
\end_layout

\begin_layout LyX-Code
been installed in ROM).
\end_layout

\begin_layout LyX-Code
  The requirement to provide Installation Information does not include a
\end_layout

\begin_layout LyX-Code
requirement to continue to provide support service, warranty, or updates
\end_layout

\begin_layout LyX-Code
for a work that has been modified or installed by the recipient, or for
\end_layout

\begin_layout LyX-Code
the User Product in which it has been modified or installed.
  Access to a
\end_layout

\begin_layout LyX-Code
network may be denied when the modification itself materially and
\end_layout

\begin_layout LyX-Code
adversely affects the operation of the network or violates the rules and
\end_layout

\begin_layout LyX-Code
protocols for communication across the network.
\end_layout

\begin_layout LyX-Code
  Corresponding Source conveyed, and Installation Information provided,
\end_layout

\begin_layout LyX-Code
in accord with this section must be in a format that is publicly
\end_layout

\begin_layout LyX-Code
documented (and with an implementation available to the public in
\end_layout

\begin_layout LyX-Code
source code form), and must require no special password or key for
\end_layout

\begin_layout LyX-Code
unpacking, reading or copying.
\end_layout

\begin_layout LyX-Code
  7.
 Additional Terms.
\end_layout

\begin_layout LyX-Code
  "Additional permissions" are terms that supplement the terms of this
\end_layout

\begin_layout LyX-Code
License by making exceptions from one or more of its conditions.
\end_layout

\begin_layout LyX-Code
Additional permissions that are applicable to the entire Program shall
\end_layout

\begin_layout LyX-Code
be treated as though they were included in this License, to the extent
\end_layout

\begin_layout LyX-Code
that they are valid under applicable law.
  If additional permissions
\end_layout

\begin_layout LyX-Code
apply only to part of the Program, that part may be used separately
\end_layout

\begin_layout LyX-Code
under those permissions, but the entire Program remains governed by
\end_layout

\begin_layout LyX-Code
this License without regard to the additional permissions.
\end_layout

\begin_layout LyX-Code
  When you convey a copy of a covered work, you may at your option
\end_layout

\begin_layout LyX-Code
remove any additional permissions from that copy, or from any part of
\end_layout

\begin_layout LyX-Code
it.
  (Additional permissions may be written to require their own
\end_layout

\begin_layout LyX-Code
removal in certain cases when you modify the work.)  You may place
\end_layout

\begin_layout LyX-Code
additional permissions on material, added by you to a covered work,
\end_layout

\begin_layout LyX-Code
for which you have or can give appropriate copyright permission.
\end_layout

\begin_layout LyX-Code
  Notwithstanding any other provision of this License, for material you
\end_layout

\begin_layout LyX-Code
add to a covered work, you may (if authorized by the copyright holders of
\end_layout

\begin_layout LyX-Code
that material) supplement the terms of this License with terms:
\end_layout

\begin_layout LyX-Code
    a) Disclaiming warranty or limiting liability differently from the
\end_layout

\begin_layout LyX-Code
    terms of sections 15 and 16 of this License; or
\end_layout

\begin_layout LyX-Code
    b) Requiring preservation of specified reasonable legal notices or
\end_layout

\begin_layout LyX-Code
    author attributions in that material or in the Appropriate Legal
\end_layout

\begin_layout LyX-Code
    Notices displayed by works containing it; or
\end_layout

\begin_layout LyX-Code
    c) Prohibiting misrepresentation of the origin of that material, or
\end_layout

\begin_layout LyX-Code
    requiring that modified versions of such material be marked in
\end_layout

\begin_layout LyX-Code
    reasonable ways as different from the original version; or
\end_layout

\begin_layout LyX-Code
    d) Limiting the use for publicity purposes of names of licensors or
\end_layout

\begin_layout LyX-Code
    authors of the material; or
\end_layout

\begin_layout LyX-Code
    e) Declining to grant rights under trademark law for use of some
\end_layout

\begin_layout LyX-Code
    trade names, trademarks, or service marks; or
\end_layout

\begin_layout LyX-Code
    f) Requiring indemnification of licensors and authors of that
\end_layout

\begin_layout LyX-Code
    material by anyone who conveys the material (or modified versions of
\end_layout

\begin_layout LyX-Code
    it) with contractual assumptions of liability to the recipient, for
\end_layout

\begin_layout LyX-Code
    any liability that these contractual assumptions directly impose on
\end_layout

\begin_layout LyX-Code
    those licensors and authors.
\end_layout

\begin_layout LyX-Code
  All other non-permissive additional terms are considered "further
\end_layout

\begin_layout LyX-Code
restrictions" within the meaning of section 10.
  If the Program as you
\end_layout

\begin_layout LyX-Code
received it, or any part of it, contains a notice stating that it is
\end_layout

\begin_layout LyX-Code
governed by this License along with a term that is a further
\end_layout

\begin_layout LyX-Code
restriction, you may remove that term.
  If a license document contains
\end_layout

\begin_layout LyX-Code
a further restriction but permits relicensing or conveying under this
\end_layout

\begin_layout LyX-Code
License, you may add to a covered work material governed by the terms
\end_layout

\begin_layout LyX-Code
of that license document, provided that the further restriction does
\end_layout

\begin_layout LyX-Code
not survive such relicensing or conveying.
\end_layout

\begin_layout LyX-Code
  If you add terms to a covered work in accord with this section, you
\end_layout

\begin_layout LyX-Code
must place, in the relevant source files, a statement of the
\end_layout

\begin_layout LyX-Code
additional terms that apply to those files, or a notice indicating
\end_layout

\begin_layout LyX-Code
where to find the applicable terms.
\end_layout

\begin_layout LyX-Code
  Additional terms, permissive or non-permissive, may be stated in the
\end_layout

\begin_layout LyX-Code
form of a separately written license, or stated as exceptions;
\end_layout

\begin_layout LyX-Code
the above requirements apply either way.
\end_layout

\begin_layout LyX-Code
  8.
 Termination.
\end_layout

\begin_layout LyX-Code
  You may not propagate or modify a covered work except as expressly
\end_layout

\begin_layout LyX-Code
provided under this License.
  Any attempt otherwise to propagate or
\end_layout

\begin_layout LyX-Code
modify it is void, and will automatically terminate your rights under
\end_layout

\begin_layout LyX-Code
this License (including any patent licenses granted under the third
\end_layout

\begin_layout LyX-Code
paragraph of section 11).
\end_layout

\begin_layout LyX-Code
  However, if you cease all violation of this License, then your
\end_layout

\begin_layout LyX-Code
license from a particular copyright holder is reinstated (a)
\end_layout

\begin_layout LyX-Code
provisionally, unless and until the copyright holder explicitly and
\end_layout

\begin_layout LyX-Code
finally terminates your license, and (b) permanently, if the copyright
\end_layout

\begin_layout LyX-Code
holder fails to notify you of the violation by some reasonable means
\end_layout

\begin_layout LyX-Code
prior to 60 days after the cessation.
\end_layout

\begin_layout LyX-Code
  Moreover, your license from a particular copyright holder is
\end_layout

\begin_layout LyX-Code
reinstated permanently if the copyright holder notifies you of the
\end_layout

\begin_layout LyX-Code
violation by some reasonable means, this is the first time you have
\end_layout

\begin_layout LyX-Code
received notice of violation of this License (for any work) from that
\end_layout

\begin_layout LyX-Code
copyright holder, and you cure the violation prior to 30 days after
\end_layout

\begin_layout LyX-Code
your receipt of the notice.
\end_layout

\begin_layout LyX-Code
  Termination of your rights under this section does not terminate the
\end_layout

\begin_layout LyX-Code
licenses of parties who have received copies or rights from you under
\end_layout

\begin_layout LyX-Code
this License.
  If your rights have been terminated and not permanently
\end_layout

\begin_layout LyX-Code
reinstated, you do not qualify to receive new licenses for the same
\end_layout

\begin_layout LyX-Code
material under section 10.
\end_layout

\begin_layout LyX-Code
  9.
 Acceptance Not Required for Having Copies.
\end_layout

\begin_layout LyX-Code
  You are not required to accept this License in order to receive or
\end_layout

\begin_layout LyX-Code
run a copy of the Program.
  Ancillary propagation of a covered work
\end_layout

\begin_layout LyX-Code
occurring solely as a consequence of using peer-to-peer transmission
\end_layout

\begin_layout LyX-Code
to receive a copy likewise does not require acceptance.
  However,
\end_layout

\begin_layout LyX-Code
nothing other than this License grants you permission to propagate or
\end_layout

\begin_layout LyX-Code
modify any covered work.
  These actions infringe copyright if you do
\end_layout

\begin_layout LyX-Code
not accept this License.
  Therefore, by modifying or propagating a
\end_layout

\begin_layout LyX-Code
covered work, you indicate your acceptance of this License to do so.
\end_layout

\begin_layout LyX-Code
  10.
 Automatic Licensing of Downstream Recipients.
\end_layout

\begin_layout LyX-Code
  Each time you convey a covered work, the recipient automatically
\end_layout

\begin_layout LyX-Code
receives a license from the original licensors, to run, modify and
\end_layout

\begin_layout LyX-Code
propagate that work, subject to this License.
  You are not responsible
\end_layout

\begin_layout LyX-Code
for enforcing compliance by third parties with this License.
\end_layout

\begin_layout LyX-Code
  An "entity transaction" is a transaction transferring control of an
\end_layout

\begin_layout LyX-Code
organization, or substantially all assets of one, or subdividing an
\end_layout

\begin_layout LyX-Code
organization, or merging organizations.
  If propagation of a covered
\end_layout

\begin_layout LyX-Code
work results from an entity transaction, each party to that
\end_layout

\begin_layout LyX-Code
transaction who receives a copy of the work also receives whatever
\end_layout

\begin_layout LyX-Code
licenses to the work the party's predecessor in interest had or could
\end_layout

\begin_layout LyX-Code
give under the previous paragraph, plus a right to possession of the
\end_layout

\begin_layout LyX-Code
Corresponding Source of the work from the predecessor in interest, if
\end_layout

\begin_layout LyX-Code
the predecessor has it or can get it with reasonable efforts.
\end_layout

\begin_layout LyX-Code
  You may not impose any further restrictions on the exercise of the
\end_layout

\begin_layout LyX-Code
rights granted or affirmed under this License.
  For example, you may
\end_layout

\begin_layout LyX-Code
not impose a license fee, royalty, or other charge for exercise of
\end_layout

\begin_layout LyX-Code
rights granted under this License, and you may not initiate litigation
\end_layout

\begin_layout LyX-Code
(including a cross-claim or counterclaim in a lawsuit) alleging that
\end_layout

\begin_layout LyX-Code
any patent claim is infringed by making, using, selling, offering for
\end_layout

\begin_layout LyX-Code
sale, or importing the Program or any portion of it.
\end_layout

\begin_layout LyX-Code
  11.
 Patents.
\end_layout

\begin_layout LyX-Code
  A "contributor" is a copyright holder who authorizes use under this
\end_layout

\begin_layout LyX-Code
License of the Program or a work on which the Program is based.
  The
\end_layout

\begin_layout LyX-Code
work thus licensed is called the contributor's "contributor version".
\end_layout

\begin_layout LyX-Code
  A contributor's "essential patent claims" are all patent claims
\end_layout

\begin_layout LyX-Code
owned or controlled by the contributor, whether already acquired or
\end_layout

\begin_layout LyX-Code
hereafter acquired, that would be infringed by some manner, permitted
\end_layout

\begin_layout LyX-Code
by this License, of making, using, or selling its contributor version,
\end_layout

\begin_layout LyX-Code
but do not include claims that would be infringed only as a
\end_layout

\begin_layout LyX-Code
consequence of further modification of the contributor version.
  For
\end_layout

\begin_layout LyX-Code
purposes of this definition, "control" includes the right to grant
\end_layout

\begin_layout LyX-Code
patent sublicenses in a manner consistent with the requirements of
\end_layout

\begin_layout LyX-Code
this License.
\end_layout

\begin_layout LyX-Code
  Each contributor grants you a non-exclusive, worldwide, royalty-free
\end_layout

\begin_layout LyX-Code
patent license under the contributor's essential patent claims, to
\end_layout

\begin_layout LyX-Code
make, use, sell, offer for sale, import and otherwise run, modify and
\end_layout

\begin_layout LyX-Code
propagate the contents of its contributor version.
\end_layout

\begin_layout LyX-Code
  In the following three paragraphs, a "patent license" is any express
\end_layout

\begin_layout LyX-Code
agreement or commitment, however denominated, not to enforce a patent
\end_layout

\begin_layout LyX-Code
(such as an express permission to practice a patent or covenant not to
\end_layout

\begin_layout LyX-Code
sue for patent infringement).
  To "grant" such a patent license to a
\end_layout

\begin_layout LyX-Code
party means to make such an agreement or commitment not to enforce a
\end_layout

\begin_layout LyX-Code
patent against the party.
\end_layout

\begin_layout LyX-Code
  If you convey a covered work, knowingly relying on a patent license,
\end_layout

\begin_layout LyX-Code
and the Corresponding Source of the work is not available for anyone
\end_layout

\begin_layout LyX-Code
to copy, free of charge and under the terms of this License, through a
\end_layout

\begin_layout LyX-Code
publicly available network server or other readily accessible means,
\end_layout

\begin_layout LyX-Code
then you must either (1) cause the Corresponding Source to be so
\end_layout

\begin_layout LyX-Code
available, or (2) arrange to deprive yourself of the benefit of the
\end_layout

\begin_layout LyX-Code
patent license for this particular work, or (3) arrange, in a manner
\end_layout

\begin_layout LyX-Code
consistent with the requirements of this License, to extend the patent
\end_layout

\begin_layout LyX-Code
license to downstream recipients.
  "Knowingly relying" means you have
\end_layout

\begin_layout LyX-Code
actual knowledge that, but for the patent license, your conveying the
\end_layout

\begin_layout LyX-Code
covered work in a country, or your recipient's use of the covered work
\end_layout

\begin_layout LyX-Code
in a country, would infringe one or more identifiable patents in that
\end_layout

\begin_layout LyX-Code
country that you have reason to believe are valid.
\end_layout

\begin_layout LyX-Code
  If, pursuant to or in connection with a single transaction or
\end_layout

\begin_layout LyX-Code
arrangement, you convey, or propagate by procuring conveyance of, a
\end_layout

\begin_layout LyX-Code
covered work, and grant a patent license to some of the parties
\end_layout

\begin_layout LyX-Code
receiving the covered work authorizing them to use, propagate, modify
\end_layout

\begin_layout LyX-Code
or convey a specific copy of the covered work, then the patent license
\end_layout

\begin_layout LyX-Code
you grant is automatically extended to all recipients of the covered
\end_layout

\begin_layout LyX-Code
work and works based on it.
\end_layout

\begin_layout LyX-Code
  A patent license is "discriminatory" if it does not include within
\end_layout

\begin_layout LyX-Code
the scope of its coverage, prohibits the exercise of, or is
\end_layout

\begin_layout LyX-Code
conditioned on the non-exercise of one or more of the rights that are
\end_layout

\begin_layout LyX-Code
specifically granted under this License.
  You may not convey a covered
\end_layout

\begin_layout LyX-Code
work if you are a party to an arrangement with a third party that is
\end_layout

\begin_layout LyX-Code
in the business of distributing software, under which you make payment
\end_layout

\begin_layout LyX-Code
to the third party based on the extent of your activity of conveying
\end_layout

\begin_layout LyX-Code
the work, and under which the third party grants, to any of the
\end_layout

\begin_layout LyX-Code
parties who would receive the covered work from you, a discriminatory
\end_layout

\begin_layout LyX-Code
patent license (a) in connection with copies of the covered work
\end_layout

\begin_layout LyX-Code
conveyed by you (or copies made from those copies), or (b) primarily
\end_layout

\begin_layout LyX-Code
for and in connection with specific products or compilations that
\end_layout

\begin_layout LyX-Code
contain the covered work, unless you entered into that arrangement,
\end_layout

\begin_layout LyX-Code
or that patent license was granted, prior to 28 March 2007.
\end_layout

\begin_layout LyX-Code
  Nothing in this License shall be construed as excluding or limiting
\end_layout

\begin_layout LyX-Code
any implied license or other defenses to infringement that may
\end_layout

\begin_layout LyX-Code
otherwise be available to you under applicable patent law.
\end_layout

\begin_layout LyX-Code
  12.
 No Surrender of Others' Freedom.
\end_layout

\begin_layout LyX-Code
  If conditions are imposed on you (whether by court order, agreement or
\end_layout

\begin_layout LyX-Code
otherwise) that contradict the conditions of this License, they do not
\end_layout

\begin_layout LyX-Code
excuse you from the conditions of this License.
  If you cannot convey a
\end_layout

\begin_layout LyX-Code
covered work so as to satisfy simultaneously your obligations under this
\end_layout

\begin_layout LyX-Code
License and any other pertinent obligations, then as a consequence you may
\end_layout

\begin_layout LyX-Code
not convey it at all.
  For example, if you agree to terms that obligate you
\end_layout

\begin_layout LyX-Code
to collect a royalty for further conveying from those to whom you convey
\end_layout

\begin_layout LyX-Code
the Program, the only way you could satisfy both those terms and this
\end_layout

\begin_layout LyX-Code
License would be to refrain entirely from conveying the Program.
\end_layout

\begin_layout LyX-Code
  13.
 Use with the GNU Affero General Public License.
\end_layout

\begin_layout LyX-Code
  Notwithstanding any other provision of this License, you have
\end_layout

\begin_layout LyX-Code
permission to link or combine any covered work with a work licensed
\end_layout

\begin_layout LyX-Code
under version 3 of the GNU Affero General Public License into a single
\end_layout

\begin_layout LyX-Code
combined work, and to convey the resulting work.
  The terms of this
\end_layout

\begin_layout LyX-Code
License will continue to apply to the part which is the covered work,
\end_layout

\begin_layout LyX-Code
but the special requirements of the GNU Affero General Public License,
\end_layout

\begin_layout LyX-Code
section 13, concerning interaction through a network will apply to the
\end_layout

\begin_layout LyX-Code
combination as such.
\end_layout

\begin_layout LyX-Code
  14.
 Revised Versions of this License.
\end_layout

\begin_layout LyX-Code
  The Free Software Foundation may publish revised and/or new versions of
\end_layout

\begin_layout LyX-Code
the GNU General Public License from time to time.
  Such new versions will
\end_layout

\begin_layout LyX-Code
be similar in spirit to the present version, but may differ in detail to
\end_layout

\begin_layout LyX-Code
address new problems or concerns.
\end_layout

\begin_layout LyX-Code
  Each version is given a distinguishing version number.
  If the
\end_layout

\begin_layout LyX-Code
Program specifies that a certain numbered version of the GNU General
\end_layout

\begin_layout LyX-Code
Public License "or any later version" applies to it, you have the
\end_layout

\begin_layout LyX-Code
option of following the terms and conditions either of that numbered
\end_layout

\begin_layout LyX-Code
version or of any later version published by the Free Software
\end_layout

\begin_layout LyX-Code
Foundation.
  If the Program does not specify a version number of the
\end_layout

\begin_layout LyX-Code
GNU General Public License, you may choose any version ever published
\end_layout

\begin_layout LyX-Code
by the Free Software Foundation.
\end_layout

\begin_layout LyX-Code
  If the Program specifies that a proxy can decide which future
\end_layout

\begin_layout LyX-Code
versions of the GNU General Public License can be used, that proxy's
\end_layout

\begin_layout LyX-Code
public statement of acceptance of a version permanently authorizes you
\end_layout

\begin_layout LyX-Code
to choose that version for the Program.
\end_layout

\begin_layout LyX-Code
  Later license versions may give you additional or different
\end_layout

\begin_layout LyX-Code
permissions.
  However, no additional obligations are imposed on any
\end_layout

\begin_layout LyX-Code
author or copyright holder as a result of your choosing to follow a
\end_layout

\begin_layout LyX-Code
later version.
\end_layout

\begin_layout LyX-Code
  15.
 Disclaimer of Warranty.
\end_layout

\begin_layout LyX-Code
  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
\end_layout

\begin_layout LyX-Code
APPLICABLE LAW.
  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
\end_layout

\begin_layout LyX-Code
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
\end_layout

\begin_layout LyX-Code
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
\end_layout

\begin_layout LyX-Code
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
\end_layout

\begin_layout LyX-Code
PURPOSE.
  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
\end_layout

\begin_layout LyX-Code
IS WITH YOU.
  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
\end_layout

\begin_layout LyX-Code
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
\end_layout

\begin_layout LyX-Code
  16.
 Limitation of Liability.
\end_layout

\begin_layout LyX-Code
  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
\end_layout

\begin_layout LyX-Code
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
\end_layout

\begin_layout LyX-Code
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING
 ANY
\end_layout

\begin_layout LyX-Code
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
\end_layout

\begin_layout LyX-Code
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
\end_layout

\begin_layout LyX-Code
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
\end_layout

\begin_layout LyX-Code
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
\end_layout

\begin_layout LyX-Code
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
\end_layout

\begin_layout LyX-Code
SUCH DAMAGES.
\end_layout

\begin_layout LyX-Code
  17.
 Interpretation of Sections 15 and 16.
\end_layout

\begin_layout LyX-Code
  If the disclaimer of warranty and limitation of liability provided
\end_layout

\begin_layout LyX-Code
above cannot be given local legal effect according to their terms,
\end_layout

\begin_layout LyX-Code
reviewing courts shall apply local law that most closely approximates
\end_layout

\begin_layout LyX-Code
an absolute waiver of all civil liability in connection with the
\end_layout

\begin_layout LyX-Code
Program, unless a warranty or assumption of liability accompanies a
\end_layout

\begin_layout LyX-Code
copy of the Program in return for a fee.
\end_layout

\begin_layout LyX-Code
                     END OF TERMS AND CONDITIONS
\end_layout

\begin_layout LyX-Code
            How to Apply These Terms to Your New Programs
\end_layout

\begin_layout LyX-Code
  If you develop a new program, and you want it to be of the greatest
\end_layout

\begin_layout LyX-Code
possible use to the public, the best way to achieve this is to make it
\end_layout

\begin_layout LyX-Code
free software which everyone can redistribute and change under these terms.
\end_layout

\begin_layout LyX-Code
  To do so, attach the following notices to the program.
  It is safest
\end_layout

\begin_layout LyX-Code
to attach them to the start of each source file to most effectively
\end_layout

\begin_layout LyX-Code
state the exclusion of warranty; and each file should have at least
\end_layout

\begin_layout LyX-Code
the "copyright" line and a pointer to where the full notice is found.
\end_layout

\begin_layout LyX-Code
    <one line to give the program's name and a brief idea of what it does.>
\end_layout

\begin_layout LyX-Code
    Copyright (C) <year>  <name of author>
\end_layout

\begin_layout LyX-Code
    This program is free software: you can redistribute it and/or modify
\end_layout

\begin_layout LyX-Code
    it under the terms of the GNU General Public License as published by
\end_layout

\begin_layout LyX-Code
    the Free Software Foundation, either version 3 of the License, or
\end_layout

\begin_layout LyX-Code
    (at your option) any later version.
\end_layout

\begin_layout LyX-Code
    This program is distributed in the hope that it will be useful,
\end_layout

\begin_layout LyX-Code
    but WITHOUT ANY WARRANTY; without even the implied warranty of
\end_layout

\begin_layout LyX-Code
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the
\end_layout

\begin_layout LyX-Code
    GNU General Public License for more details.
\end_layout

\begin_layout LyX-Code
    You should have received a copy of the GNU General Public License
\end_layout

\begin_layout LyX-Code
    along with this program.
  If not, see <http://www.gnu.org/licenses/>.
\end_layout

\begin_layout LyX-Code
Also add information on how to contact you by electronic and paper mail.
\end_layout

\begin_layout LyX-Code
  If the program does terminal interaction, make it output a short
\end_layout

\begin_layout LyX-Code
notice like this when it starts in an interactive mode:
\end_layout

\begin_layout LyX-Code
    <program>  Copyright (C) <year>  <name of author>
\end_layout

\begin_layout LyX-Code
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show
 w'.
\end_layout

\begin_layout LyX-Code
    This is free software, and you are welcome to redistribute it
\end_layout

\begin_layout LyX-Code
    under certain conditions; type `show c' for details.
\end_layout

\begin_layout LyX-Code
The hypothetical commands `show w' and `show c' should show the appropriate
\end_layout

\begin_layout LyX-Code
parts of the General Public License.
  Of course, your program's commands
\end_layout

\begin_layout LyX-Code
might be different; for a GUI interface, you would use an "about box".
\end_layout

\begin_layout LyX-Code
  You should also get your employer (if you work as a programmer) or school,
\end_layout

\begin_layout LyX-Code
if any, to sign a "copyright disclaimer" for the program, if necessary.
\end_layout

\begin_layout LyX-Code
For more information on this, and how to apply and follow the GNU GPL, see
\end_layout

\begin_layout LyX-Code
<http://www.gnu.org/licenses/>.
\end_layout

\begin_layout LyX-Code
  The GNU General Public License does not permit incorporating your program
\end_layout

\begin_layout LyX-Code
into proprietary programs.
  If your program is a subroutine library, you
\end_layout

\begin_layout LyX-Code
may consider it more useful to permit linking proprietary applications with
\end_layout

\begin_layout LyX-Code
the library.
  If this is what you want to do, use the GNU Lesser General
\end_layout

\begin_layout LyX-Code
Public License instead of this License.
  But first, please read
\end_layout

\begin_layout LyX-Code
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
\end_layout

\begin_layout Subsection
MIT License for VCFtools
\begin_inset CommandInset label
LatexCommand label
name "sub:MIT-License---"

\end_inset


\end_layout

\begin_layout Standard
We have included VCFTools source code in the srcdir/vcftools directory of
 the Mega2 distribution.
 This code has been minimally modified so as to integrate it with Mega2.
 While the VCFtools source code as a whole is licensed under the Lesser
 GPL license below, these files contain the MIT license: bgzf.c and bgzf.h.
\end_layout

\begin_layout LyX-Code
/* The MIT License
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
   Copyright (c) 2008 Broad Institute / Massachusetts Institute of Technology
\end_layout

\begin_layout LyX-Code
                 2011, 2012 Attractive Chaos <attractor@live.co.uk>
\end_layout

\begin_layout LyX-Code
   Permission is hereby granted, free of charge, to any person obtaining
 a copy
\end_layout

\begin_layout LyX-Code
   of this software and associated documentation files (the "Software"),
 to deal
\end_layout

\begin_layout LyX-Code
   in the Software without restriction, including without limitation the
 rights
\end_layout

\begin_layout LyX-Code
   to use, copy, modify, merge, publish, distribute, sublicense, and/or
 sell
\end_layout

\begin_layout LyX-Code
   copies of the Software, and to permit persons to whom the Software is
\end_layout

\begin_layout LyX-Code
   furnished to do so, subject to the following conditions:
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
   The above copyright notice and this permission notice shall be included
 in
\end_layout

\begin_layout LyX-Code
   all copies or substantial portions of the Software.
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 OR
\end_layout

\begin_layout LyX-Code
   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
\end_layout

\begin_layout LyX-Code
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 IN NO EVENT SHALL THE
\end_layout

\begin_layout LyX-Code
   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
\end_layout

\begin_layout LyX-Code
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM,
\end_layout

\begin_layout LyX-Code
   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 IN
\end_layout

\begin_layout LyX-Code
   THE SOFTWARE.
\end_layout

\begin_layout LyX-Code
*/ 
\end_layout

\begin_layout Subsection
License for ZLIB
\begin_inset CommandInset label
LatexCommand label
name "sub:License-for-ZLIB"

\end_inset


\end_layout

\begin_layout Standard
For ease of compilation, we have included zlib source code in the srcdir/zlib-1.2.
8 directory of the Mega2 distribution.
 This code has been minimally modified so as to integrate it with Mega2.
 The zlib home page is 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

http://zlib.net/
\end_layout

\end_inset

.
 It contains useful information including the license reproduced below.
\end_layout

\begin_layout LyX-Code
/* zlib.h -- interface of the 'zlib' general purpose compression library
\end_layout

\begin_layout LyX-Code
  version 1.2.8, April 28th, 2013
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
  Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
  This software is provided 'as-is', without any express or implied
\end_layout

\begin_layout LyX-Code
  warranty.
  In no event will the authors be held liable for any damages
\end_layout

\begin_layout LyX-Code
  arising from the use of this software.
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
  Permission is granted to anyone to use this software for any purpose,
\end_layout

\begin_layout LyX-Code
  including commercial applications, and to alter it and redistribute it
\end_layout

\begin_layout LyX-Code
  freely, subject to the following restrictions:
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
  1.
 The origin of this software must not be misrepresented; you must not
\end_layout

\begin_layout LyX-Code
     claim that you wrote the original software.
 If you use this software
\end_layout

\begin_layout LyX-Code
     in a product, an acknowledgment in the product documentation would
 be
\end_layout

\begin_layout LyX-Code
     appreciated but is not required.
\end_layout

\begin_layout LyX-Code
  2.
 Altered source versions must be plainly marked as such, and must not be
\end_layout

\begin_layout LyX-Code
     misrepresented as being the original software.
\end_layout

\begin_layout LyX-Code
  3.
 This notice may not be removed or altered from any source distribution.
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
  Jean-loup Gailly        Mark Adler
\end_layout

\begin_layout LyX-Code
  jloup@gzip.org          madler@alumni.caltech.edu
\end_layout

\begin_layout LyX-Code

\end_layout

\begin_layout LyX-Code
*/ 
\end_layout

\begin_layout Subsection
GNU Lesser General Public License Version 3 for VCFtools
\begin_inset CommandInset label
LatexCommand label
name "sub:GNU-Lesser-General"

\end_inset


\end_layout

\begin_layout Standard
We have included VCFTools source code in the srcdir/vcftools directory of
 the Mega2 distribution.
 This code has been minimally modified so as to integrate it with Mega2.
 While the VCFtools source code as a whole is licensed under the Lesser
 GPL license, two of files contain the MIT license, listed above.
\end_layout

\begin_layout Standard
GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007
\end_layout

\begin_layout Standard
Copyright (C) 2007 Free Software Foundation, Inc.
 <http://fsf.org/> Everyone is permitted to copy and distribute verbatim
 copies of this license document, but changing it is not allowed.
\end_layout

\begin_layout Standard
This version of the GNU Lesser General Public License incorporates the terms
 and conditions of version 3 of the GNU General Public License, supplemented
 by the additional permissions listed below.
\end_layout

\begin_layout Standard
0.
 Additional Definitions.
\end_layout

\begin_layout Standard
As used herein, "this License" refers to version 3 of the GNU Lesser General
 Public License, and the "GNU GPL" refers to version 3 of the GNU General
 Public License.
\end_layout

\begin_layout Standard
"The Library" refers to a covered work governed by this License, other than
 an Application or a Combined Work as defined below.
\end_layout

\begin_layout Standard
An "Application" is any work that makes use of an interface provided by
 the Library, but which is not otherwise based on the Library.
 Defining a subclass of a class defined by the Library is deemed a mode
 of using an interface provided by the Library.
\end_layout

\begin_layout Standard
A "Combined Work" is a work produced by combining or linking an Application
 with the Library.
 The particular version of the Library with which the Combined Work was
 made is also called the "Linked Version".
\end_layout

\begin_layout Standard
The "Minimal Corresponding Source" for a Combined Work means the Corresponding
 Source for the Combined Work, excluding any source code for portions of
 the Combined Work that, considered in isolation, are based on the Application,
 and not on the Linked Version.
\end_layout

\begin_layout Standard
The "Corresponding Application Code" for a Combined Work means the object
 code and/or source code for the Application, including any data and utility
 programs needed for reproducing the Combined Work from the Application,
 but excluding the System Libraries of the Combined Work.
\end_layout

\begin_layout Standard
1.
 Exception to Section 3 of the GNU GPL.
\end_layout

\begin_layout Standard
You may convey a covered work under sections 3 and 4 of this License without
 being bound by section 3 of the GNU GPL.
\end_layout

\begin_layout Standard
2.
 Conveying Modified Versions.
\end_layout

\begin_layout Standard
If you modify a copy of the Library, and, in your modifications, a facility
 refers to a function or data to be supplied by an Application that uses
 the facility (other than as an argument passed when the facility is invoked),
 then you may convey a copy of the modified version:
\end_layout

\begin_layout Standard
a) under this License, provided that you make a good faith effort to ensure
 that, in the event an Application does not supply the function or data,
 the facility still operates, and performs whatever part of its purpose
 remains meaningful, or
\end_layout

\begin_layout Standard
b) under the GNU GPL, with none of the additional permissions of this License
 applicable to that copy.
\end_layout

\begin_layout Standard
3.
 Object Code Incorporating Material from Library Header Files.
\end_layout

\begin_layout Standard
The object code form of an Application may incorporate material from a header
 file that is part of the Library.
 You may convey such object code under terms of your choice, provided that,
 if the incorporated material is not limited to numerical parameters, data
 structure layouts and accessors, or small macros, inline functions and
 templates (ten or fewer lines in length), you do both of the following:
\end_layout

\begin_layout Standard
a) Give prominent notice with each copy of the object code that the Library
 is used in it and that the Library and its use are covered by this License.
\end_layout

\begin_layout Standard
b) Accompany the object code with a copy of the GNU GPL and this license
 document.
\end_layout

\begin_layout Standard
4.
 Combined Works.
\end_layout

\begin_layout Standard
You may convey a Combined Work under terms of your choice that, taken together,
 effectively do not restrict modification of the portions of the Library
 contained in the Combined Work and reverse engineering for debugging such
 modifications, if you also do each of the following:
\end_layout

\begin_layout Standard
a) Give prominent notice with each copy of the Combined Work that the Library
 is used in it and that the Library and its use are covered by this License.
\end_layout

\begin_layout Standard
b) Accompany the Combined Work with a copy of the GNU GPL and this license
 document.
\end_layout

\begin_layout Standard
c) For a Combined Work that displays copyright notices during execution,
 include the copyright notice for the Library among these notices, as well
 as a reference directing the user to the copies of the GNU GPL and this
 license document.
\end_layout

\begin_layout Standard
d) Do one of the following:
\end_layout

\begin_layout Standard
0) Convey the Minimal Corresponding Source under the terms of this License,
 and the Corresponding Application Code in a form suitable for, and under
 terms that permit, the user to recombine or relink the Application with
 a modified version of the Linked Version to produce a modified Combined
 Work, in the manner specified by section 6 of the GNU GPL for conveying
 Corresponding Source.
\end_layout

\begin_layout Standard
1) Use a suitable shared library mechanism for linking with the Library.
 A suitable mechanism is one that (a) uses at run time a copy of the Library
 already present on the user's computer system, and (b) will operate properly
 with a modified version of the Library that is interface-compatible with
 the Linked Version.
\end_layout

\begin_layout Standard
e) Provide Installation Information, but only if you would otherwise be
 required to provide such information under section 6 of the GNU GPL, and
 only to the extent that such information is necessary to install and execute
 a modified version of the Combined Work produced by recombining or relinking
 the Application with a modified version of the Linked Version.
 (If you use option 4d0, the Installation Information must accompany the
 Minimal Corresponding Source and Corresponding Application Code.
 If you use option 4d1, you must provide the Installation Information in
 the manner specified by section 6 of the GNU GPL for conveying Corresponding
 Source.)
\end_layout

\begin_layout Standard
5.
 Combined Libraries.
\end_layout

\begin_layout Standard
You may place library facilities that are a work based on the Library side
 by side in a single library together with other library facilities that
 are not Applications and are not covered by this License, and convey such
 a combined library under terms of your choice, if you do both of the following:
\end_layout

\begin_layout Standard
a) Accompany the combined library with a copy of the same work based on
 the Library, uncombined with any other library facilities, conveyed under
 the terms of this License.
\end_layout

\begin_layout Standard
b) Give prominent notice with the combined library that part of it is a
 work based on the Library, and explaining where to find the accompanying
 uncombined form of the same work.
\end_layout

\begin_layout Standard
6.
 Revised Versions of the GNU Lesser General Public License.
\end_layout

\begin_layout Standard
The Free Software Foundation may publish revised and/or new versions of
 the GNU Lesser General Public License from time to time.
 Such new versions will be similar in spirit to the present version, but
 may differ in detail to address new problems or concerns.
\end_layout

\begin_layout Standard
Each version is given a distinguishing version number.
 If the Library as you received it specifies that a certain numbered version
 of the GNU Lesser General Public License "or any later version" applies
 to it, you have the option of following the terms and conditions either
 of that published version or of any later version published by the Free
 Software Foundation.
 If the Library as you received it does not specify a version number of
 the GNU Lesser General Public License, you may choose any version of the
 GNU Lesser General Public License ever published by the Free Software Foundatio
n.
\end_layout

\begin_layout Standard
If the Library as you received it specifies that a proxy can decide whether
 future versions of the GNU Lesser General Public License shall apply, that
 proxy's public statement of acceptance of any version is permanent authorizatio
n for you to choose that version for the Library.
\end_layout

\begin_layout Section
PDF documentation
\end_layout

\begin_layout Standard

\series bold
Note:
\series default
 This documentation is available in PDF form from 
\begin_inset Flex URL
status collapsed

\begin_layout Plain Layout

https://watson.hgen.pitt.edu/docs/mega2_html/Mega2_Documentation.pdf
\end_layout

\end_inset

 and it is also included in the mega2_html folder of the Mega2 distribution.
\end_layout

\begin_layout Section
Grant Acknowledgments
\end_layout

\begin_layout Standard
Mega2 is currently supported by the University of Pittsburgh and the following
 NIH grant: R01GM076667 (Weeks, Daniel E).
 Prior work on Mega2 was partly supported by R01AG16989 (D.E.W.), R01HG00932
 (D.E.W.), and R01AG16992 (to Jeffrey R.
 O'Connell).
 In addition, parts of Mega2 were inspired by data generated under NIH grant
 R01DK55406 to Ranjan Deka.
\end_layout

\begin_layout Section
References
\end_layout

\begin_layout Standard
Almasy L, Blangero J (1998) Multipoint quantitative-trait linkage analysis
 in general pedigrees.
 Am J Hum Genet 62:1198-211
\end_layout

\begin_layout Standard
Blangero J, Almasy L (1997) Multipoint oligogenic linkage analysis of quantitati
ve traits.
 Genet Epidemiol 14:959-964
\end_layout

\begin_layout Standard
Boehnke M, Cox NJ (1997) Accurate inference of relationships in sib-pair
 linkage studies.
 Am J Hum Genet 61:423-9
\end_layout

\begin_layout Standard
Guo SW, Thompson EA (1992) Performing the exact test of Hardy-Weinberg proportio
n for multiple alleles.
 Biometrics 48:361-72
\end_layout

\begin_layout Standard
Hinds D, Risch N (1996) The ASPEX package: affected sib-pair mapping.
 ftp://lahmed.stanford.edu/pub/aspex.
\end_layout

\begin_layout Standard
Holmans P (1993) Asymptotic properties of affected-sib-pair linkage analysis.
 Am J Hum Genet 52:362-374
\end_layout

\begin_layout Standard
Kong A, Cox NJ (1997) Allele-sharing models: LOD scores and accurate linkage
 tests.
 Am J Hum Genet 61:1179-88
\end_layout

\begin_layout Standard
Kruglyak L, Daly MJ, Reeve-Daly MP, Lander ES (1996) Parametric and nonparametri
c linkage analysis: a unified multipoint approach.
 Am J Hum Genet 58:1347-1363
\end_layout

\begin_layout Standard
Lange K, Weeks D, Boehnke M (1988) Programs for pedigree analysis: MENDEL,
 FISHER, and dGENE.
 Genet Epidemiol 5:471-472
\end_layout

\begin_layout Standard
Lathrop GM, Lalouel J-M (1984) Easy calculations of lod scores and genetic
 risks on small computers.
 Am J Hum Genet 36:460-465
\end_layout

\begin_layout Standard
Lathrop GM, Lalouel JM (1988) Efficient computations in multilocus linkage
 analysis.
 Am J Hum Genet 42:498-505
\end_layout

\begin_layout Standard
Lathrop GM, Lalouel JM, White RL (1986) Construction of human linkage maps:
 likelihood calculations for multilocus analysis.
 Genet Epidemiol 3:39-52
\end_layout

\begin_layout Standard
Lazzeroni LC, Lange K (1997) Markov chains for Monte Carlo tests of genetic
 equilibrium in multidimensional contingency tables.
 Annals of Statistics 25:138-168
\end_layout

\begin_layout Standard
Morris AP, Curnow RN, Whittaker JC (1997) Randomization tests of disease-marker
 associations.
 Ann Hum Genet 61:49-60
\end_layout

\begin_layout Standard
O'Connell JR, Weeks DE (1995) The VITESSE algorithm for rapid exact multilocus
 linkage analysis via genotype set-recoding and fuzzy inheritance.
 Nat Genet 11:402-408
\end_layout

\begin_layout Standard
Ott J (1989) Computer-simulation methods in human linkage analysis.
 Proc Natl Acad Sci USA 86:4175-4178
\end_layout

\begin_layout Standard
Sobel E, Lange K (1996) Descent graphs in pedigree analysis: Applications
 to haplotyping, location scores, and marker-sharing statistics.
 Am J Hum Genet 58:1323-1337
\end_layout

\begin_layout Standard
Terwilliger JD (1996) The ANALYZE package.
 ftp://linkage.cpmc.columbia.edu.
\end_layout

\begin_layout Standard
Terwilliger JD, Ott J (1994) Handbook of human genetic linkage.
 Johns Hopkins University Press, Baltimore
\end_layout

\begin_layout Standard
Terwilliger JD, Speer M, Ott J (1993) Chromosome-based method for rapid
 computer simulation in human genetic linkage analysis.
 Genet Epidemiol 10:217-224
\end_layout

\begin_layout Standard
Weeks DE, Lange K (1988) The affected-pedigree-member method of linkage
 analysis.
 Am J Hum Genet 42:315-326
\end_layout

\begin_layout Standard
Weeks DE, Ott J, Lathrop GM (1990) SLINK: a general simulation program for
 linkage analysis.
 Am J Hum Genet 47:A204
\end_layout

\end_body
\end_document
