clusterByQuality: Cluster based on quality variables

View source: R/qualityMeasures.R

clusterByQualityR Documentation

Cluster based on quality variables

Description

This function uses the mclust package to cluster the input samples based on various quality measures.

Usage

clusterByQuality(hmms, G = 1:9, itmax = c(100, 100),
  measures = c("spikiness", "entropy", "num.segments", "bhattacharyya",
  "complexity", "sos"), orderBy = "spikiness", reverseOrder = FALSE)

Arguments

hmms

A list of aneuHMM objects or a character vector with files that contain such objects.

G

An integer vector specifying the number of clusters that are compared. See Mclust for details.

itmax

The maximum number of outer and inner iterations for the Mclust function. See emControl for details.

measures

The quality measures that are used for the clustering. Supported is any combination of c('spikiness','entropy','num.segments','bhattacharyya','loglik','complexity','sos','avg.read.count','total.read.count','avg.binsize').

orderBy

The quality measure to order the clusters by. Default is 'spikiness'.

reverseOrder

Logical indicating whether the ordering by orderBy is reversed.

Details

Please see getQC for a brief description of the quality measures.

Value

A list with the classification, parameters and the Mclust fit.

Author(s)

Aaron Taudt

See Also

getQC

Examples

## Get a list of HMMs
folder <- system.file("extdata", "primary-lung", "hmms", package="AneuFinderData")
files <- list.files(folder, full.names=TRUE)
cl <- clusterByQuality(files)
## Plot the clustering and print the parameters
plot(cl$Mclust, what='classification')
print(cl$parameters)
## Select files from the best 2 clusters for further processing
best.files <- unlist(cl$classification[1:2])


ataudt/aneufinder documentation built on April 18, 2023, 4:20 a.m.