reconstruction.ecoli.dataclasses.getter_functions

SimulationData getter functions

class reconstruction.ecoli.dataclasses.getter_functions.GetterFunctions(raw_data, sim_data)[source]

Bases: object

getterFunctions

_build_all_masses(raw_data, sim_data)[source]

Builds dictionary of molecular weights keyed with the IDs of molecules. Depending on the type of the molecule, weights are either pulled directly from raw data, or dynamically calculated from the existing data.

_build_compartments(raw_data, sim_data)[source]
_build_full_chromosome_mass(raw_data, sim_data)[source]

Calculates the mass of the full chromosome from its sequence and the weigths of polymerized dNTPs.

_build_genomic_coordinates(raw_data)[source]

Builds a dictionary of genomic coordinates of DNA sites. Keys are the IDs of the sites, and the values are tuples of the left-end coordinate and the right-end coordinate of the site. Sites whose types are included in IGNORED_DNA_SITE_TYPES are ignored.

_build_modified_protein_masses(raw_data, sim_data)[source]

Builds dictionary of molecular weights of modified proteins keyed with the molecule IDs. Molecular weights are calculated from the stoichiometries of the modification reactions.

_build_modified_rna_masses(raw_data)[source]

Builds dictionary of molecular weights of modified RNAs keyed with the molecule IDs. Molecular weights are calculated from the stoichiometries of the modification reactions.

_build_polymerized_subunit_masses(sim_data)[source]

Builds dictionary of molecular weights of polymerized subunits (NTPs, dNTPs, and amino acids) by subtracting the end weights from the weights of original subunits.

_build_protein_complex_compartments(raw_data, all_compartments_sorted)[source]

Builds dictionary of compartment tags for protein complexes keyed with the molecule IDs. Each complex is assigned to the compartment that contains a subunit of the complex and has the highest complexation priority. Compartment tags of subunits that are also protein complexes are determined recursively. Compartments of metabolite subunits are not considered since metabolites are assigned to all compartments that are being modeled.

_build_protein_complex_masses(raw_data)[source]

Builds dictionary of molecular weights of protein complexes keyed with the molecule IDs. Molecular weights are calculated from the stoichiometries of the complexation/equilibrium reactions. For complexes whose subunits are also complexes, the molecular weights are calculated recursively.

_build_protein_masses(raw_data, sim_data)[source]

Builds dictionary of molecular weights of protein monomers keyed with the protein IDs. Molecular weights are calculated from the protein sequence and the weights of polymerized amino acids.

_build_protein_sequences(raw_data)[source]

Builds the amino acid sequences of each protein monomer using sequences in raw_data.

_build_rna_masses(raw_data, sim_data)[source]

Builds dictionary of molecular weights of RNAs keyed with the RNA IDs. Molecular weights are calculated from the RNA sequence and the weights of polymerized NTPs.

_build_rna_sequences(raw_data)[source]

Builds nucleotide sequences of each transcription unit using the genome sequence and the left and right end positions.

_build_sequences(raw_data)[source]

Builds sequences of RNAs and proteins.

_build_submass_array(mw, submass_name)[source]

Converts a scalar molecular weight value to an array of submasses, given the name of the submass category that the molecule belongs to.

_compartment_tag = re.compile('\\[[a-z]]')
get_all_valid_molecules()[source]

Returns a list of all molecule IDs with assigned submass arrays and compartments.

get_compartment(mol_id)[source]

Returns the list of one-letter codes for the compartments that the molecule with the given ID can exist in.

get_compartment_tag(id_)[source]

Look up a molecule id and return a compartment suffix tag like ‘[c]’.

get_compartments(ids)[source]

Returns a list of the list of one-letter codes for the compartments that each of the molecules with the given IDs can exist in.

get_genomic_coordinates(site_id)[source]

Returns the genomic coordinates of the left and right ends of a DNA site given the ID of the site.

get_mass(mol_id)[source]

Return the total mass of the molecule with a given ID.

get_masses(mol_ids)[source]

Return an array of total masses of the molecules with the given IDs.

get_miscrnas_with_singleton_tus()[source]

Returns a list of all miscRNA IDs with corresponding single-gene transcription units.

get_sequences(ids)[source]

Return a list of sequences of the molecules with the given IDs.

get_singleton_tu_id(rna_id)[source]

Returns the ID of the single-gene transcription unit corresponding to the given miscRNA ID, if such a transcription unit exists. This is necessary to replace some references to miscRNA IDs in complexation or equilibrium reactions with their corresponding TU IDs, which are the molecules that are actually transcribed.

get_submass_array(mol_id)[source]

Return the submass array of the molecule with a given ID.

is_valid_molecule(mol_id)[source]

Returns True if the molecule with the given ID is a valid molecule (has both a submass array and a compartment tag).

exception reconstruction.ecoli.dataclasses.getter_functions.InvalidProteinComplexError[source]

Bases: Exception

exception reconstruction.ecoli.dataclasses.getter_functions.TranscriptionDirectionError[source]

Bases: Exception

exception reconstruction.ecoli.dataclasses.getter_functions.UnknownModifiedRnaError[source]

Bases: Exception

exception reconstruction.ecoli.dataclasses.getter_functions.UnknownMolecularWeightError[source]

Bases: Exception