Decomposes the theta matrix outout from model_archaic into component probability distributions for the mismatch type, flanking bases, strand break base and position of strand composition. These are the probabilities that get represented in the logo plot in plot_archaic.

decompose_theta(theta_out, max_pos = 20)

Arguments

theta_out

A theta matrix from a GoM model fit, with columns representing clusters and rows representing the mutational signatures.

max_pos

The maximum distance from the end of the read that is used for filtering.

Value

Returns a list with number of items equal to number of clusters. Each item of this list is another comprising of the probability distribution of types of mismatch, flanking base, distance from end of read and strand break composition separately.