Heterozygous: Test heterozygosity at each locus

Description Usage Arguments Details Value Examples

View source: R/Heterozygous.R

Description

Test heterozygosity at each locus

Usage

1
Heterozygous(x,sep)

Arguments

x

a dataset of genotypes with rownames of sample ID and column names of markers.

sep

allele separator in the imported genotype data. Note: when using the special character like "|", remember to protect it as "\|"(default).

Details

This function test the heterozygosity of each individuals at each locus.Output a table and Usually followed by write.csv(as.data.frame(y),file = "~/*.csv") to export the results.

Value

a dataframe of heterozygosity.0 is homozygous;1 is heterozygous. Each row denotes each individual; Each column denotes each locus.

Examples

1
2
3
x <- data.frame(STR1=c("12|12","13|14","13|13","14|15"),
               SNP1=c("A|A","T|T","A|T","A|T"))
Heterozygous(x,"\\|")

mixIndependR documentation built on March 17, 2021, 5:09 p.m.