reconstruction.ecoli.dataclasses.relation

SimulationData relation functions

class reconstruction.ecoli.dataclasses.relation.Relation(raw_data, sim_data)[source]

Bases: object

_build_RNA_to_tf_mapping(raw_data, sim_data)[source]

Builds a dictionary that maps RNA IDs to a list of all transcription factor IDs that regulate the given RNA. All TFs that target any of the constituent cistrons in the RNA are added to each list.

_build_cistron_to_monomer_mapping(raw_data, sim_data)[source]

Build a vector that can map vectors that describe a property for RNA cistrons into a vector that describes the same property for the corresponding monomers if used as an index array. Assumes that each monomer maps to a single RNA cistron (A single RNA can map to multiple monomers).

e.g. monomer_property = RNA_cistron_property[

sim_data.relation.cistron_to_monomer_mapping]

_build_monomer_to_mRNA_cistron_mapping(raw_data, sim_data)[source]

Builds a sparse matrix that can map vectors that describe a property for protein monomers into a vector that describes the same property for the corresponding mRNA cistrons if multiplied to the right of the original vector. The transformed property must be additive (i.e. if two proteins map to the same cistron, the values given for the two proteins are added to yield a value for the cistron).

The full matrix can be returned by calling monomer_to_mRNA_cistron_mapping().

_build_monomer_to_tu_mapping(raw_data, sim_data)[source]

Builds a dictionary that maps monomer IDs to a list of all transcription unit IDs that the monomer can be translated from.

_build_tf_to_RNA_mapping(raw_data, sim_data)[source]

Builds a dictionary that maps transcription factor IDs to a list of all RNA IDs that are targeted by the given TF. All RNA transcription units that contain any of the cistrons regulated by the TF are added to each list.

monomer_to_mRNA_cistron_mapping()[source]

Returns the full version of the sparse matrix built by _build_monomer_to_mRNA_cistron_mapping().

e.g. mRNA_property = sim_data.relation.monomer_to_mRNA_cistron_mapping().T.dot(

monomer_property)