Description Usage Arguments Value Examples
View source: R/merge_signatures.R
This function merges signatures based on their cosine similarity. It iteratively merges the two signatures with the highest cosine similarity. Merging is stopped when the maximum cosine similarity is lower than the limit.
1 2 3 4 5 6 | merge_signatures(
signatures,
cos_sim_cutoff = 0.8,
merge_char = ";",
verbose = TRUE
)
|
signatures |
Signature matrix (dimensions: x mutation types X n signatures) |
cos_sim_cutoff |
Cutoff for cosine similarity. Signatures are merged when their cosine similarity is higher than the limit. Default: 0.8 |
merge_char |
Character used to merge the signature names. This character shouldn't be in the signature names beforehand. Default: ";" |
verbose |
Verbosity. If TRUE it shows which signatures got merged. Default: TRUE |
Signature matrix (dimensions: x mutation types X n signatures)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Get signatures
signatures <- get_known_signatures()
## Merge signatures
merge_signatures(signatures)
## Merge signatures using a stricter cutoff
merge_signatures(signatures, cos_sim_cutoff = 0.9)
## Merge signatures using a different merging character
merge_signatures(signatures, merge_char = "_")
## Merge signatures silently
merge_signatures(signatures, verbose = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.