geno_table: Class: geno_table

Description Usage Details Value Examples

Description

Constructor function for a <geno_table> object. Created by the factory function make_genotype_sampler.

Usage

1
geno_table(conc, n, bin_size)

Details

A function that takes a vector of DNA concentrations to draw n random genotypes based on observed genotype frequencies and randomly attributes DNA concentrations to these genotypes.

Value

A <geno_table> object with the slots:

and the attributes:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Not run: 
data(dpb1)
dpb1.pl <- dpb1[provenance == "PL"]

## Generate a distribution of DNA concentrations
conc <- sample_dna_concentration(dpb1.pl, n = 1000, ncores = 8)

## Generate a sampling function
data(dpb1_eag1412)
geno_table <- make_genotype_sampler(dpb1.pl, dpb1_eag1412)

## Access mapping and remapping functions as well as genotype frequencies
mapper(geno_table)
remapper(geno_table)
gtf_table(genotable)

## Sample genotypes
n <- 10000
bin_size <- 3
ans <- geno_table(conc, n, bin_size)
ans

summary(ans)
samples(ans)

## End(Not run)

DKMS-LSL/HLAsim documentation built on May 6, 2019, 1:17 p.m.