For each cluster, computes each member's average distance to other cluster members and flags as NA those that are more than z_thresh MADs above the median average distance.

tighten_modules(gene_partition, distM, z_thresh = 3)

Arguments

gene_partition

A named factor of cluster assignments (e.g., output of ClusterGenes()).

distM

A square numeric distance matrix with names matching names(gene_partition).

z_thresh

Numeric. Number of MADs above the median to use as the outlier threshold. Default 3.

Value

The input gene_partition factor with outlier genes set to NA.