Linnorm.HClust {Linnorm} | R Documentation

## Linnorm-hierarchical clustering analysis.

### Description

This function first performs Linnorm transformation on the dataset. Then, it will perform hierarchical clustering analysis.

### Usage

    Linnorm.HClust(datamatrix, RowSamples = FALSE, MZP = 0,
      DataImputation = TRUE, input = "Raw", method_hclust = "ward.D",
      method_dist = "pearson", Group = NULL, num_Clust = 0, Color = "Auto",
      ClustRect = TRUE, RectColor = "red", fontsize = 0.5,
      linethickness = 0.5, plot.title = "Hierarchical clustering", ...)

### Arguments

`datamatrix` | The matrix or data frame that contains your dataset. Each row is a feature (or Gene) and each column is a sample (or replicate). Raw Counts, CPM, RPKM, FPKM or TPM are supported. Undefined values such as NA are not supported. It is not compatible with log transformed datasets.
`RowSamples` | Logical. In the datamatrix, if each row is a sample and each row is a feature, set this to TRUE so that you don't need to transpose it. Linnorm works slightly faster with this argument set to TRUE, but it should be negligable for smaller datasets. Defaults to FALSE.
`MZP` | Double >=0, <= 1. Minimum non-Zero Portion Threshold for this function. Genes not satisfying this threshold will be removed from HVG anlaysis. For exmaple, if set to 0.3, genes without at least 30 percent of the samples being non-zero will be removed. Defaults to 0.
`DataImputation` | Logical. Perform data imputation on the dataset after transformation. Defaults to TRUE.
`input` | Character. "Raw" or "Linnorm". In case you have already transformed your dataset with Linnorm, set input into "Linnorm" so that you can input the Linnorm transformed dataset into the "datamatrix" argument. Defaults to "Raw".
`method_hclust` | Charcter. Method to be used in hierarchical clustering. (From hclust fastcluster: the agglomeration method to be used. This should be (an unambiguous abbreviation of) one of "ward.D", "ward.D2", "single", "complete", "average", "mcquitty", "median" or "centroid".) Defaults to "ward.D".
`method_dist` | Charcter. Method to be used in hierarchical clustering. (From Dist amap: the distance measure to be used. This must be one of "euclidean", "maximum", "manhattan", "canberra", "binary", "pearson", "correlation", "spearman" or "kendall". Any unambiguous substring can be given.) Defaults to "pearson".
`Group` | Character vector with length equals to sample size. Each character in this vector corresponds to each of the columns (samples) in the datamatrix. If this is provided, sample names will be colored according to their group. Defaults to NULL.
`num_Clust` | Integer >= 0. Number of clusters in hierarchical clustering. No cluster will be highlighted if this is set to 0. Defaults to 0.
`Color` | Character vector. Color of the groups/clusters in the plot. This vector must be as long as num_Clust, or Group if it is provided. Defaults to "Auto".
`ClustRect` | Logical. If num_Clust > 0, should a rectangle be used to highlight the clusters? Defaults to TRUE.
`RectColor` | Character. If ClustRect is TRUE, this controls the color of the rectangle. Defaults to "red".
`fontsize` | Numeric. Font size of the texts in the figure. Defualts to 0.5.
`linethickness` | Numeric. Controls the thickness of the lines in the figure. Defaults to 0.5.
`plot.title` | Character. Set the title of the plot. Defaults to "Hierarchical clustering".
`...` | arguments that will be passed into Linnorm's transformation function.

### Details

This function performs PCA clustering using Linnorm transformation.

### Value

It returns a list with the following objects:

- Results: If num_Clust > 0, this outputs a named vector that contains the cluster assignment information of each sample. Else, this outputs a number 0.

- plot: Plot of hierarchical clustering.

- Linnorm: Linnorm transformed data matrix.

### Examples

    #Obtain example matrix:
    data(Islam2011)
    #Example:
    HClust.results <- Linnorm.HClust(Islam2011, Group=c(rep("ESC",48), rep("EF",44), rep("NegCtrl",4)))

[Package Linnorm version 2.10.0 Index]