Import: Constructor of a Custom Instances of the Specimen Class

importR Documentation

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)

Arguments

specie

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

genotype

a named character vector with the coded/phased genotypes.

Value

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

Examples

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)


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

Related to Import in isqg...