Average the expression of a feature and return the expression vector.

AvgFeatureExpression(cluster_labels, M, feature, feature_list)

Arguments

cluster_labels

the cluster label for each cell

M

a matrix of expression values for each cell

feature

a feature id, usually a gene name

feature_list

the names of the features represented by rows of M

Value

a vector of feature expression for each cluster