Export
ModelSBML
- class eBCSgen.Export.ModelSBML.ModelSBML(level, version)
Bases:
object- create_all_reactions(rules: set)
This function creates all reactions from rules At first, it translates to RHS/LHS
Then it creates kinetic law for all reactions and at the same time it creates modifiers for those Complexes that were not used either as reactant or product.
- Parameters:
rules – set of BCSL rules used in a model
- create_all_species_compartments_and_complex_species_types(unique_complexes: dict, structure_signature: dict)
Creates all compartments
Creates species for every unique Complex agent in values Creates SpeciesType for Complex agent if there is new one - no isomorphisms here
- Parameters:
unique_complexes – dict() of representative Complexes[Keys] & tuple() of pairs (Core.Complex,str. SBML_species_code()) Encapsulates all used Complexes and theirs isomorphisms in the model
- create_basic_species_types(atomics: dict, structs: dict)
Function creates SBML speciesTypes from signatures. speciesTypes do not have compartments by default. compartment is added in specific species later and they are cereated using map compartments -> outside agents
- Parameters:
atomics – signature of atomic agents
structs – signature of structure agents
- create_compartment(compartment: str)
Function creates SBML-compartment using string name of compartment
- Parameters:
compartment – string name of compartment
- create_kinetic_law_and_modifiers(ordered_rules, reaction_objects)
Creates kinetic law for all reactions and at the same time it creates modifiers for those Complexes that were not used either as reactant or product.
- Parameters:
ordered_rules – BCSL rules
reaction_objects – list of all libSBML reaction objects
- create_parameters(definitions: dict, unique_params: set)
Sets up parameters from definitions and parameters in rates
- Parameters:
definitions – parameters in BCSL definition
unique_params – parameters in BCSL rates
- create_products(items: list, reaction)
Creates all products from Complexes in list of tuples
- Parameters:
items – list of RHS complexes in reaction
reaction – given reaction
- create_reactants(items: list, reaction)
Creates all reactants from Complexes in list of tuples
- Parameters:
items – list of LHS complexes in reaction
reaction – given reaction
- create_reaction_for_isomorphisms(unique_complexes)
Function creates all reactions between isomorphism in order to ensure that given Complexes are interchangeable but specific rule applies only to that exact isomorphism
- Parameters:
unique_complexes – given possible unique complexes
- create_species(comp_agent: Complex)
Creates all species in the model
- Parameters:
comp_agent – BCSL Complex agent to be translated to SBML Species
- create_species_feature_type(new_species_type, atomic: str, atomics: dict)
Function creates species feature Type inside Atomic agent.
Add all possible feature values to ListOfPossibleFeatureValues of given speciesFeatureType. If feature value is ‘_’, ignore itte
- Parameters:
new_species_type – libsbml object of new speciesType
atomic – name of given atomic agent
atomics – atomic signature of the model
- create_species_features(comp_agent: Complex, new_species_multi_plugin)
Creates all species features for given species
- Parameters:
comp_agent – BCSL complex agent to create SBML species features for
new_species_multi_plugin – libsbml plugin for manipulating SBML-multi species
- create_species_type_from_complex(comp_agent: Complex, structure_signature: dict)
All complex agents are translated to SpeciesTypes Here
- Parameters:
comp_agent – BCSL agent to be translated to SBML-multi species type
- create_species_types_from_atomic(atomics: dict)
Function creates speciesTypes from Atomic agents
- Parameters:
atomics – atomic signature of the model in <dict>
- create_species_types_from_structure(structs: dict)
Function creates speciesTypes from Structure agents
- Parameters:
structs – structure signature of the model in <dict>
- set_initial_amounts(init)
Sets up initial Amount of Complex agents from inits
- Parameters:
init – Complex agents at the beginning of the running of the model
- set_species_feature(agent, plugin, component_ref, is_component: bool)
Creates and sets up species feature
If there are 2 or more agents in complex with the same name, reference can distinguish between them by mentioning their parent structure agent too.
If SpeciesFeature should be ‘_’, ignore it. This corresponds to any value.
- Parameters:
agent – agent of given feature
plugin – multi plugin to manipulate with species features
component_ref – reference to agent where this feature belongs.
is_component – says about if setting the component atr. is necessary