optClust: Optimizing clustering for single-cell copy number

View source: R/setClusters.R

optClustR Documentation

Optimizing clustering for single-cell copy number

Description

The optClust is a simple attempt to set a threshold on where to cut the an hclust tree. The aim is to maximize the number of clusters with multiple-cells while minimizing the number of one-cell clusters.

Usage

optClust(cnr, opt.range = seq(0.005, 0.6, by = 0.005))

Arguments

cnr

a cnr bundle

opt.range

range of tree heights that need to be optimized

Value

Returns a matrix where rows are the heights in the opt.range and three columns.

One-cell specifies the number of clusters with only one cell, Multi-cell specifies the number of clusters with multiple cells (>=2), and the percentage of cells in multi-cell clusters (

A suitable threshold is one that minimizes the one-cell cluster and maximizes the

Examples


data(cnr)

cnr <- phylo_cnr(cnr)

## macro optimization
optClust(cnr, opt.range = seq(0, 0.3, by = 0.05))

## for micro-optimization
optClust(cnr, opt.range = seq(0, 0.2, by = 0.001))


SingerLab/gac documentation built on March 23, 2024, 5:15 a.m.