Description Usage Arguments Value Note See Also Examples
Generate a genotype resampling function.
1 | make_genotype_sampler(x, eag)
|
x |
A < |
eag |
An < |
A constructor function for <geno_table
> objects.
The next step is to inject errors in the sampled genotypes:
inject_errors
.
Other simulation.functions: inject_errors
,
map_genotype_frequencies
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
## Extract HLA-DPB1 genotype frequencies
dpb1 <- HLA("DPB1", "01/01/2014", "23/03/2015")
## Restrict the data to the German sample
dpb1.de <- dpb1[provenance == "DE"]
## Generate an EAG table
dpb1_eag1412 <- eag_table(gene = "DPB1", nextype_basis_id = "1412")
## Sample a distribution of DNA concentrations
concentration <- sample_dna_concentration(dpb1.de, n = 24000, ncores = 8)
## Generate a sampling function
sample_dpb1_de <- make_genotype_sampler(dpb1.de, dpb1_eag1412)
## Sample genotypes
n <- 10000
bin_size <- 3
rs <- sample_dpb1_de(concentration, n, bin_size)
rs
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.