WeightMatrix#

class lightmotif.WeightMatrix#

A matrix storing position-specific odds-ratio for a motif.

log_odds(background=None, base=2.0)#

Log-scale this weight matrix to obtain a position-specific scoring matrix.

Parameters:

background (dict or None) – The background frequencies to use for rescaling the weight matrix before computing log-odds-ratio. If None given, uniform background frequencies will be used.

protein#

True if the weight matrix stores protein weights.

Type:

bool