Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pgc

Preparing weight for GENECOUNTING


Description

This function is a R port of the GENECOUNTING/PREPARE program which takes an array of genotyep data and collapses individuals with the same multilocus genotype. This function can also be used to prepare for the genotype table in testing Hardy-Weinberg equilibrium.

Usage

pgc(data,handle.miss=1,is.genotype=0,with.id=0)

Arguments

data

the multilocus genotype data for a set of individuals

handle.miss

a flag to indicate if missing data is kept, 0 = no, 1 = yes

is.genotype

a flag to indicate if the data is already in the form of genotype identifiers

with.id

a flag to indicate if the unique multilocus genotype identifier is generated

Value

The returned value is a list containing:

cdata

the collapsed genotype data

wt

the frequency weight

obscom

the observed number of combinations or genotypes

idsave

optional, available only if with.id = 1

References

Zhao JH, Sham PC (2003). Generic number system and haplotype analysis. Comp Prog Meth Biomed 70:1-9

Note

Built on pgc.c

Author(s)

Jing Hua Zhao

See Also

Examples

## Not run: 
require(gap.datasets)
data(hla)
x <- hla[,3:8]

# do not handle missing data
y<-pgc(x,handle.miss=0,with.id=1)
hla.gc<-genecounting(y$cdata,y$wt,handle.miss=0)

# handle missing but with multilocus genotype identifier
pgc(x,handle.miss=1,with.id=1)

# handle missing data with no identifier
pgc(x,handle.miss=1,with.id=0)

## End(Not run)

gap

Genetic Analysis Package

v1.2.3-1
GPL (>= 2)
Authors
Jing Hua Zhao and colleagues with inputs from Kurt Hornik and Brian Ripley
Initial release
2021-4-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.