getSex: Estimating sample sex based on methylation data

Description Usage Arguments Details Value Author(s) Examples

View source: R/getSex.R

Description

Estimates samples sex based on methylation data.

Usage

1
2
3
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.

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.

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 the output of getSex(object) added to the pheno data.

For plotSex, a plot of xMed vs. yMed, which are the chip-wide medians of measurements on the two sex chromosomes, coloured by predictedSex.

Author(s)

Rafael A. Irizarry, Kasper D. Hansen, Peter F. Hickey

Examples

1
2
3
4
5
if(require(minfiData)) {
  GMsetEx <- mapToGenome(MsetEx)
  estSex <- getSex(GMsetEx)
  GMsetEx <- addSex(GMsetEx, sex = estSex)
}

minfi documentation built on Nov. 8, 2020, 4:53 p.m.