minfi (version 1.18.4)

getSex: Estimating sample sex based on methylation data

Description

Estimates samples sex based on methylation data.

Usage

getSex(object = NULL, cutoff = -2) addSex(object, sex = NULL) plotSex(object, id = NULL)

Arguments

object
An object of class [Genomic]MethylSet.
cutoff
What should the difference in log2 copynumber be between males and females.
sex
An optional character vector of sex (with values M and F.
id
Text used as plotting symbols in the plotSex function. Used for sample identification on the plot.

Value

For getSex, a DataFrame with columns predictedSex (a character with values M and F), xMed and yMed which are the chip-wide medians of measurements on the two sex chromosomes.For addSex, an object of the same type as object but with a column named predictedSex added to the pheno data.

Details

Estimation of sex is based on the median values of measurements on the X and Y chromosomes respectively. If yMed - xMed is less than cutoff we predict a female, otherwise male.

Examples

Run this code
if(require(minfiData)) {
  GMsetEx <- mapToGenome(MsetEx)
  estSex <- getSex(GMsetEx)
  GMsetEx <- addSex(GMsetEx, sex = estSex)
}

Run the code above in your browser using DataLab