User Tools

Site Tools


im

IM

im.jpg

IM
documentation


updated 17.12.2009
IM is a program for the fitting of an isolation model with migration to haplotype data drawn from two closely related species or populations. Large numbers of loci can be studied simultaneously, and different mutation models can be used. IM estimates the divergence time and the migrations having occurred in the ancestry of two populations, which might have grown exponentially since split. Important limitations of the basic model are that it cannot account for changes in population sizes, and it cannot account for the sizes of founding populations
IMa also allows log likelihood ratio tests of nested demographic models. IMa is faster and better than IM (i.e. by virtue of providing access to the joint posterior density function), and it can be used for most (but not all) of the situations and options that IM can be used for

Program information

  • written in C++
  • unix/linux
  • dos/windows
  • Mac

Data type handled

  • DNA
  • Microsatellites (STR)

Input Files

contains the data for all loci to be considered

  • line 1 - arbitrary text, usually explaining the content of the file
    • After line 1, but before line 2, comments can be included to provide explanatory information. Each line of comment must begin with a ‘#’
  • line 2 - two population names, for populations 1 and 2 respectively, separated by one or more spaces
  • line 3 - the number of loci in the data set (integer)
  • line 4 - basic information for locus 1. This line contains at least five items separated by one or more spaces
    1. Locus name (no spaces within the name)
    2. n1, the sample size for population 1
    3. n2, the sample size for population 2
    4. the length of the sequence
    5. Letter indicating the mutation model (I: IS, H: HKY, S: SSM, J: joint SSM and IS = HapSTR). If this letter is not included on this line, the default is IS. If SSM (S) or HapSTR (J), the letter is followed immediately (no spaces) by the number of linked STR markers within the locus.
    6. Inheritance scalar (e.g.: 1 for autosome, 0.75 for X-linked, 0.25 for Y-linked or mtDNA)
    7. The mutation rate per year for the locus (not per base pair). This can be left blank, but is needed for estimating parameters on demographic scales. If there are multiple STRs in the locus then there can be multiple mutation rates on this line separated by spaces. If the locus is a HapSTR, then the first mutation rate given applies to the sequence portion of the locus with subsequent values corresponding to STR markers included in the locus.
    8. If the mutation rate is given, it can be followed by a range of mutation rates that can be used (with ranges for other loci in the analysis) to set priors on the ratios of mutation rate scalars. The range is entered with an open parentheses, the lowest value, a comma, the highest value, and a closed parentheses (e.g. ‘(0.00001, 0.00004)’. The range must bracket the rate. For a locus with multiple mutation rates, and multiple ranges, each range follows its corresponding mutation rate immediately on line.
  • line 5 - data for gene copy # 1 from population 1. The first 10 spaces are devoted to the sample name. The sequence or allele length (for SSM model) begins in column 11 of the file. The sequence for a given sample is given all on one line without gaps. For SSM or HapSTR data, the allele length assumes a step size of 1. This means that data from STRs that are multiples of lengths greater than 1 must be converted to counts of the number of base repeats (e.g. for a dinucloitide ‘CACACACACACA’ the length would be 6). If the data is for an SSM model locus and there are multiple STRs, then there will be one integer on each line for each STR, separated by a space. If the locus is HapSTR (joint IS and SSM) then the STR data is given on the line, beginning at column 11, followed by the sequence data. For SSM data, as for other types of data, only one gene copy is represented on each line of the data file. Diploid genotype data must be broken up and listed, with one data line for each gene copy.
  • lines 6 thru line (n1+n2 +4) - the remainder of the data for locus 1. Each line contains the data for one sample. The data for population 1 samples are given in lines 5 thru line (n1 + 4). The data for population 2 begins on line (n1+5) and proceeds to line (n1+n2+4)
  • Additional lines for additional loci - If there is more than one locus, then the data for locus 2 begins on line (n1+n2+5) with a line similar to line 4 presenting the basic information for locus 2. The sample names and sample sizes for locus 2 and the inheritance scalars and mutation model for locus 2 need not be the same as for locus 1
  • last line - should end with a newline so that the file ends on a blank line

example:

example for a tiny three locus data set. The mutation rate per year is known and specified for locus 1, but not for loci 2 and 3

Example data for IM
# im test data
population1 population2
3
locus1 1 1 13 I 1 0.0000000008 (0.0000000001, 0.0000000015)
pop1_1    ACTACTGTCATGA
pop2_1    AGTACTATCACGA
hapstrexample 2 1 4 J2 0.75
pop1_1    13 34 GTAC
pop1_2    12 35 GTAT
pop2_1    12 37 GTAT
strexample 2 2 1 S1 1 0.00001 (0.000001, 0.00005)
strpop11a 23
strpop11b 26
strpop21a 25
strpop21b 31

How to cite

  • Nielsen R. and Wakeley J. (2001). Distinguishing migration from isolation: a Markov chain Monte Carlo approach. Genetics, 158(2):885-96.
  • Hey J. and Nielsen R. (2007). Integration within the Felsenstein equation for improved Markov chain Monte Carlo methods in population genetics. Proc Natl Acad Sci USA, 104(8):2785-90.
im.txt · Last modified: 2011/07/14 14:26 by heidi