Last data update: 2014.03.03

R: Genomic Sex
set.genomic.sexR Documentation

Genomic Sex

Description

Returns an updated bed.matrix with a new variable for the genomic sex of each individual.

Usage

 set.genomic.sex(x, chr.x = 23, chr.y = 24, plot = FALSE, 
           verbose = getOption("gaston.verbose",TRUE)) 

Arguments

x

A bed.matrix

chr.x

Id of the X chromosome (defaut value according to PLINK convention)

chr.y

Id of the Y chromosome (defaut value according to PLINK convention)

plot

If TRUE, plots the variables used for the clustering

verbose

If TRUE, displays information on the function actions

Details

For each individual, the function uses the hetorozygosity rate for SNPs on X chromosome, and the call rate for SNPs on the Y chromsomes, to cluster the individuals using kmeans.

If plot = TRUE, a plot is produced with the two variables used and the clusters determined by kmeans.

Value

A bed.matrix similar to x, with a new variable x@ped$genomic.sex containing the genomic sex for each individual.

Author(s)

Herv<c3><83><c2><a9> Perdry

See Also

set.stats, set.hwe

Results