predictSex: Sex Prediction of samples assayed on the Illumina Infinium...

Description Usage Arguments Details Value Author(s)

View source: R/predictSex.R

Description

Predicts the sex of samples

Usage

1
predictSex(x, x.probes, pc = 2, plot=TRUE, irlba=TRUE, center=FALSE, scale. = FALSE)

Arguments

x

A matrix containing values equivalent to betas. Can be the full set of CpG features or pre-filtered for X-chromosomes.

x.probes

Default NULL, assuming that x is a beta matrix consisting of only X-chromosome probes, otherwise supply with vector containing logical or numeric index of probes on the X-chromosome.

pc

The principal component to guess sex across (usually the 2nd one in most cases)

plot

Logical, indicated whether or not to plot the prediction

irlba

Logical, indicate whether or not to use the faster method to generate principal components

center

Logical, indicate whether or not to center data around 0

scale.

Logical, indicate whether or not to scale data prior to prcomp

Details

Function attempts to predictSex based on the colMeans of the X chromsome and princpal components. Assumes that there are two sexes to predict and as a result will perform poorly on data-sets consisting of a single sex.

Value

Character Vector of predicted sex for each sample, samples that were not guess are assigned 'Unknown'

Author(s)

Tyler J. Gorrie-Stone Who to contact: <[email protected]>


schalkwyk/wateRmelon documentation built on Oct. 27, 2018, 3:26 a.m.