get.freq: Calculate the gene(allele) frequency

Description Usage Arguments Value Author(s) Examples

Description

Calculate the gene(allele) frequency for each of the SNPs.

Usage

1
get.freq(geno, epi.pars, ...)

Arguments

geno

a dataframe of genotype data: columns are the SNPs; lines are indviduals.

epi.pars

a data.frame or a matrix containing the parameter information for epistatic effect: additive * additive, additive * dominance, dominance * additive, and dominance * dominance.

...

not used

Value

a dataframe with allele frequencies (major and minor).

Author(s)

Beibei Jiang beibei_jiang@psych.mpg.de

Examples

1
2
3
4
5
6
7
# genotype file: rows are individuals and columns are SNPs
fgeno.path <- system.file("extdata", "10SNP.txt", package="SimPhe")

# get genotype
geno <- read.geno(fgeno.path, ftype = "snp.head")

get.freq(geno, epistasis.pars)

Example output

    SNP major.frequency minor.frequency
1 SNP01           0.655           0.345
2 SNP03           0.700           0.300
3 SNP05           0.650           0.350
4 SNP02           0.735           0.265
5 SNP04           0.670           0.330
6 SNP06           0.735           0.265

SimPhe documentation built on May 1, 2019, 9:10 p.m.