SBML.org — the global portal for all things SBML

How to use the Selector element

We are currently updating this wiki page. Only the UML diagrams are up to date, but NEITHER the description text NOR the examples.

The Selector can be applied in different places of a model to specify a pool of entities. The usage is so far limited to two different SBML core elements:


Species

The creation of multistate and multi-component SpeciesTypes also requires the possibility of defining initial states and components within the Species element of the SBML core. In order to specify these initial states and partnerships, we extended the Species element to carry InitialSpeciesInstances which uses a Selector for this purpose.

Definition of classes InitialSpeciesInstance, as well as the container classes ListOfInitialSpeciesInstances. The referenced class Selector in blue, is described above.
Definition of classes InitialSpeciesInstance, as well as the container classes ListOfInitialSpeciesInstances. The referenced class Selector in blue, is described above.
<species id="sp1" 
         xmlns:multi="http://www.sbml.org/sbml/level3/version1/multi/version1"
         multi:speciesType="st1" compartment="compartment_1" initialAmount="1000" >
  <multi:listOfInitialSpeciesInstances>
    <multi:initialSpeciesInstance id="initspinst1" 
                                  initialProportion="0.9" multi:selector="sel1" >
      <multi:booleanLogic>
        <multi:booleanOperation type=''or''>
          <multi:selectorReference selector=''sp2_sel1'' />
          <multi:selectorReference selector=''sp2_sel2'' />
        </multi:booleanOperation>
      <multi:booleanLogic>
    </multi:initialSpeciesInstance>
  </multi:listOfInitialSpeciesInstances>
</species>

Note that a Species is located in a given Compartment. However, this Species can be selected with a Selector using several SpeciesTypes. Another Species, located in another Compartment, could be selected by a different "part" of the same Selector. This provides a mechanism to build multi-compartment entities.

Reaction

Definition of class SpeciesTypeRestriction, as well as the container classes ListOfInitialSpeciesInstances. The referenced class Selector in blue, is described above. The class ReactionRule in blue, is described below.
Definition of class SpeciesTypeRestriction, as well as the container classes ListOfInitialSpeciesInstances. The referenced class Selector in blue, is described above. The class ReactionRule in blue, is described below.
Definition of class SpeciesTypeRestriction, containing a list of ListOfSelectors. All the Selectors referenced in this list are representing exclusive entity pools and are therefore to be connected via 'XOR'.
Definition of class SpeciesTypeRestriction, containing a list of ListOfSelectors. All the Selectors referenced in this list are representing exclusive entity pools and are therefore to be connected via 'XOR'.
Definition of classes ReactionRule, Condition and Result, as well as the container classes ListOfConditions and ListOfResults.
Definition of classes ReactionRule, Condition and Result, as well as the container classes ListOfConditions and ListOfResults.
<reaction id="reaction_1">
  <listOfReactants>
    <speciesReference multi:xmlns="http://www.sbml.org/sbml/level3/version1/multi/version1" 
                      multi:speciesType="speciesType_1" stoichiometry="1">
      <multi:listOfSpeciesTypeRestrictions>
        <multi:speciesTypeRestriction id="speciesTypeRestriction_1">
          <multi:booleanLogic>
            <multi:booleanOperation type="xor">
              <multi:selectorReference selector="sp1_sel1" />
              <multi:selectorReference selector="sp1_sel2" />
            </multi:booleanOperation>
          <multi:booleanLogic>
        </multi:speciesTypeRestriction>
      </multi:listOfSpeciesTypeRestrictions>
    </speciesReference>
  </listOfReactants>
  <listOfProducts>
    <speciesReference multi:xmlns="http://www.sbml.org/sbml/level3/version1/multi/version1" 
                      species="speciesType_1" stoichiometry="1">
      <multi:listOfSpeciesTypeRestrictions>
        <multi:speciesTypeRestriction id="speciesTypeRestriction_2" >
          <multi:selectorReference selector="sp2_sel1" />
        </multi:speciesTypeRestriction>
      </multi:listOfSpeciesTypeRestrictions>
    </speciesReference>
  </listOfProducts>
  <kineticLaw>
    <!-- No reaction if multi package is not supported -->
    <math xmlns="http://www.w3.org/1998/Math/MathML">
      <cn>0</cn>
    </math>
  </kineticLaw>
  <listOfReactionRules xmlns="http://www.sbml.org/sbml/level3/version1/multi/version1">
    <reactionRule id="reactionRule_1">
      <listOfConditions>
        <condition speciesTypeRestriction="speciesTypeRestriction_1" />
      </listOfConditions>
      <listOfResults>
        <result speciesTypeRestriction="speciesTypeRestriction_2" />
      </listOfResults>            
      <kineticLaw>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
          <apply>
            <times />
            <ci>kon</ci>
            <ci>speciesTypeRestriction_1</ci>
          </apply>
        </math>
        <listOfParameters>
          <parameter id="kon" value="1" />
        </listOfParameters>
      </kineticLaw>
    </reactionRule>
  </listOfReactionRules>
</reaction>


Please use our issue tracking system for any questions or suggestions about this website. This page was last modified 18:14, 5 October 2009.