Skip to content
/ microsat Public

Microsat simulates the evolution of linked and unlinked microsatellites using the coalescent.

License

Notifications You must be signed in to change notification settings

mpcox/microsat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

microsat

Simulates the evolution of linked and unlinked microsatellites using the coalescent

microsat reads coalescent genealogies generated by Richard Hudson's ms, and translates them into short tandem repeat (STR, or microsatellite) datasets using the single step mutation model (SMM). microsat can accommodate arbitrarily complex demographies, and generates either unlinked autosomal microsatellite datasets (for a single STR locus), or fully linked microsatellite datasets (for multiple STR loci located in a genomic region without recombination, such as the non-recombining portion of the human Y chromosome). Note that partially linked STRs cannot be modeled with this software. microsat extends an algorithm initially developed by Richard Hudson, with his permission. The original code can be found here.

Compilation:

gcc -o microsat microsat.c rand1.c -lm

Usage:

microsat [-a anc_state] [-l n_linked_sites theta_prop1 ... theta_prop_n] [-i]

Options:

The -a flag sets the ancestral STR repeat size (i.e., an integer such as 15). The default ancestral state is 0.

The -l flag turns on multiple fully-linked STRs. The default is a single STR locus. The user can define an arbitrary number of linked STRs ('n_linked_sites'), but must specify the proportion of θ assignable to each STR locus. The simulation θ value (used by ms) should be the sum of individual θ values for each locus.

The -i flag outputs a format suitable, with slight modification, for use with Jody Hey's IM. The default output is a tab-delimited array of microsatellites written to a single line.

Validation:

For constant sized populations, the mean expected variance of a microsatellite STR locus is half theta; E(V) = θ/2.

Example:

ms 10 5 -t 4.0 | microsat -a 30 -l 2 0.4 0.6 > msat.dat

About

Microsat simulates the evolution of linked and unlinked microsatellites using the coalescent.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages