ms.to.DNAbin: Converts ms output to DNAbin file

View source: R/format_conversion_functions.R

ms.to.DNAbinR Documentation

Converts ms output to DNAbin file

Description

This function will take a ms-like output and convert it to DNAbin format.

Usage

ms.to.DNAbin(ms.output, bp.length)

Arguments

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.

Value

a DNAbin object

Note

This function is used internally by all the main functions used to simulate coexpantion models. One can read in an ms output with readLines().

Author(s)

Marcelo Gehara

Examples

# 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)

gehara/PipeMaster documentation built on Feb. 4, 2024, 8:11 a.m.