calc_additive_phenotype_values: Calculate the phenotypic values for a trait that is perfectly...

View source: R/calc_additive_phenotype_values.R

calc_additive_phenotype_valuesR Documentation

Calculate the phenotypic values for a trait that is perfectly additive.

Description

Calculate the phenotypic values for a trait that is perfectly additive. A phenotypic value starts at base_phenotype_value. An adenine does not change that value. Another other nucleotide, however, increase that value by phenotype_increase. As the organism is diploid, the maximum phenotypic value is base_phenotype_value + (2 * phenotype_increase).

Usage

calc_additive_phenotype_values(
  snvs,
  base_phenotype_value = 10,
  phenotype_increase = 0.5
)

Arguments

snvs

a tibble that contains the two nucleotide calls for multiple individuals. Each column is a haplotype, hence, for a diploid organism, there are two columns. Each individual is represented by a row. Nucleotides are in uppercase. Per SNV table, there can be only two different nucleotides, as this is how a SNP works; a SNP from A to C is a different one (and has a different SNP ID) than a SNP that encodes a mutation for A to G. Use create_snvs to create a snvs.

base_phenotype_value

the lowest phenotypic value possible

phenotype_increase

the increase of the phenotypic value per non-adenine

Note

the reason a phenotypic value starts at 10.0, instead of 0.0, is due to PLINK: if phenotypic values are all only zeroes and ones (and twos), PLINK will interpret these as case-control codes. There is no way to force PLINK to do a quantitative trait analysis on zeroes and ones.

As a workaround, phenotypic traits start from ten.

Author(s)

Richèl J.C. Bilderbeek


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