MS: Coalescent simulation with or without selection

Description Usage Arguments Details Value Note References Examples

View source: R/MS.R

Description

This function uses Hudson's MS and Ewing's MSMS to compare simulated data with the observed data.

Usage

1
2
MS(GENO,niter=10,thetaID="user",params=FALSE,detail=FALSE,
neutrality=FALSE,linkage=FALSE,F_ST=FALSE,MSMS=FALSE,big.data=FALSE)

Arguments

GENO

an object of class "GENOME"

niter

number of samples per locus

thetaID

"Tajima","Watterson" or "user". default:"user"

neutrality

Calculate neutrality tests. default=FALSE

linkage

Calculate linkage disequilibrium. default=FALSE

F_ST

Calculate fixation index. default=FALSE

params

an object of class "test.params". see ?test.params

detail

detailed statistics. Note: slower computations! default=FALSE

MSMS

specify parameter for MSMS simulation with selection (has to be specified as a string)

big.data

if TRUE the ff-package is used

Details

You can choose different mutation rate estimators to generate simulation data. When thetaID="user", you have to define the theta values in an object of class "test.params". The "test.params" class can also be used to specify some additional parameter like migration and/or recombination rates... (?test.params).

Please read the MSMS documentation for the correct use of coalescent simulations to assess statistical significance.

Value

The function creates an object of class "cs.stats"

Note

The executable file ms has to be stored in the current workspace.
If you want to use the MSMS application, put the msms folder including the corresponding executable files in the current workspace.
Both programs can be obtained from their websites (see references).

References

Hudson, R. R. (2002). Generating samples under a Wright-Fisher neutral model of genetic variation. Bioinformatics 18: 337-338

Gregory Ewing and Joachim Hermisson, MSMS: A Coalescent Simulation Program Including Recombination, Demographic Structure, and Selection at a Single Locus. Bioinformatics 2010, doi: 10.1093/bioinformatics/btq322

Examples

1
2
3
4
5
6
7
8
# GENOME.class <- readData("...\Alignments")
# GENOME.class <- neutrality.stats(GENOME.class,list(1:6))
# MS.class <- MS(GENOME.class,thetaID="Tajima",neutrality=TRUE)
# MS.class <- MS(GENOME.class,thetaID="Tajima",neutrality=TRUE,
#                MSMS="-N 1000 -SAA 200 -SaA 100 -SF 1e-2")
# MS.class
# [email protected]
# [email protected][[1]] 

PopGenome documentation built on May 20, 2018, 5:03 p.m.