3.1. h1_hesc package¶
3.1.1. Subpackages¶
- 3.1.1.1. h1_hesc.data package
- 3.1.1.2. h1_hesc.kb_gen package
- 3.1.1.2.1. Submodules
- 3.1.1.2.2. h1_hesc.kb_gen.chromosomes module
- 3.1.1.2.3. h1_hesc.kb_gen.compartments module
- 3.1.1.2.4. h1_hesc.kb_gen.complexes module
- 3.1.1.2.5. h1_hesc.kb_gen.core module
- 3.1.1.2.6. h1_hesc.kb_gen.genes_transcripts_exons_proteins module
- 3.1.1.2.7. h1_hesc.kb_gen.metabolic_network module
- 3.1.1.2.8. h1_hesc.kb_gen.metabolic_reaction_kinetics module
- 3.1.1.2.9. h1_hesc.kb_gen.metabolites module
- 3.1.1.2.10. h1_hesc.kb_gen.properties module
- 3.1.1.2.11. h1_hesc.kb_gen.protein_modifications module
- 3.1.1.2.12. h1_hesc.kb_gen.proteins module
- 3.1.1.2.13. h1_hesc.kb_gen.regulatory_modules module
- 3.1.1.2.14. h1_hesc.kb_gen.taxon module
- 3.1.1.2.15. h1_hesc.kb_gen.transcripts module
- 3.1.1.2.16. Module contents
- 3.1.1.3. h1_hesc.model_gen package
- 3.1.1.3.1. Submodules
- 3.1.1.3.2. h1_hesc.model_gen.complexation_option module
- 3.1.1.3.3. h1_hesc.model_gen.core module
- 3.1.1.3.4. h1_hesc.model_gen.initialize_model_option module
- 3.1.1.3.5. h1_hesc.model_gen.main module
- 3.1.1.3.6. h1_hesc.model_gen.metabolism_option module
- 3.1.1.3.7. h1_hesc.model_gen.protein_degradation_option module
- 3.1.1.3.8. h1_hesc.model_gen.rna_degradation_option module
- 3.1.1.3.9. h1_hesc.model_gen.transcription_option module
- 3.1.1.3.10. h1_hesc.model_gen.translation_translocation_option module
- 3.1.1.3.11. Module contents
- 3.1.1.4. h1_hesc.model_sim package
- 3.1.1.5. h1_hesc.scaled_down_model package
3.1.2. Submodules¶
3.1.3. h1_hesc.__main__ module¶
Command line programs for generating random whole-cell models
- Author
Jonathan Karr <karr@mssm.edu>
- Date
2018-05-15
- Copyright
2018, Karr Lab
- License
MIT
-
class
h1_hesc.__main__.
App
(label=None, **kw)[source]¶ Bases:
cement.core.foundation.App
Command line application
3.1.4. h1_hesc._version module¶
3.1.5. h1_hesc.utils module¶
A set of functions to support core functions
- Author
Yin Hoon Chew <yinhoon.chew@mssm.edu>
- Author
Jonathan Karr <jonrkarr@gmail.com>
- Date
2017-09-19
- Copyright
2017, Karr Lab
- License
MIT
-
h1_hesc.utils.
calc_eff_vmax
(enzyme_kcats, prot_concs)[source]¶ Calculate the effective Vmax of a reaction based on the kcats of each enzyme and the concentrations and stoichiometries of their subunits
- Parameters
enzyme_kcats (
dict
) – a dictionary whose keys are enzymes (semicolon-separated list of the stoichiometry * the UniProt id of each subunit of the complex) and values are their kcat`s. See :obj:`calc_mean_kcat for examples.prot_concs (
dict
) – a dictionary whose keys are the UniProt ids of proteins and values are their concentrations
- Returns
effective Vmax
- Return type
float
-
h1_hesc.utils.
calc_median_kcat
(reactions, enzyme_strs, kcats)[source]¶ Calculate the median kcat for each enzyme of each reaction among a set of observed kcats
- Parameters
reactions (
list
) – reaction idsenzymes (
list
) –enzyme compositions (semicolon-separated list of the stoichiometry * the UniProt id of each subunit of the complex), in the same order as the reaction list. Examples:
A: monomer of A
2*A: homodimer of A
A; B: heterodimer of A and B
2*A; 2*B: heterotetramer of A and B
kcats (
list
) – observed kcats, in the same order as the reaction and enzyme lists
- Returns
- a nested dictionary whose keys are reaction ids and values are dictionaries whose
keys are enzyme ids and values are the mean kcat observed for the enzyme for the reaction
- Return type
dict
-
h1_hesc.utils.
create_conv_model
(met_model)[source]¶ Convert a metabolism model into a linear programming model in conv_opt format
- Parameters
met_model (
wc_lang.Submodel
) – metabolism submodel- Returns
a linear programming model in conv_opt format
dict
ofstr
:conv_opt.Variable
): a dictionary mappingreaction IDs to their associated conv_opt.Variable objects
dict
ofstr
:list
ofconv_opt.LinearTerm
: adictionary mapping species IDs to their associated list of conv_opt.LinearTerm objects representing their stoichiometry coefficients in reactions they participate in
- Return type
conv_opt.Model
-
h1_hesc.utils.
determine_bounds
(met_model, cell_volume, scale_factor=None)[source]¶ Determine the bounds of a linear programming problem based on calculated rate laws or measured fluxes
- Parameters
met_model (
wc_lang.Submodel
) – metabolism submodelcell_volume (
float
) – cell volumescale_factor (
float
, optional) – a scaling factor for the bounds; the default value is 1
- Returns
tuple
: a dictionary that maps reaction IDsto (minimum bound, maximum bound) tuples
- Return type
dict
ofstr
-
h1_hesc.utils.
eval_gene_reaction_rule
(reaction, gene_expressions)[source]¶ Calculate the activity of a gene-reaction rule based on the expression of each gene
- Parameters
reaction (
cobra.Reaction
) – COBRApy reactiongene_expressions (
dict
) – dictionary whose keys are gene ids (str
) and values are gene expressions (bool
)
- Returns
reaction activity
- Return type
bool
-
h1_hesc.utils.
extract_info_from_string
(input_str, start_substr, end_substr, include_start=True)[source]¶ Parse strings to get metadata recorded in undefined format
- Parameters
input_str (
str
) – input stringstart_substr (
str
) – substring that indicates the metadata keyend_substr (
str
) – substring after the metadata valueinclude_start (
bool
, optional) – if False, the substring indicating the metadata key will be stripped out of the returned string, default = True
- Returns
metadata value
- Return type
str
-
h1_hesc.utils.
get_complexes_from_gene_rule
(rule)[source]¶ Get a list of all of the complexes that can catalyze a reaction from its gene-reaction rule
- Parameters
rule (
str
) – gene-reaction rule (e.g. HGNC:8994 or HGNC:8995 or HGNC:8996)- Returns
- list of complexes that can catalyze the reaction, with each complex listed
as a list of the names of the subunits
- Return type
list
oflist
ofstr
-
h1_hesc.utils.
get_enzyme_equation
(enzyme)[source]¶ Get a string representation of the subunits of an enzyme
- Parameters
enzyme (
list
ofdict
) – enzyme- Returns
string representation of the subunits of the enzyme e.g. 2*subunit-A; subunit-B
- Return type
str
-
h1_hesc.utils.
get_reaction_equation
(reaction)[source]¶ Create a string representation of the equation of a reaction
- Parameters
reaction (
dict
) – dictionary that contains a key participants whose value is a list of participants, each of which is a dictionary with a species- Returns
string representation of the equation of the reaction
- Return type
str
-
h1_hesc.utils.
get_value_inchi_formula_connectivity
(inchi_str)[source]¶ Get only the empirical formula and connectivity portion of an InChI string
- Parameters
inchi_str (
str
) – InChI string- Returns
InchI string with only the the empirical formula and connectivity portion
- Return type
str
-
h1_hesc.utils.
has_all_inchi_structures
(reaction)[source]¶ Determine if structures (in InChI format) are defined for all of a reaction’s participants
- Parameters
reaction (
dict
) – dictionary that contains a key participants whose value is a list of participants, each of which is a dictionary with a species_type- Returns
True
if structures (in InChI format) are defined for all of a reaction’s participants- Return type
bool
-
h1_hesc.utils.
parse_cobra_reaction_equation
(equation)[source]¶ Parse a COBRApy reaction equation
- Parameters
equation (
str
) – a COBRApy reaction equation- Returns
dictionary whose keys are species ids (
str
) and values are stoichiometric coefficients (float
)bool
: reversibility of the reaction- Return type
dict
-
h1_hesc.utils.
parse_cobra_reaction_equation_side
(side)[source]¶ Parse a side of a COBRApy reaction equation
- Parameters
side (
str
) – side of a COBRApy reaction equation- Returns
dictionary whose keys are species ids (
str
) and values are stoichiometric coefficients (float
)- Return type
dict
-
h1_hesc.utils.
remove_inchi_layer
(inchi_structure, layer_to_remove, raise_error_if_no_layer=False)[source]¶ Remove a layer for an InChI-encoded chemical structure
- Parameters
inchi_structure (
str
) – InChI-encoded chemical structurelayer_to_remove (
str
) – character code for the layer to removeraise_error_if_no_layer (
bool
, optional) – ifTrue
, raise an error if the structure doesn’t contain the layer
- Returns
InChI-encoded chemical structure with the specified layer removed
- Return type
str
- Raises
ValueError – if the
raise_error_if_no_layer
isTrue
and the layer isn’t in the structure