rcpp_recombo_segregate_expo: rcpp version of function that does recombination and...

Description Usage Arguments Value

View source: R/RcppExports.R

Description

In this version, we have to have a position for each locus (an integer less than 2^31) and then we have crossing over points exponentially distributed as a Poisson process. but that could be changed so that crossovers happen at a variable rate. Note that this is hard-wired for diploidy.

Usage

1
rcpp_recombo_segregate_expo(G, dims, pos, chromo_length, cross)

Arguments

G

the structure giving the genotypes of the indviduals. Actually a 3-D array indexed by indiv, locus, gene copy

dims

the dimensions of the 3-D array G for internal use.

pos

vector of positions of the loci. This is an integer vector. Has to be in sorted order (ascending)

chromo_length

total chromoome length in base pairs

cross

per base-pair rate of recombination. For example, 1 cM per megabase equates to 1e-08.

Value

The return value is a long vector that can be squished into a matrix as appropriate to put it into the genotype struct.


eriqande/glads documentation built on April 24, 2020, 11:53 a.m.