cos_similarity: Gene signature cosine similarity matrix

View source: R/cos_similarity.R

cos_similarityR Documentation

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)

Arguments

x

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

use_filter

Logical whether to use filtered gene signature.

Value

A symmetric similarity matrix.


cellGeometry documentation built on April 20, 2026, 1:06 a.m.