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

View source: R/RcppExports.R

rcpp_recombo_segregate_expoR Documentation

rcpp version of function that does recombination and segregation with exponential crossovers


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.


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



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


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


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


total chromoome length in base pairs


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


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 12, 2022, 9:18 a.m.