set_specie: Constructor of Instances of the Specie Class

set_specieR Documentation

Constructor of Instances of the Specie Class

Description

Constructor of instances of the Specie class given the map of the genome and optionally a pointer to a C++ function which will drive the meiosis process.

Usage

set_specie(data, meiosis = NULL)

Arguments

data

A data frame with the map of the Genome to be simulates.

meiosis

A pointer to a C++ function of the meiosis process.

Details

By standard the meiosis recombination and de novo genetic variability is generated by means a count-location process \insertCitekarlin1978isqg.

Value

Objects of R6 class with methods to mimic in silico Genomes.

References

\insertAllCited

Examples

data(ToyMap)
spc_standard <- set_specie(ToyMap)

## generate standard _de novo_ variability
spc_standard$gamete(n = 100)

## Not run: 
## write your function in C++ and then wrap it as a pointer
## check the examples in extdata
## compile the code
Rcpp::sourceCpp(file = system.file("extdata", "Independent.cpp", package = "isqg"),
                rebuild = TRUE)

## define a specie w/ custom meiosis
spp_custom <- set_specie(ToyMap, meiosis = indepp())

## check meiosis process
spp_custom$gamete(n = 100)

## End(Not run)


isqg documentation built on Oct. 18, 2022, 9:07 a.m.

Related to set_specie in isqg...