Learn R Programming

mixIndependR (version 0.3.0)

Heterozygous: Test heterozygosity at each locus

Description

Test heterozygosity at each locus

Usage

Heterozygous(x)

Arguments

x

a dataset of alleles. Each row denotes each individual.One allele in one cell.In the (2r-1)th column, there is the same locus with the 2r-th column; noted: no column for ID, make row.names=1 when importing.

Value

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

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.

Examples

Run this code
# NOT RUN {
x <- data.frame(STR1=c(12,13,13,14,15,13,14,12,14,15),
               STR1_1=c(12,14,13,15,13,14,13,12,14,15),
               SNP1=c("A","T","A","A","T","A","A","T","T","A"),
               SNP1_1=c("A","T","T","T","A","T","A","A","T","T"))
Heterozygous(x)

# }

Run the code above in your browser using DataLab