create_additive_trait: Create a trait in which the phenotype is additive and the...

View source: R/create_additive_trait.R

create_additive_traitR Documentation

Create a trait in which the phenotype is additive and the minor allele frequency is known.

Description

Create a trait in which the phenotype is additive and the minor allele frequency is known. The phenotype is fully and perfectly determined by the genotype, see calc_additive_phenotype_values for the exact phenotypic values

Usage

create_additive_trait(
  mafs = 0.25,
  n_snps = 1,
  base_phenotype_value = 10,
  phenotype_increase = 0.5
)

Arguments

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 PLINK cannot handle triallelic nor quadallelic SNPs: PLINK will give a warning that it is setting the rarest alleles to missing.

n_snps

the number of SNPs, as can be checked by check_n_snps

base_phenotype_value

the base phenotypic value for an additive trait, i.e. the phenotypic value for homozygotes of the common allele

phenotype_increase

the phenotypic value increase per rare allele, for an additive trait.

Author(s)

Richèl J.C. Bilderbeek

Examples

create_additive_trait()
create_additive_trait(mafs = 0.01)
create_additive_trait(n_snps = 2)
create_additive_trait(base_phenotype_value = 3.14)
create_additive_trait(phenotype_increase = 2.71)

richelbilderbeek/plinkr documentation built on March 25, 2024, 3:18 p.m.