Detailed info: 1) Create SimWalk2-format files
Detailed info: 2) Convert to MENDEL-format
Detailed info: 3) Convert to ASPEX-format
Detailed info: 4) Convert to GeneHunter-Plus format
Detailed info: 5) Convert to GeneHunter-format
Detailed info: 6) Convert to APM-format
Detailed info: 7) Convert to APM MULT multiple locus format
Detailed info: 8) Create nuclear families
Detailed info: 9) Convert to SLINK-format
Detailed info: 10) Convert to SPLINK-format
Detailed info: 11) Set up for homogeneity analyses
Detailed info: 12) Convert to SIMULATE-format files
Detailed info: 13) Create summary files   [Updated]
Detailed info: 14) Convert to SAGE-format
Detailed info: 15) Set up for TDTMax analyses
Detailed info: 16) Convert to SOLAR-format
Detailed info: 17) Convert to Vitesse-format
Detailed info: 18) Convert to Linkage-format
Detailed info: 19) Test loci for Hardy-Weinberg Equilibrium
Detailed info: 20) Convert to Allegro format
Detailed info: 21) Convert to MLBQTL format
Detailed info: 22) Convert to S.A.G.E. 4.0 format
Detailed info: 23) Convert to Pre-makeped format
Detailed info: 24) Convert to Merlin-SimWalk2 format
Detailed info: 25) Convert to PREST format
Detailed info: 26) Convert to PAP format
Detailed info: 27) Convert to Merlin 0.9.x format    [Updated]
Detailed info: 28) Convert to Loki format   
Detailed info: 29) Convert to Mendel 5 format   [New]

More detailed information on specific options

Detailed info: 1) Create SimWalk2-format files

Choosing this option will lead you to this submenu of SimWalk2 specific options:

SimWalk2 program options:
1) Haplotype analysis
2) Parametric linkage analysis
3) Non-parametric linkage analysis
4) IBD estimation
5) Mistyping analysis


Suppose the chromosome number is 5. Then Mega2 will, by default, generate the following files (the [*] represents different names for each sub-option).

   Pedigree file:        PEDIGREE.05
   Locus file:           LOCUS.05
   Penetrance file:      PEN.05
   Batch File:           BATCH2.05
   C-Shell script file:  [*].05.sh

It multiple traits are selected for analysis, the a combined shell script is created which executes the shell scripts in the individual trait directories. This shell script is called
 [*].all.sh 

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.
Given below is an example of this combined shell script:

---------------------------------------------------
#          Mon Aug  4 16:51:30 2003
#   Input file names:
#          pedin.01
#          datain.01
#          map.01
#   Untyped pedigree option Include all pedigrees whether typed or not
echo SimWalk2 analysis for chromosome 1, trait #0 ...
echo This may take a while.
./npl.01.sh
echo SimWalk2 analysis for chromosome 2, trait #0 ...
echo This may take a while.
./npl.02.sh
echo SimWalk2 analysis for chromosome 3, trait #0 ...
echo This may take a while.
./npl.03.sh
echo Executing R shell script Rsimwalk2.all.sh
./Rsimwalk2.all.sh
------------------------------------------------------

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).
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).
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-prametric and parametic linkage analyis options.
Note that the shell script will wipe out the files LOCUS.DAT, PEDIGREE.DAT, PEN.DAT, BATCH2.DAT, and ERROR-*.TXT.
The haplotyping shell script is called haplo.05.sh
The name of the Location scores C-Shell script file is loc.05.sh.
The Non-parametric linkage C-Shell script is called npl.05.sh.
The IBD estimation C-Shell script is called ibd.05.sh.
The Mistyping analysis C-Shell script is called mis.05.sh.

Detailed info: 2) Convert to MENDEL-format

Suppose the chromosome number is 5. Then Mega2 will, by default, generate the following files:

                 Mendel pedigree file:   pedm.05
                 Mendel locus file:      locus.05
                 Mendel penetrance file: pen.05


Note that the penetrance file will only be created if there are one or more affection status loci in the set of selected loci.
Detailed explanation of the penetrance file:
Our penetrance file is designed to permit the user to duplicate precisely any analysis done using the LINKAGE package (http://linkage.rockefeller.edu/soft/linkage/) 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).
To use the penetrance file, you need a set of three matched input files:
1) locus.dat <- The usual MENDEL locus file.
2) pedm.dat <- The usual MENDEL pedigree file with one quantitative variable representing the phenotype at the trait locus.
3) pen.dat <- A penetrance table (created by Mega2).

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.
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).
Example:
If we input this LINKAGE-style datafile into Mega2, then it will generate the ‘pen.dat’ file seen below:
LINKAGE-style datafile.dat:

2 0 0 5  << NO. OF LOCI, RISK LOCUS, SEXLINKED (IF 1) PROGRAM 
0 0.0 0.0 0  << MUT LOCUS, MUT RATE, HAPLOTYPE FREQUENCIES (IF 1)
1	2
1	2  # trait 
0.999800 0.000200   << GENE FREQUENCIES
4 << NO. OF LIABILITY CLASSES
0.0000 0.0500 0.0500
0.0000 0.2000 0.2000
0.0000 0.6000 0.6000
0.0000 0.8000 0.8000 << PENETRANCES
3	3  # M1
0.200000 0.166670 0.633330   << GENE FREQUENCIES
0 0  << SEX DIFFERENCE, INTERFERENCE (IF 1 OR 2)
0.10000 << RECOMBINATION VALUES
1 0.02500 0.50000 << REC VARIED, INCREMENT, FINISHING VALUE


Resulting ‘pen.dat’ file:

1	<= Number of affection status loci trait
4     <= Locus name, Number of liability classes
101 1.00000 0.95000 0.95000 <= Penetrances 1  1   
102 1.00000 0.80000 0.80000 <= Penetrances 1  2   
103 1.00000 0.40000 0.40000 <= Penetrances 1  3   
104 1.00000 0.20000 0.20000 <= Penetrances 1  4   
201 0.00000 0.05000 0.05000 <= Penetrances 2  1   
202 0.00000 0.20000 0.20000 <= Penetrances 2  2   
203 0.00000 0.60000 0.60000 <= Penetrances 2  3   
204 0.00000 0.80000 0.80000 <= Penetrances 2  4   


Restrictions:
FACE="Palatino">USERM15 expects only one affection status locus which should be first in the locus order.
Mega2 supports no more than 99 liability classes.
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:

... Ped: 1 Per: 100101

For Mendel, this option may be toggled on or off within the 'MENDEL file name menu':
==========================================================
  MENDEL file name menu
==========================================================
0) Done with this menu - please proceed
 1) Locus file name:           locus.06         [overwrite]
 2) Pedigree filename:         pedm.06          [overwrite]
 3) Penetrance file name:      pen.06           [overwrite]
 4) Batch file name:           batch.06         [overwrite]
 5) M13 batch file name:       m13bat.06        [overwrite]
 6) Use original ids if given:  yes
Select options 0-5 to enter new file names, 6 to toggle >       


Detailed info: 3) Convert to ASPEX-format

The Aspex option has 4 sub-options
1) sib_ibd
2) sib_tdt
3) sib_phase
4) sib_map           

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):
   
        Aspex locus file:           asp_in.06 
        Aspex pedigree file:        asp_dat.06 
        C-shell script file:        sib_ibd.06.sh


User has the option of creating a combined c-shell script for multiple chromosomes. 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 :

   
        1) discard_partial:        [true]
        2) linear_model:           [true]
        3) most_likely:            [true]
        4) fixed_step:             [false]
        5) no_Dv:                  [true]
        6) fixed_freq:             [false]
        7) truncate_sharing:       [true]
        8) count_once:             [false]
        9) first_pair:             [false]
        10) count_unaffected:      [false]
        11) count_discordant:      [false]
        12) sex_split:             [false]
        13) show_pairs:            [false]
        14) mapping:               [haldane]
        15) max_step:              [ 1.0000 cM]
        16) error_freq             [0.0000]
        17) exclusion_level        [0.0000]
        18) Distance to left end
            of chromosome          [10.0000 cM]
        19) Distance to right end
            of chromosome          [10.0000 cM]    

The user can also elect to convert the families to Nuclear families, and define risk-ratios.
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 "conversion to nuclear families" option. These original ids are assumed to appear at the end of each record in the pedigree file in the format:

... Ped: 1 Per: 100101

This option may be toggled on or off within the 'ASPEX file name menu':

==========================================================
ASPEX file name menu:
==========================================================
0) Done with this menu - please proceed.
 1) Locus file name:           asp_in.06        [overwrite]
 2) Pedigree datafile name:    asp_dat.06       [overwrite]
 3) C-shell script file name:  sib_ibd.06.sh    [overwrite]
 4) Output original ids if given:   yes
Select options 0-3 to enter new file names, 4 to toggle > 



Detailed info: 4) Convert to GeneHunter-Plus format

For each chromosome Mega2 creates the following set of GeneHunter-Plus format files (for e.g. chromosome 6):
         GeneHunter-Plus pedigree file:       ghp_ped.06        
	 GeneHunter-Plus locus file:          ghp_dat.06    
	 GeneHunter-Plus command file:        ghp_in.06     
	 C-shell script file:                 ghp_script.06.sh  

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.
Example command file:

   photo ghp.06.out
   load ghp_dat.06
   use
   score
   scan ghp_ped.06
   ps on
   total het
   npl_all.06.ps
   lod.06.ps
   info.06.ps
   quit      

In order to run GeneHunter-Plus on these data files, one needs only to execute the C-shell script.



Detailed info: 5) Convert to GeneHunter-format

Files created for GeneHunter:
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.

      GeneHunter pedigree file:       gh_ped.06 
      GeneHunter locus file:          gh_dat.06
      GeneHunter command file:        gh_in.06  
      C-shell script file:            gh_script.06.sh 
Selection of trait Loci:
GeneHunter supports quantitative as well as affection status loci. One or more of these quantitative loci can be labelled 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.
A typical locus file would be as follows:

10 0 0 5
0 0.000 0.000 0
1 2 3 4 5 6 7 8 9 10
1 2 # gaw12
 0.999900 0.000100
1
 0.0100 0.8000 0.8000
3 6 # D06G025
 0.104180 0.045500 0.024650 0.196970 0.283060 0.345640
3 7 # D06G028
 0.080650 0.084430 0.186500 0.150680 0.148510 0.234920 0.114310
3 8 # D06G034
 0.373830 0.084400 0.092330 0.070510 0.016640 0.096660 0.144270 0.121360
3 4 # D06G035
 0.354540 0.330390 0.071380 0.243690
3 14 # D06G041
 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
3 8 # D06G043
 0.098180 0.118750 0.207360 0.228480 0.049630 0.045060 0.235700 0.016840
0 2  # Q1
 
 
 
 
 
0 2  # Q2
 
 
 
 
 
4 0 # Q3
0 0
 0.50000 0.04431 0.03816 0.01400 0.05307 0.02095 0.49000 0.49000 0.49000 Haldane
1 0.10000 0.45000             

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 "Q3". The "4 0" denotes a co-variate, and this locus record contains only a single line.
Mega2 allows omission of the affection status locus during locus re-ordering for GeneHunter. In this case, it inserts a "dummy" locus at the proper position. The user is informed of the Insertion of a dummy locus on the screen and inside the log file.


Detailed info: 6) Convert to APM-format

None.

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:
       kin_ml.06

for only chromosome 6 and
       kin_ml.all

for combined data from multiple chromosomes.


Detailed info: 7) Convert to APM MULT multiple locus format

None.

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:
    Data file: kin_mult1_3.06
    Data file: kin_mult2_4.06
    Script file apmmult.01.sh 

The user can select the length of the marker interval via a menu.


Detailed info: 8) Create nuclear families

None.

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:
1) For each specific chromosome (# 1 in this case):
     Locus file nuke_data.01.
     Pedigree file nuke_ped.01.

2) For combined output from multiple chromosomes:
     Locus file nuke_data.all.
     Pedigree file nuke_ped.all

The user has a choice of combined or separate output files per chromosome. Markers can be reordered freely.


Detailed info: 9) Convert to SLINK-format

None.

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.
The following files are created for this option (all chromosome-specific):
    SLINK-format pedigree file : simped.01
    SLINK-format locus file    : simdata.01
    SLINK-format parameter file: slinkin.01
    SLINK-format C-shell file  : slink.01.sh   


Detailed info: 10) Convert to SPLINK-format

When one chooses to create files in SPLINK-format, the following menu will appear:

SPLINK file conversion options:
1) Single pedigree file for all markers.
2) One pedigree file for each marker.


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.

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 "-S+" command line option (which replaces the "-S" option found in earlier versions).


Detailed info: 11) Set up for homogeneity analyses


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:
     Pedigree file : lod2ped.01  
     Locus file    : lod2data.01 
     C-shell file  : lod2.01.sh 
This option can handle only a single trait (affection status or quantitative) per analysis. If multiple traitrs are selected, then separate output files will be created for each trait.


Detailed info: 12) Convert to SIMULATE-format files


This option creates the files needed for input into the simulation program SIMULATE. The following files are created (one set per chromosome):
    Pedigree file : simped.06
    Locus file    : simdata.06
    Parameter file: problem.06    

SIMULATE will also allow only a single trait which has to be a binary trait.


Detailed info: 13) Create summary files


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.


Option 1) Create segregation and relative count summary files.
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:

15 affected members with status 2.
0 unaffected members with status 1.

 Segregation Mating Table Counts:
Mo Fa              0           1           2 Seg Ratio Aff/(Unaff + Aff)
------           ---         ---         ---  -------- --------
0 x 0 ->           0           0           0                 
0 x 1 ->           0           0           0                 
0 x 2 ->           0           0           4   100.000  100.000
1 x 0 ->           0           0           0                 
1 x 1 ->           0           0           0                 
1 x 2 ->           0           0           0                 
2 x 0 ->           1           0           6    85.714  100.000
2 x 1 ->           0           0           0                 
2 x 2 ->           0           0           2   100.000  100.000

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.

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:

Summary Counts
There are 2 pedigrees, of which 1 are typed at 
one or more of 2 markers on chromosome 5
            All members  |  Affecteds   |      Sibships  Sib | Affected pairs with
                 Typed   |    Typed     |         Naff  pairs| kinship k/32
Pedigree      #   >1  All|   #   >1  All|   #  Min  Max      |   2    4    6    8 
   Ped 1:    11    0    0|   7    0    0|   3    2    2     3|   4    8    0    9 
   Ped 2:    10   10    9|   7    7    6|   4    1    2     1|   1    6    4    5 
  TOTAL      21   10    9|  14    7    6|                   4|   5   14    4   14 

Type of affected pair      Count    Kinship
 sib pairs                     4      8/32
 parent-child pairs           10      8/32
 halfsib pairs                 0      4/32
 avuncular pairs               6      4/32


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 genotyped affected relative pairs, then this can be generated via the SAGE option of Mega2.

Option 2) Create allele frequency summary table.
For each co-dominant marker, this option will produce an allele frequency table. Here is an example one:

Chromosome 5 : locus M2 with 2 alleles

There are 2 pedigrees containing 22 individuals,
of whom 10 are genotyped.

Heterozygosity Frequency   Count
     Observed  0.8000          8
     Expected  0.5000          5

Allele Frequency Table:
Allele#   Input    Observed  Count
     1    0.50000  0.50000      10
     2    0.50000  0.50000      10
Total Alleles (observed)   =    20

Here is the GENOTYPE DISTRIBUTION of all known genoytypes:
OBSERVED count 
EXPECTED count

allele #
1) 1
   2
  
2) 8 1
   5 2
  
   1 2 <- allele #


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.

Option 3) Count alleles and genotypes within groups.
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:

Summary file output options :
0) Done with this menu - please proceed
 1) Display percentages in addition to counts [yes]
 2) Include rows with all zero counts [no]
 3) Include columns with all zero counts [no]
 4) Output tab-text file [no]


Sub-option 4 here, when toggled on, will result in the production of tab-delimited text files, one for each sub-table, that can easily then be read into most any statistical package for further analyses.

Here is an example summary file produced by this option:

Trait TRAIT
      Allele counts for marker  M2
M2     Unknown       Affected    Total    Total Freq
    1        2   0.3333     8   0.5714    10     0.5000 
    2        4   0.6667     6   0.4286    10     0.5000 
TOTAL        6             14             20

      Genotype counts for marker  M2
M2     Unknown       Affected    Total     Total Freq
 1/ 1        0   0.0000    1   0.1429     1      0.1000
 1/ 2        2   0.6667    6   0.8571     8      0.8000
 2/ 2        1   0.3333    0   0.0000     1      0.1000
TOTAL        3             7             10


HINT: If one has case-control data, one can use Mega2 to generate the appropriate case-control counts by setting up an affection status locus and coding "cases" as "affected" and "controls" as "unknowns" (or "normals"). Likewise, if one has multiple categories (e.g., 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.

Option 4) Genotyping success rate summary .
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 genotyping_rate.##. Here is an excerpt form a typical output file:
---------------------
Thu Jun  6 14:18:47 2002
Input file names
locus file:    datain.01
pedigree file: pedin.01
map file:      map.01
Untyped pedigree option: Include all pedigrees whether typed or not
---------------------

 Genotyping success rate summary for chromosome 1
---------------------------------------------------
Per person genotyping rate :
Number of markers: 4
Maximum number of markers typed 4
Minimum number of markers typed 0
---------------------------------------------------
Ped      Person   #Markers typed  Success Rate
---------------------------------------------------
3         1                   4         1.00
3         2                   4         1.00
3         3                   4         1.00
3         4                   4         1.00
13        1                   4         1.00
13        2                   4         1.00
13        3                   4         1.00
13        4                   4         1.00
7         1                   4         1.00

:	  :		      :		:


Per marker genotyping rate:
Total number of individuals: 384
Maximum number of individuals typed at a marker 364
Minimum number of individuals typed at a marker 356
---------------------------------------------------
Marker      Alleles   #Individuals   #Percentage
                       Typed          Typed
---------------------------------------------------
d1s196            4            356          0.93
d1s238            4            364          0.95
d1s229            4            364          0.95
d1s103            4            364          0.95
---------------------------------------------------

Option 5) Quantitative phenotype summary .
This creates a summary of phenotype values for selected quantitative loci present in the pedigree file. The user can create seperate file for each quantitative trait locus or a combined file for all loci. The output file is called pehnotyping_rate.##. Here is an excerpt form a typical output file:

---------------------
Mon Mar  8 15:04:59 2004
Input file names
locus file:    datain.06
pedigree file: pedin.06
map file:      map.06
omit file:     omit.06
Untyped pedigree option: Include all pedigrees whether typed or not
---------------------

Phenotype Summary for Q1
---------------------------------------
                        All                             Founders
Pedigree        Members Phenotyped       %Phenotyped    Total   Phenotyped      %
1               52              37              0.71    17      8               0.47
2               86              69              0.80    24      13              0.54
3               100             66              0.66    30      10              0.33
4               90              57              0.63    27      12              0.44
5               63              34              0.54    20      4               0.20
6               52              34              0.65    16      5               0.31
7               74              48              0.65    21      6               0.29
8               68              43              0.63    21      7               0.33
9               41              27              0.66    14      5               0.36
10              60              37              0.62    19      7               0.37

Detailed info: 14) Convert to SAGE-format

Suppose the chromosome number is 5. Then this option will generate the following files:

        Pedigree file:         sage_ped.05
        Locus file:            sage_loc.05
        FSP parameter file:    sage_par.05
        SIBPAL parameter file: sage_sibpal.05
        SIBPAL C-shell file:   sage.05.sh
        Genotype count file:   sage_cnt.05
        FCOR parameter file:   sage_cntpar.05
        FCOR C-shell file:     sage_cnt.05.sh


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).
Provided you have selected only one trait locus (affection status or quantitative), 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.
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 (before 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.
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.
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:
To run fsp,

cp sage_par.## fort.1
cp sage_ped.## fort.11
fsp


To then run fcor, create the appropriate ‘fcor.par’ parameter file and then:

cp fcor.par fort.1
cp sage_ped.## fort.11
cp fort.22 fort.12
fcor


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).



Detailed info: 15) Set up for TDTMax analyses

This option permits easy setup of files for the ‘tdtmax’ program from this paper:
Ann Hum Genet 1997 Jan;61( Pt 1):49-60
Randomization tests of disease-marker associations.
Morris AP, Curnow RN, Whittaker JC

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.
The shell scripts generated assume that you have the ‘convert’ and ‘tdtmax’ programs installed and in your path.
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.
It will also create a C-shell script with the default name “tdtmax#.sh”, where “#” is the chromosome number.
You also have to choose between these two analysis options.
1) all affected offspring in families
2) only one affected sib per family

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.).
You also need to enter the number of permutations desired. Obviously, one should use as many permutations as is computationally feasible.

Output from the ‘tdtmax#.sh’ C-shell script file:
The C-shell script file will, if all goes well, create (or append to) two output files:
a) tdtmax.lst - This file contains the complete output generated by the ‘tdtmax’ program.
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.


Detailed info: 16) Convert to SOLAR-format

Mega2 creates one set of files per chromosome in the SOLAR input format:
        Pedigree file:         solar_ped.06
        Allele frequency file: solar_freq.06
        Phenotype file:        solar_phen.06
        Genotype file:         solar_marker.06
        Map file:              solar_map.06   
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.


Detailed info: 17) Convert to Vitesse-format

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.
         Pedigree file       vpedin.M1
         Locus file          vdatain.M1
==========================================================
         Pedigree file       vpedin.M1
         Locus file          vdatain.M1
         Cshell file          vitesse.06.sh   

These files were created for a set of two markers and a trait.

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.
         Pedigree file       vpedin.56_3.06
         Locus file          vdatain.56_3.06
         Cshell file         vitesse.06.sh 
This set, for example, refers to an interval consisting of marker 5, and 6, and the trait placed to the right of 6th marker.
QTLs are allowed as well as affection status loci, and the trait has to occur at the beginning of the order.


Detailed info: 18) Convert to Linkage-format



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 :
        Pedigree file:        Lpedin.01
        Locus file:           Ldatain.01  

As might be eexpected, there are no restrictions on trait and marker selection and reordering. However, the recombination fractions at the bottom of the locus file corresponds to the input map file (not the original input locus file).


Detailed info: 19) Test loci for Hardy-Weinberg Equilibrium


This option permits one to test markers for Hardy-Weinberg equilibrium using either the "hwe" program by Guo and Thompson (1992) or the "Gen" program by Lazzeroni and Lange (1997). The user also has a choice of individuals selected estimation of allele and genotype frequencies:


Count options menu
 
Choose individuals to count
==========================================================
 
1) Count all genotyped founders, and from pedigrees without any
   genotyped founders, count a randomly chosen genotyped person.
2) Count all genotyped founders only
3) Count all genotyped individuals
Enter selection: 1, 2 or 3 > 

The "hwe" program has been incorporated into the Mega2 program by the authors' permission, however, the user has to obtain the "gen" program separately.
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:
HWE files:
    hwe_results.01
    hwe_table.01

GEN files:
    gen_results.01
    gen_table.01

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:

These results are produced by the HWE program by
Sun-Wei Guo and Elizabeth Thompson.  If you publish
any of these results,please cite:
 
Guo, S.-W., Thompson, E. T. (1992)
Performing the Exact Test of Hardy-Weinberg Proportion
for Multiple Alleles. Biometrics 48:361-372
---------------------
Mon Feb 12 14:27:44 2001
Input file names
locus file:    datain.01
pedigree file: pedin.01
map file:      map.01
Counted individuals consist of:
    Genotyped founders or a randomly chosen genotyped person from each pedigree
---------------------
 
 
Marker       Alleles   Expected      Observed       P-value    Std Error   #Genotypes
                       Homozygosity  Homozygosity
 
d1s228             4       0.3331       0.2472        0.5669      0.0050       89
d1s234             4       0.2842       0.1379        0.0025      0.0005       87
d1s255             4       0.3591       0.3297        0.7339      0.0045       91
d1s197             4       0.2977       0.1778        0.0672      0.0026       90
d1s209             4       0.3190       0.1667        0.0050      0.0007       90
d1s216             4       0.2729       0.1176        0.0354      0.0019       85
d1s207             4       0.2782       0.1075        0.0032      0.0005       93
d1s252             4       0.3098       0.1957        0.1082      0.0032       92
d1s196             4       0.3646       0.2921        0.0884      0.0031       89
d1s238             4       0.2862       0.1538        0.0540      0.0023       91
d1s229             4       0.3326       0.2967        0.0306      0.0018       91
d1s103             4       0.3358       0.2967        0.4654      0.0052       91      


Detailed info: 20) Convert to Allegro format



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:
        Command file       : al_in.01
        Locus file         : al_dat.01
        Pedigree file      : al_ped.01
        C-shell script     : al_script.01.sh 
The command file contains parameters that specify the Allegro input files and the analyses that must be performed on these files, e.g.:
PREFILE al_ped.01
DATFILE al_dat.01
MODEL mpt par het allegro_par_mpt.01
MODEL spt par het allegro_par_spt.01
MODEL mpt exp pairs equal allegro_exppairs_mpt.01
MODEL spt exp pairs equal allegro_exppairs_spt.01
MODEL mpt exp all equal allegro_expall_mpt.01
MODEL spt exp all equal allegro_expall_spt.01
MODEL mpt lin pairs equal allegro_linpairs_mpt.01
MODEL spt lin pairs equal allegro_linpairs_spt.01
MODEL mpt lin all equal allegro_linall_mpt.01
MODEL spt lin all equal allegro_linall_spt.01        
This is the standard file produced by Mega2.


Detailed info: 21) Convert to MLBQTL format

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:
 
        Command file       : mlb_in.06
        Locus file         : mlb_dat.06
        Pedigree file      : mlb_ped.06
        C-shell script     : mlb_script.06.sh


Detailed info: 22) Convert to S.A.G.E. 4.0 format

S.A.G.E 4.0 files created by Mega2:
        Pedigree file:         sage4_ped.06
        Locus file:            sage4_dat.06
        Parameter file:        sage4_par.06
        Map file:              sage4_map.06 

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:
genome, map=Haldane
{
  region=chr6
  {
    marker = D06G025
    theta = 0.04431213
    marker = D06G028
    theta = 0.0381648
    marker = D06G034
    theta = 0.01400026
    marker = D06G035
    theta = 0.05306726
    marker = D06G041
    theta = 0.02094853
    marker = D06G043
  }
}                     

The parameter file contains information about the pedigree file records. It should also contain an "analysis" 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.
The pedinfo program can by run on the Mega2-generated files straightaway, without any modifications.
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-autosomal data.

Detailed info: 23) Convert to pre-makeped format

Pre-makeped files created by Mega2:
        Pedigree file:         Ppedin.06
        Locus file:            Pdatain.06

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.

Detailed info: 24) Convert to Merlin-SimWalk2 format

Output files created by Mega2 for Merlin:
Note that the Merlin-format file have new names.
        Pedigree file:        sw2merlin_ped.06
        Locus file:           sw2merlin_data.06
        Map file:             sw2merlin_map.06
	Frequency file:       sw2merlin_freq.06
        Order file:           sw2merlin_order.06
        Perl script file:     sw2merlin2sw2.pl

Output files created by Mega2 for SimWalk2-NPL:
        Locus file:           LOCUS.06
        Pedigree file:        PEDIGREE.06
        Penetrance file:      PEN.06
        Simwalk2 batch file:  BATCH2.06
        C-Shell script:       npl.06.sh
In addition files are created which will generate R-graphics plots after the SimWalk2 analysis has been run. These are:
        Perl script file:     Rsimwalk2.pl
        R-script file:        Rsimwalk2.R
        Shell file to run R:  Rsimwalk2.sh
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 --minutes switch. Currently, this value is set to 1 minute 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.
At this point the Rsimwalk2.sh script should be invoked to generate postscript plots using R from the SimWalk2 output.

Detailed info: 25) Convert to PREST format

Output files created by Mega2 for PREST:
        Pedigree file : prest_ped.06
        Chrom file    : prest_chrom.06
        Shell file    : prest_script.06.sh
        Locus file    : prest_loc.06
        Genotype file : prest_geno.06
If there are multiple chromosomes, the following files are created::
        Pedigree file : prest_ped.all
        Chrom file    : prest_chrom.all
        Shell file    : prest_script.all.sh
        Locus file    : prest_loc.02
        Genotype file : prest_geno.02
==========================================================
        Locus file    : prest_loc.03
        Genotype file : prest_geno.03
==========================================================
        Locus file    : prest_loc.04
        Genotype file : prest_geno.04
==========================================================
        Locus file    : prest_loc.05
        Genotype file : prest_geno.05
==========================================================

The shell script prest_script.all.sh runs PREST over the marker data on the selected chromosomes to produce three output files:
prest_out1, prest_out2 and prest_out3
and writes errors (if any) into prest_error.

Detailed info: 26) Convert to PAP format

Output files created by Mega2 for PAP:
        Pedigree file :   trip.06
        Header file :     header.06
        Phenotype file :  phen.06
        Population file : popln.06
        C-shell file :    pap_script.06.sh
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.

Detailed info: 27) Convert to Merlin 0.9.x format

Output files created by Mega2 for Merlin:
        Pedigree file :   merlin_ped.06
        Locus file :      merlin_dat.06
	Map file:         merlin_map.06
	Frequency file:   merlin_freq.06
	C-shell script:   merlin.06.sh

Merlin also sets up the following files for creating LOD score curves:


        R-script file:        Rmerlin.01.R
        Shell file to run R:  Rmerlin.01.sh

Merlin outfile files are created separately for each chromosome except for the shell-script, which is created only once. This option also allows the user to choose which pedigree and person field to select. See the section on "using Ped, Per and ID identifiers in the pedigree file" .
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 welll. 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).

Detailed info: 28) Convert to Loki format

Output files created by Mega2 for Loki:

     Pedigree file:               Loki_ped.01
     Frequency file:              Loki_freq.01
     Map file:                    Loki_map.01
     Marker control file:         Loki_locus.01
     Link control file:           Loki_link.01
     Overall Control file:        Loki_control.01
     Overall Parameter file:      Loki_param.01
     C-shell script:              Loki.01.sh

If multiple chromosomes are selected, Loki sets up chromosome-specfic analyses as well as a combined analysis. In addition to the files above it will set up the following:


     Combined Control file for all chromosomes:   Loki_control.all
     Combined Parameter file for all chromosomes: Loki_param.all

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 "using Ped, Per and ID identifiers in the pedigree file" .

Detailed info: 29) Convert to Mendel 5 format

Output files created by Mega2 for Loki:

     Pedigree file:               mendel5_ped.01
     Map file:                    mendel5_map.01
     Locus file:                  mendel5_locus.01
     Control file:                mendel5_control.01
     Penetrance file:             mendel5_pen.01

This option also allows the user to choose which pedigree and person field to select. See the section on "using Ped, Per and ID identifiers in the pedigree file" .