If you wish to use your own method to calculate sample-specific SNV signature weights (as opposed the signature extraction built into trinuc_mutation_rates()), you can use this function to load them into the CESAnalysis. Your input signatures will be used to infer relative trinucleotide-context-specific mutation rates for all tumors. (This means you can run set_signature_weights() or set_trinuc_rates(), but not both.) As in trinuc_mutation_rates(), you can use a built-in set of signatures, such as COSMIC_v3.1, or you can supply your own signature set definitions as documented in ?trinuc_mutation_rates.

## Arguments

- cesa
CESAnalysis

- signature_set
signature set name (see

`list_ces_signature_sets()`

), or a custom signature set (see documentation in`trinuc_mutation_rates()`

)- weights
data.table of relative signature weights for each sample (see details)

- ignore_extra_samples
skip samples in the input table that are not in the CESAnalysis (when false, will stop with an error)

## Details

The input data table must have a Unique_Patient_Identifier column and one column per signature in the signature set. All samples in the CESAnalysis must be included in the input table, and each sample's weights should have a sum on (0, 1]. Since these weights are used by cancereffectsizeR to infer trinucleotide-context-specific relative rates of SNV mutations, each sample must have at least one non-artifact signature with nonzero weight. (In the unlikely event that this is a problem, consider assigning group-average signature weights to the artifact-only samples.)