massi_cluster {massiR} | R Documentation

## massi_cluster

### Description

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

### Usage

    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

    # 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]])

[Package massiR version 1.22.0 Index]