massi_cluster: massi_cluster

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/massi_cluster.R

Description

The massi_cluster function predicts the sex of samples using k-medoids clustering.

Usage

1
massi_cluster(y_data)

Arguments

y_data

the y_data object is the data.frame returned from the massi_select function. This is a data.frame with sample names as column names and probe id's as row.names.

Details

This function clusters samples into two clusters using y chromosome probe values. K-medoids clustering is performed using the partitioning around medoids (pam) method implimented in the "fpc" package. The cluster with the highest probe values is determined to be the cluster of male samples and the cluster the lowest values as female samples.

Value

cluster data

Contains all of the results from the k-medoids clustering.

massi.results

Contains the results for each sample, including sample id, predicted sex, sample z-score and mean probe expression.

Author(s)

Sam Buckberry

References

Christian Hennig (2013). fpc: Flexible procedures for clustering. R package version 2.1-6. http://CRAN.R-project.org/package=fpc

See Also

massi_y, massi_select, massi_y_plot, massi_dip, massi_cluster_plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# load the test dataset
data(massi.test.dataset, massi.test.probes)

# select the y chromosome probes using massi_select
massi_select_out <- 
massi_select(massi.test.dataset, massi.test.probes)

# cluster samples to predict sex using massi_cluster
massi_cluster_out <- 
massi_cluster(massi_select_out)

# get the results in a data.frame format
data.frame(massi_cluster_out[[2]])

massiR documentation built on Nov. 8, 2020, 7:30 p.m.