src.infer.motif_production_transition_kernel module#

print_hybridization_site_categories(hybridization_length_max: int = 4)[source]#
motif_production_transition_kernel_from_motif_production_rate_constants_array(motif_production_rate_constants: Array, number_of_letters: int = 4, motiflength: int = 4, maximum_ligation_window_length: int = 4) Array[source]#
motif_production_transition_kernel_matrix(number_of_letters: int = 4, motiflength: int = 4, maximum_ligation_window_length: int = 4) Array[source]#

Motif productions are in the Third order Motif Collisions include all combinations of three motifs independent of their category. Ligation sites are a subclass third order motif collisions, where the first motif (the left or fore motif) is a strand or an ending, the second motif (right or rear motif) is a strand or a beginning and the third motif (the template) is a strand of at least length 2 or beginning, continuation or beginning.

Motif Productions sights only need to consider the hybridization sight and eventual dangling ends. They are thus a subclass of ligation sites. Ligation Windows categorize the motif production sites. The ligation windows have the length of the hybridization sight plus 2 more nucleotides to cover dangling ends. The ‘maximum_ligation_window_length’ is maximally equal to the motiflength, as longer motifs, and thus longer hybridization sights are not tracked. The biggest ligation window has thus the ‘maximum_ligation_window_length’. The biggest ligation window is the only one that can contain hybridization sights of length equal to the ligation window or one nucleotide less. In addition to the hybridization site, each ligation window also stores a number between 1 and the length of the hybridization site minus one that indicates the ‘ligation_spot’.

The motif_production_rate_constants are categorized by the ligation windows. For the transition kernal they first need to be extended to the shape of the ligation_sites, which means a degeneracy, i.e. all ligation_sites with the same ligation window get the same contribution.

To set up the transition kernel, all reactants in the corresponding ligation_site get a negative contribution of the corresponding rate, all products get a positive contribution.

Parameters:#

motif_production_rate_constantsjax.Array

The rate constants for the motif production

number_of_lettersint

The number of letters in the alphabet

motiflengthint

The length of the motif

maximum_ligation_window_lengthint

Maximum ligaion window length, default is 4

Returns:#

jax.Array

The motif production transition kernel