match_signatures: Find the best matches between two sets of signatures

Description Usage Arguments Value

View source: R/sigfit_utility.R

Description

match_signatures compares two independent estimates of signatures to find the closest matches between them.

Usage

1
match_signatures(sigs_a, sigs_b, stat = "cosine")

Arguments

sigs_a

First set of signatures; either a numeric matrix of signatures, with one row per signature and one column per mutation type, or a list of matrices generated via retrieve_pars.

sigs_b

Second set of signatures, as for sigs_a.

stat

Similarity metric to use when comparing signatures. Admits values "cosine" (default, cosine similarity) or "L2" (L2 norm or Euclidean distance).

Value

A numeric vector containing, for each signature in sigs_a, the index of the closest match in sigs_b.


kgori/sigfit documentation built on Feb. 3, 2022, 12:04 p.m.