Generates reconstructed substitution profile (catalogues) generated by proportionally combining each estimated contribution.
Arguments
- signature
a data.frame in sigverse signature format. See
sigshared::example_signature()
for details.- n
total number of variants to use for reconstruction
Examples
library(sigstash)
# Load a signature collection
signatures <- sig_load("COSMIC_v3.3.1_SBS_GRCh38")
# Create a model that represents a mix of SBS1 (40%) and SBS2 (60%)
model <- c(SBS1 = 0.4, SBS2 = 0.6)
# Add selected signatures to the combined model
combined_signatures <- sig_combine(signatures, model)
# Flatten the combined_signatures dataframe that keeps separate signatures
signature <- sig_combine_collapse_to_single_signature(combined_signatures)
# Reconstruct a perfect catalogue describing what the mutational profile of a sample
# with 200 mutations and the given signature model would look like
reconstuction <- sig_reconstruct(signature, n=200)
# Visualise Result
# sig_visualise(reconstuction, class = "catalogue")