Using Relatedness 4.2

Table of Contents

The Relatedness Program
Using Relatedness 4.2


The program allows the user to define two sets of individuals for relatedness calculations, called the "Px Set" and the "Py Set" (after the variables in the basic relatedness equation). The Px Set is the set of individuals the program will sum over, and the Py Set defines the "partners" of the current X individual. There is actually a different Py Set for each individual in the Px Set, but a consistent definition is used for each R value calculated.

For example, if you wanted to calculate the relatedness of queens to workers, the Px Set would be the queens. The Py Set for each queen would be the workers on her nest. This would be a different set for each queen (except for any that were on the same nest). However the user would not need to define the Py Set separately for each queen; the Py Set would just be "workers."


Relatedness 4.2allows up to five demographic variables in a data set, to be used in specifying the Px and Py Sets.
The group variable is mandatory-- all data sets must include it. The most basic definition for the Px and Py sets in the program is for the Px Set to be everybody and the Py Set to be everyone in the same group as the current X. This part of the Py Set definition is always in effect-- a Py Set never includes individuals from a different group than the current X individual. The reason for this is that the program performs a statistical correction to the population allele frequencies (P* in the relatedness equation) which requires that Px and Py come from the same group.

The sex variable is optional. If included in a data set, it is only allowed two values: m or f. Any individual with some other value of this variable will be discarded by the program when the data set is loaded. The program supplies some predefined options for use of the sex variable, allowing the user to easily specify a calculation using males only, or females only.

Subgroup variables
A data set can include up to three user-defined subgroup variables. These variables can have any values you want to use in specifying Px and Py sets. For example, "age" could be a subgroup variable, with each individual having a numerical value for its age, or divided into categories such as "young" or "old."
Subgroup values can contain either numeric or alphabetic data, and can be continuous or divided into categories. Because the program does not know what sort of data a user will include as a subgroup variable, it cannot provide fixed options as it does with the sex variable. Instead, the program defines a set of operators (discussed below) to allow the user to specify how the subgroup variable will be used in defining the Px and Py Sets.
Besides these demographic variables, a data set may optionally include a variable called deme. This variable is used when the population in a data set comes from several different, genetically distinct sub-populations. In such a case, the program calculates P*, the background allele frequencies, separately for each deme. If deme is used, all individuals in the same group must belong to the same deme (i.e. groups cannot be divided between demes), and because of the statistical correction to P* each deme must contain at least 2 groups. Usually, you will not need to use the deme variable.

enetic data

Relatedness 4.2codes alleles at each locus with lowercase letters of the alphabet. An individual's genotype is thus represented by a two-character string.

In scoring autorads, alleles are generally identified by their length. A locus thus might have alleles 109, 112 and 118 (for example) and an individual's genotype would be written 109/112. To enter this data into a relatedness data set, you name the alleles with lowercase letters. So 109 becomes a, 112 becomes b, and 118 becomes c. The genotype of the example individual above is then written ab.

The letter x is reserved to indicate missing information, so if you lack a genotype for an individual at some locus, you would enter xx for that individual at that locus. In converting allele names to characters, you should go alphabetically. If the program finds, for example, an allele f in the population, it will allocate memory for allele frequencies for alleles a - e even if f is the first allele present.

ata file structure

This is a sample data set as displayed by Microsoft Excel. Relatedness 4.2 reads tab-formatted text files with each line representing a single individual and each column a specific variable. (Once in memory, a data set can be saved in a more compact format usable only by Relatedness 4.2 itself, but the user cannot edit these files and the data must come first from a text file.)

The easiest way to create a text data file for the program is with a spreadsheet application such as Excel. You can also create readable files with any word processor, if you are careful to keep track of the number of tabs (used to separate columns). A data file can contain comment lines, indicated by a leading asterisk, in addition to the actual data. The first non-comment line in the file must contain the variable names for each column, and subsequent lines carry the information for each individual. Variables can be in any order or in any column; the only restriction is that all loci be in one set of consecutive columns.

To load a text file, you start by choosing Configure from the File menu in the Relatedness application. This gives you a dialog which has check boxes to identify what variables your data file includes, and what column each variable is in. The program remembers the last-used settings in this box, so if you have data files in a standard format you will not need to specify the settings every time. Once you have set the configuration, choose Open text in the File menu to read the file.

pecifying the Px and Py Sets

In the programs Calculate menu are commands for defining the Px and Py Sets. These commands bring up dialog boxes which allow you to specify how each variable is to be used in choosing individuals for the sets. The Px dialog is shown below:

There are sets of operators for each subgroup variable, and boolean AND and OR operators to combine the different subgroup tests into a single true/false value.The user chooses an operator from the row of radio buttons, and enters a value or list of values in the box just beneath the row to define what values will be compared to. The result is a boolean true/false value which indicates whether the individual being tested meets the definition or not. The checkboxes on the left indicate whether the subgroup variable is active or not; if unchecked, then that variable will not be used in any tests.

For example, if you want the Px set to be "all individuals older than 3 days", you would (for the subgroup variable "age") pick the operator ">" and enter 3 into the text box.

The dialog box for the Py Set is similar to the Px dialog, but has some extra operators allowing the user to specify tests such as "values equal to the value of the current X individual."

The Relatedness 4.2 Manual describes all of the operators in detail. Refer to it for further information.

tarting calculations

Once you have specified the Px and Py Sets, choose Calculate from the Calculate menu. You will see the following dialog:

This dialog allows you to select options for the calculation. On the left are the available statistics, which include relatedness, some F-statistics for measuring inbreeding, and a statistical test of difference between two different relatedness values. On the right are options concerning the calculation: the program can calculate an average value for the whole population, or values separate for each group and/or each locus. The program can also calculate "Jackknife" statistics. These are standard error estimates for the selected statistics. See the manual for more information about these options.

Once you've picked your options, click Okay and the program will go to work on the calculations. When it's done it will put up a window with a full report on its results. These results can either be saved to disk or printed, as well as read from within the program.

[Home Page] [Introduction] [Assignment] [Behavior]

[Head Size] [Ovaries] [DNA Microsatellites] [Relatedness]