TP_FP_FN_avg_sim {mSigTools} | R Documentation |
Find best matches (by cosine similarity) of a set of mutational signatures to a set of reference mutational signatures.
TP_FP_FN_avg_sim(extracted.sigs, reference.sigs, similarity.cutoff = 0.9)
extracted.sigs |
Mutational signatures discovered by some analysis. A numerical-matrix-like object with columns as signatures. |
reference.sigs |
A numerical-matrix-like object with columns as signatures. This matrix should contain the reference mutational signatures. For example, these might be from a synthetic data set or they could be from reference set of signatures, such as the signatures at the COSMIC mutational signatures web site. See CRAN package cosmicsig. |
similarity.cutoff |
A signature in |
Match signatures in extracted.sigs
to
signatures in reference.sigs
using match_two_sig_sets
based on cosine similarity.
A list with the elements
TP
The number of true positive extracted signatures.
FP
The number of false positive extracted signatures.
FN
The number of false negative reference signatures.
avg.cos.sim
The average cosine similarity of
true positives to their matching reference signatures.
table
A data.frame of extracted signatures
that matched a reference signature.
Each row contains the extracted signature name,
the reference signature name, and the
cosine similarity of the match.
sim.matrix
The numeric distance or similarity
matrix between extracted.sigs
and
reference.sigs
as returned from
sig_dist_matrix
.
unmatched.ex.sigs
The identifiers of
the extracted signatures that did not match a
reference signature.
unmatched.ref.sigs
The identifiers of
the reference signatures that did not match an
extracted signature.
ex.sigs <- matrix(c(0.2, 0.8, 0.3, 0.7, 0.6, 0.4), nrow = 2)
colnames(ex.sigs) <- c("ex1", "ex2", "ex3")
ref.sigs <- matrix(c(0.21, 0.79, 0.19, 0.81), nrow = 2)
colnames(ref.sigs) <- c("ref1", "ref2")
TP_FP_FN_avg_sim(
extracted.sigs = ex.sigs,
reference.sigs = ref.sigs,
similarity.cutoff = .9
)