src.infer.collisions module#

collisions_from_motif_concentration_trajectory_and_collision_rate_constants(motif_concentration_trajectory, collision_rate_constants=1, flatten: bool = True)[source]#

The collisions give how often a certain ligation (channel) can be observed. It measures, how often the reactants (end motif of the rear strand, beginning motif of the fore strand and template motif) that perform the reaction, meet (are exposed to each other).

Technically, it integrates over time the three concentrations reaction wise, according to effective ligation dynamics.

Parameters:#

motif_concentration_trajectory : concentration collision_rate_constants: array, optional (default: None)

weights of the integral. If None, they are set to one.

flattenboolean, optional (default: True)

if True, output is flat

Returns:#

fieldNIFTy-field

field with each entry being the integral over the corresponding concentrations of the reactants that are needed for the templated ligation.

motifs_collisions_array_from_motifs_array(motifs_array: Array, collision_order: int = 3) Array[source]#

takes motifs_array and calculates motifs_collisions_array, i.e. the $m$th outer product of the motifs array with itself, where $m$ is the collision_order.

Parameters:
  • motifs_array (jax.Array)

  • collision_order (int, optional) – number of collisions, by default 3

Returns:

motifs_collisions_array

Return type:

jax.Array

ligation_spot_formations_from_motifs_array(motifs_array: Array, number_of_letters: int = 4, motiflength: int = 4) Array[source]#

calculates the collisions that actually enable ligation, i.e. the $m$th outer product of the motifs array with itself, using infer.motifs_collisions_array_from_motifs_array but with only ending motifs (and strands) as fore motifs, beginning motifs (and strands) as rear motifs and only strands of at least lenth 2 as template motifs.

Parameters:
  • motifs_array (jax.Array)

  • number_of_letters (int, optional) – number of letters, by default 4

  • motiflength (int, optional) – length of motif, by default 4

Returns:

ligation_spot_array

Return type:

jax.Array

collisions_from_motif_concentration_trajectory_array_and_collision_rate_constants_array(motif_concentration_trajectory_array: Array, motif_concentration_trajectory_times_array: Array = None, collision_rate_constants_array: Array = 1.0, motiflength: int = 4, alphabet: list = ['A', 'T'], complements: list = [1, 0], concentrations_are_logarithmised: bool = True, pseudo_count_concentration: float = 1e-12)[source]#

Jax version of collions_from_motif_concentration_trajectory_and_collision_rate_constants