getCenters: Compute cluster centroids

View source: R/RepDaAnalysisFns.R

getCentersR Documentation

Compute cluster centroids

Description

This function calculates cluster centroids given sequences (rows) and k-mer usage (columns), and cluster assignment labels for each sequence. Centroid vector for each cluster is the average of the k-mer usage frequencies of clonotypes in the cluster.

Usage

getCenters(seqmers, clslabels)

Arguments

seqmers

is a dataframe/matrix with observations (sequences) on the rows and features (k-mer usage frequences) on the columns

clslabels

is a vector containing cluster assignment labels for every sequence in seqmers

Value

a matrix with rows containing the cluster labels and columns containing an average usage frequency for each possible k-mer representing the cluster centroid.


dyohanne/RepAn documentation built on Feb. 3, 2023, 2:41 p.m.