Learn R Programming

cellGeometry (version 0.5.7)

cos_similarity: Gene signature cosine similarity matrix

Description

Computes the cosine similarity matrix from the gene signature matrix of a cellMarkers object or any matrix. Note that this function computes cosine similarity between matrix columns, unlike dist() which computes the distance metric between matrix rows.

Usage

cos_similarity(x, use_filter = NULL)

Value

A symmetric similarity matrix.

Arguments

x

Either a matrix or a 'cellMarkers' class or 'deconv' class object.

use_filter

Logical whether to use filtered gene signature.