create_trait | R Documentation |
Create a trait with a clear genetic architecture and a known minor allele frequency.
create_trait(
phenotype,
mafs = 0.25,
n_snps = 1,
calc_phenotype_function = calc_random_phenotype_values
)
phenotype |
one phenotype, named after its genetic background:
|
mafs |
one or more minor allele frequencies. These allele frequencies must be ordered decreasingly, i.e. the MAF is at the first position, where the even rarer alleles are at the second and third positions. Note that |
n_snps |
the number of SNPs, as can be checked by check_n_snps |
calc_phenotype_function |
a function that calculate the phenotypes
from genotypes. The input is the genetic data as a tibble,
in which each row is an individual and the columns are the SNVs.
The first two columns are named |
Prefer to use the specialized functions:
create_additive_trait
create_custom_trait
create_epistatic_trait
create_random_trait
create_random_case_control_trait
Richèl J.C. Bilderbeek
create_trait(phenotype = "random")
create_trait(phenotype = "random", maf = 0.01)
create_trait(phenotype = "random", n_snps = 2)
create_trait(
phenotype = "random",
calc_phenotype_function = calc_random_phenotype_values
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.