GenoCod_Gen: Transforms the genetic maker

Description Usage Arguments Details Value Note References Examples

Description

Function transforms the genetic marker to recessive, dominant or codominant mode.

Usage

1
GenoCod_Gen(data, MA, genotyp, Method, var.nam = NULL, na.rm = FALSE)

Arguments

data

Data frame of the database

MA

Minor allele name in the database

genotyp

Genotype name in the database

Method

The method to useMethod = c("recessive", "dominant", "codominant")

var.nam

Name of the new variable, by default the name is X2

na.rm

TRUE, the function conserves the missing data and FALSE, it suppresses the individuals, which have the missing data.

Details

Function that transforms the genetic marker according to the mode ("recessive", "dominant", "co-dominant") and assess the allele minor frequency under Hardy Weinberg equilibrium of the target population.

Value

Return a list containing

datR

Data frame with the new variable

MA.frq

Minor allele frequency

Note

We use the documentation of the site below to code the genetic markers in "Dominant", "Recessive" and "codominant" mode.

References

http://wims.unice.fr/wims/wims.cgi?module=U1/genetics/docpopulation.fr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Example : Genotype data

  set.seed(123000)
  snp1 <- c("aaAA","AA:aA","Aa/AA","aa/AA","aA/aa","Aa/Aa","AA/Aa","AA/Aa","AA/Aa",NA)
  snp2 <- c("Aa/aA","Aa/AA","AA/aa","AA/aA","AA/Aa","Aa,AA","AA/AA","AA/aA","Aa/aa","")
  datD<-NULL
  for(u in 1:10){
              SNP1<-sample(snp1)
              SNP2<-sample(snp2)
              var1 <- runif(length(snp1))
              pheno<- rbinom(length(snp1),c(0,1),prob=c(0.65,0.35))
              pheno[sample(1:length(snp1))[3]]<-NA
              id<-c(1:length(snp1))
              id.fam<-rep(u,length(snp1))
              tabGen1<-data.frame(id.fam,id,SNP1,SNP2,var1,pheno)
              datD<-rbind(datD,tabGen1)
              }
  # Result
    head(datD)
    
  # Example of the using GenoCod_Gen
  # 'a' is the minor allele, method "recessive" the new name is X2
   datT1<-GenoCod_Gen(datD,"a","SNP2",Method=c("recessive"),var.nam="X2")
   head(datT1$datR)

CroteauCRIUSMQ/EMQLS.test documentation built on May 6, 2019, 12:52 p.m.