Learn R Programming

isqg (version 1.4)

import: Constructor of a Custom Instances of the Specimen Class

Description

Constructor of instances of the Specimen class given the Specie from which the individual will belong where the loci will equal to the provided genotype from two strings one for each homologous.

Usage

import(specie, genotype)

Value

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

Arguments

specie

an instance of the R6 class Specie with the genome's parameters.

genotype

a named character vector with the coded/phased genotypes.

Examples

Run this code
data(ToyMap)
spc <- set_specie(ToyMap)

## simulating what is very close to your real genotypes
Real <- sample(c('2 2', '2 1', '1 2', '1 1'), size = nrow(ToyMap), replace = TRUE)
names(Real) <- ToyMap$snp # ensure snp names!

## now you can play _in silico_
Virtual <- import(spc, Real)
S1 <- Virtual$selfcross(n = 10)

Run the code above in your browser using DataLab