View source: R/bm_genomic_sex.r
set.genomic.sex | R Documentation |
Returns an updated bed.matrix
with a new variable for the genomic sex
of each individual.
set.genomic.sex(x, plot = FALSE, verbose = getOption("gaston.verbose",TRUE))
x |
A |
plot |
If |
verbose |
If |
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
.
A bed.matrix
similar to x
, with a new variable x@ped$genomic.sex
containing the genomic sex for each individual.
Hervé Perdry
set.stats
, set.hwe
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.