Learn R Programming

gaston (version 1.4.9)

set.genomic.sex: Genomic Sex

Description

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

Usage

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

Arguments

plot
If TRUE, plots the variables used for the clustering
verbose
If TRUE, displays information on the function actions

Value

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

Details

For each individual, the function uses the hetorozygosity rate for SNPs on X chromosome, and the call rate for SNPs on the Y chromosomes (both statistics computed by set.stats), to cluster the individuals using kmeans.

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

See Also

set.stats