View source: R/allele_functions.R
| calc_allele_freq | R Documentation | 
Calculates the frequency of markers, QTL, or both.
calc_allele_freq(genome, pop, locus.type = c("qtl", "markers", "both"))
genome | 
 An object of class   | 
pop | 
 A population.  | 
locus.type | 
 The type of loci for which allele frequenices should be returned. Can be   | 
A list of frequencies of the 1 allele for the loci specified.
n.mar  <- c(505, 505, 505)
len <- c(120, 130, 140)
genome <- sim_genome(len, n.mar)
# Randomly generate 15 QTL with additive allelic effects following a
# genometric series
qtl.model <- matrix(nrow = 15, ncol = 4)
genome <- sim_gen_model(genome, qtl.model, add.dist = "geometric")
# Create a random population
pop <- sim_pop(genome = genome, n.ind = 200)
# Calculate QTL allele freqencies
calc_allele_freq(genome, pop, "qtl")
# For markers
calc_allele_freq(genome, pop, "markers")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.