This function organizes higher-level information for creating variants from matrices of segregating sites output from coalescent simulations.

vars_ssites(obj = NULL, fn = NULL)

Arguments

obj

Object containing segregating sites information. This can be one of the following: (1) A single list with a seg_sites field inside. This field must contain a matrix for segregating sites for each sequence. The matrix itself should contain the haplotype information, coded using 0s and 1s: 0s indicate the ancestral state and 1s indicate mutant. The matrix column names should indicate the positions of the polymorphisms on the chromosome. If positions are in the range (0,1), they're assumed to come from an infinite- sites model and are relative positions. If positions are integers in the range [0, sequence length - 1] or [1, sequence length], they're assumed to come from an finite-sites model and are absolute positions. Defaults to NULL.

fn

A single string specifying the name of the file containing the ms-style coalescent output with segregating site info. Defaults to NULL.

Value

A vars_ssites_info object containing information used in create_variants to create haploid variants. This class is just a wrapper around a list of matrices of segregating site info.

Details

For what the seg_sites field should look like in a list, see output from the scrm or coala package. (These packages are not required to be installed when installing jackalope.)