estimate_time_phased: estimates the time since admixture, given unphased ancestry...

Description Usage Arguments

View source: R/estimate_time_phased.R

Description

Calculates the time since admixture, given unphased ancestry data.

Usage

1
2
3
estimate_time_phased(local_anc_matrix, locations, pop_size,
  freq_ancestor_1, lower_lim = 2, upper_lim = 1000,
  optim_pop_size = FALSE, verbose = FALSE)

Arguments

local_anc_matrix

Local_anc can be provided as either matrix with two columns, where the first column represents ancestry on chromosome 1, and the second column represents ancestry on chromosome 2. Ancestry labels used should be [0, 1], where 0 indicates the first ancestor, and 1 indicates the second ancestor. Alternatively, the user can provide a vector using labels indicating whether at the specific marker, the focal individual is homozygous for the first ancestor (label = 1), homozygous for the second ancestor (label = 2), heterozygous [0,1] (label = 3) or heterozygous [1, 0] (label = 4).

locations

locations of the used markers (in Morgan)

pop_size

population size

freq_ancestor_1

Frequency of ancestor 1 at t = 0

lower_lim

lower limit of the optimization algorithm. Increase if the expected admixture time is relatively ancient

upper_lim

upper limit of hte optimization algorithm. If set too large, recent admixture events can be overlooked - best to set as low as possible.

optim_pop_size

If TRUE, population size is also optimized. Starting point of the optimizaton will then be on the given population size, and half the maximum time.

verbose

display intermediate output? Default = FALSE


thijsjanzen/junctions documentation built on Sept. 12, 2019, 5:47 p.m.