Last data update: 2014.03.03

R: Wrapper function to the classification method
classifyR Documentation

Wrapper function to the classification method

Description

This function links the classification method to the procedures to find the seed genes and the signatures. If necessary this function can be rewritten in order to use a different classification method. Actually the classification method linked is the partitioning around medoids (see pam() function for details)

Usage

classify(ddata)

Arguments

ddata

can be either a list of real values (gene expression levels) or a data-matrix where the rows are the samples and the columns are the genes.

Details

The function provides two clusters.

Value

If ddata is a list of real values (1 gene expression levels) the function calls an unbiased version of pam (see pamUnbiased() function for details). In this case two elements are returned

clusters

list of 1-2 indicators of the two clusters.

missing

list of T-F logical values where T labels the values set to missing by pamUnbiased().

If ddata is a real matrix (more than 1 expression levels) the function calls pam() and returns an object of pam class with an additional slot

clusters

list of 1-2 indicators of the two clusters.

Author(s)

Stefano M. Pagnotta and Michele Ceccarelli

See Also

pam, pam.object.

Examples

# univariate classification
data(geNSCLC)
sum(is.na(geNSCLC[, "SELP"]))
ans <- classify(geNSCLC[, "SELP"]) 
table(ans$clusters)
sum(ans$missing)
mean(geNSCLC[which(ans$clusters == 1), "SELP"], na.rm = TRUE)
mean(geNSCLC[which(ans$clusters == 2), "SELP"], na.rm = TRUE)

# multivariate classification
data(geNSCLC)
ddata <- geNSCLC[, c("STX1A", "FADD", "STC1", "RNF5")]
ans <- classify(ddata)$clusters
table(ans)
rbind(apply(ddata[ans == 1, ], 2, mean, na.rm = TRUE),
      apply(ddata[ans == 2, ], 2, mean, na.rm = TRUE))

Results