Wrapper for constrained K-means on data subsampled to the smallest cohort size.
Source:R/cKmeansDownsampleSmallest.R
cKmeansDownsampleSmallest.Rd
This fuction is a wrapper for the constrained Kmeans algorithm using lcvqe() from the conclust package. This function will subset each cohort down to that with the smallest number of observations.This function is not meant to be run individually, but as a 'clustFunc' argument for running K2tax().
Arguments
- labels
Vector of cohort values
- features
List of features (genes) to include
- K2res
A K2 class object.
References
Reed ER, Monti S (2021). “Multi-resolution characterization of molecular taxonomies in bulk and single-cell transcriptomics data.” Nucleic Acids Research. doi:10.1093/nar/gkab552 , https://pubmed.ncbi.nlm.nih.gov/34226941/. Wagstaff K, Cardie C, Rogers S, Schrodl S (2001). “Constrained K-means Clustering with Background Knowledge.” In ICML, 577--584.