PamParamSelection: PamParamSelection

Description Usage Arguments Examples

View source: R/cluster_param_selection.R

Description

Runs PAM with differing numbers of partitions and returns validation metrics.

Usage

1
2
3
4
5
6
7
8
PamParamSelection(
  dataset = NULL,
  distance = NULL,
  k = c(2, 5, 10),
  metric = "euclidean",
  scale = TRUE,
  nthreads = 4
)

Arguments

dataset

A transcriptomics dataset. Preferably filtered first. First columns should be gene names. All other columns should be expression levels. Not needed if an argument to distance is given.

distance

A distance matrix. If a distance matrix has already been created (such as by using theDistanceGen function), the matrix can be passed to this function to save time. If a distance matrix is not provided then it will be generated by the function.

k

A numeric vector giving the number of clusters to be evaluated.

metric

The distance metric to be used to calculate the distances between genes. See parallelDist::parDist for all accepted arguments. Also allows the option of 'abs.correlation'. Not used if a distance matrix is provided.

scale

Logical. If TRUE then each gene will be scaled

nthreads

The number of threads to be used for parallel computations. Warning! Increasing this value will massively increase RAM usage. If NULL then the maximum number of threads available will be used.

Examples

1
2
k.options <- seq(2,10)
pam.validation <- PamParamSelection(Laurasmappings, k=k.options, nthreads = 2)

nathansam/CircadianTools documentation built on Dec. 26, 2019, 11:30 a.m.