View source: R/format_conversion_functions.R
ms.to.DNAbin | R Documentation |
This function will take a ms-like output and convert it to DNAbin format.
ms.to.DNAbin(ms.output, bp.length)
ms.output |
A list of strings representing a ms output. |
bp.length |
The number of base pairs used to calculate theta for the ms simulation. |
a DNAbin object
This function is used internally by all the main functions used to simulate coexpantion models. One can read in an ms output with readLines().
Marcelo Gehara
# theta = 4Ne x mi x bp
Ne = 100000 # effective pop size
mi = 1e-8 # per base pair per generation mutation rate
bp = 1000 # number of base pairs
theta<-4*Ne*mi*bp
x<-ms(nsam=10, nrep=1, opts = paste("-t",theta))
y<-ms.to.DNAbin(x,bp=1000)
nuc.div(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.