sex.predict: Determine the sex of each sample

View source: R/sex.predict.R

sex.predictR Documentation

Determine the sex of each sample

Description

This function uses the mean X and Y chromosome intensities to predict the sex of each sample. Linear discriminant analysis from the MASS package is used.

Usage

  sex.predict(x, y, snps, plot = FALSE)

Arguments

x

Numeric matrix, num.samples x num.snps, containing X intensities for all samples.

y

Numeric matrix, num.samples x num.snps, containing Y intensities for all samples.

snps

Data.frame containing SNP IDs, chromosomes, Mb and cM locations in columns 1 through 4, respectively.

plot

Boolean that will create a plot of mean X and Y Chr intensities if TRUE. Default = FALSEALSE.

Value

Character vector with sex assignments.

Author(s)

Daniel Gatti

Examples

  ## Not run: 
    data(snps)
    sex.predict(x, y, sex = rep(F, ncol(x)))
  
## End(Not run)

dmgatti/DOQTL documentation built on April 7, 2024, 10:35 p.m.