clustering: clustering

clusteringR Documentation

clustering

Description

Hierarchical clustering of both samples and variables

Usage

clustering(
  x,
  dissym.c = c("euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski",
    "1-cor", "1-abs(cor)")[7],
  correl.c = c("pearson", "kendall", "spearman")[1],
  agglo.c = c("ward.D", "ward.D2", "single", "complete", "average", "mcquitty",
    "median", "centroid")[2],
  clusters.vi = c(2, 2),
  cex.vn = c(1, 1),
  palette.c = c("blueOrangeRed", "redBlackGreen")[1],
  scale_plot.l = TRUE,
  title.c = NA,
  figure.c = c("none", "interactive", "myfile.pdf")[2],
  report.c = c("none", "interactive", "myfile.txt")[2]
)

## S4 method for signature 'MultiAssayExperiment'
clustering(
  x,
  dissym.c = c("euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski",
    "1-cor", "1-abs(cor)")[7],
  correl.c = c("pearson", "kendall", "spearman")[1],
  agglo.c = c("ward.D", "ward.D2", "single", "complete", "average", "mcquitty",
    "median", "centroid")[2],
  clusters.vi = c(2, 2),
  cex.vn = c(1, 1),
  palette.c = c("blueOrangeRed", "redBlackGreen")[1],
  scale_plot.l = TRUE,
  title.c = NA,
  figure.c = c("none", "interactive", "myfile.pdf")[2],
  report.c = c("none", "interactive", "myfile.txt")[2]
)

## S4 method for signature 'SummarizedExperiment'
clustering(
  x,
  dissym.c = c("euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski",
    "1-cor", "1-abs(cor)")[7],
  correl.c = c("pearson", "kendall", "spearman")[1],
  agglo.c = c("ward.D", "ward.D2", "single", "complete", "average", "mcquitty",
    "median", "centroid")[2],
  clusters.vi = c(2, 2),
  cex.vn = c(1, 1),
  palette.c = c("blueOrangeRed", "redBlackGreen")[1],
  scale_plot.l = TRUE,
  title.c = NA,
  figure.c = c("none", "interactive", "myfile.pdf")[2],
  report.c = c("none", "interactive", "myfile.txt")[2]
)

## S4 method for signature 'MultiDataSet'
clustering(
  x,
  dissym.c = c("euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski",
    "1-cor", "1-abs(cor)")[7],
  correl.c = c("pearson", "kendall", "spearman")[1],
  agglo.c = c("ward.D", "ward.D2", "single", "complete", "average", "mcquitty",
    "median", "centroid")[2],
  clusters.vi = c(2, 2),
  cex.vn = c(1, 1),
  palette.c = c("blueOrangeRed", "redBlackGreen")[1],
  scale_plot.l = TRUE,
  title.c = NA,
  figure.c = c("none", "interactive", "myfile.pdf")[2],
  report.c = c("none", "interactive", "myfile.txt")[2]
)

## S4 method for signature 'ExpressionSet'
clustering(
  x,
  dissym.c = c("euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski",
    "1-cor", "1-abs(cor)")[7],
  correl.c = c("pearson", "kendall", "spearman")[1],
  agglo.c = c("ward.D", "ward.D2", "single", "complete", "average", "mcquitty",
    "median", "centroid")[2],
  clusters.vi = c(2, 2),
  cex.vn = c(1, 1),
  palette.c = c("blueOrangeRed", "redBlackGreen")[1],
  scale_plot.l = TRUE,
  title.c = NA,
  figure.c = c("none", "interactive", "myfile.pdf")[2],
  report.c = c("none", "interactive", "myfile.txt")[2]
)

Arguments

x

An S4 object of class SummarizedExperiment or MultiAssayExperiment

dissym.c

character: [hclust]

correl.c

character: correlation coefficient (in case '1-cor' or '1-abs(cor)' are selected as dissymilarity)

agglo.c

character: agglomeration method

clusters.vi

tupple of integers: number of sample and variable clusters, respectively

cex.vn

tupple of numerics [Plot parameter]; size of the sample and variable labels

palette.c

character [Plot parameter]: color palette

scale_plot.l

logical [Plot parameter]: scaling (mean-centering and unit variance scaling) to enhance contrast (for plotting only)

title.c

character [Plot parameter]: Graphic the subtitle

figure.c

character: File name with '.pdf' extension for the figure; if 'interactive' (default), figures will be displayed interactively; if 'none', no figure will be generated

report.c

character: File name with '.txt' extension for the printed results (call to sink()'); if 'interactive' (default), messages will be printed on the screen; if 'none', no verbose will be generated

Value

SummarizedExperiment or MultiAssayExperiment including columns indicating the clusters in rowData and colData if 'clusters.vi' has been specified

Examples

sacurine.se <- reading(system.file("extdata/W4M00001_Sacurine-statistics", package = "phenomis"))
sacurine.se <- correcting(sacurine.se)
sacurine.se <- sacurine.se[, pData(sacurine.se)[, "sampleType"] != "pool"]
sacurine.se <- transforming(sacurine.se)
sacurine.se <- sacurine.se[, sampleNames(sacurine.se) != "HU_neg_096_b2"]
sacurine.se <- clustering(sacurine.se)
utils::head(fData(sacurine.se))
# MultiDataSet
prometis.mset <- reading(system.file("extdata/prometis/", package="phenomis"))
prometis.mset <- clustering(prometis.mset, clusters.vi = c(3, 3))

SciDoPhenIA/phenomis documentation built on June 9, 2022, 11:54 p.m.