|
From: Leandro W. <lea...@gm...> - 2017-07-10 16:50:22
|
I believe that is the case. If we have an agreement, then I can make modifications in JSBML too. Leandro On Mon, Jul 10, 2017 at 10:40 AM, Lucian Smith <luc...@gm...> wrote: > That is indeed the idea as I understand it, too. > > The only additional thing is that it would be nice if a function existed > in libsbml and jsbml like 'GetDimensions' that returned the dimensions that > applied to that object, whether direct or inherited (or null). > > -Lucian > > On Jul 10, 2017 8:16 AM, "Sarah Keating" <ske...@ca...> wrote: > >> So I think what got decided was: >> >> 1. A child object inherits the dimensions of its parent implicitly. This >> include listOf children that would not normally be dimensioned. >> >> So assuming the compartment Cell and species A also have dimension '0' of >> size n >> the speciesReference in the reaction below inherits dimension '0' of size >> n without the need to explicitly declare it. >> >> <reaction id="r" reversible="false" fast="false" compartment="Cell"> >> <arrays:listOfDimensions >> >> xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> >> <arrays:dimension arrays:id="d0" arrays:size="n" >> arrays:arrayDimension="0"/> >> </arrays:listOfDimensions> >> <arrays:listOfIndices >> >> xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> >> <arrays:index arrays:arrayDimension="0" >> arrays:referencedAttribute="compartment"> >> <math xmlns="http://www.w3.org/1998/Math/MathML"> >> <ci> d0 </ci> >> </math> >> </arrays:index> >> </arrays:listOfIndices> >> <listOfReactants metaid="_msr"> >> <speciesReference constant="true" species="A" stoichiometry="1" >> id="sr1"> >> <arrays:listOfIndices >> >> xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> >> <arrays:index arrays:referencedAttribute="species" >> arrays:arrayDimension="0"> >> <math xmlns="http://www.w3.org/1998/Math/MathML"> >> <ci> d0 </ci> >> </math> >> </arrays:index> >> </arrays:listOfIndices> >> </speciesReference> >> >> and you would expect when flattened to get (assume n = 2) >> >> <reaction id="r_0" reversible="false" fast="false" >> compartment="Cell_0"> >> <listOfReactants metaid="_msr_0"> >> <speciesReference constant="true" species="A_0" >> stoichiometry="1" id="sr1_0"> >> </speciesReference> >> ... >> <reaction id="r_1" reversible="false" fast="false" >> compartment="Cell_1"> >> <listOfReactants metaid="_msr_1"> >> <speciesReference constant="true" species="A_1" >> stoichiometry="1" id="sr1_1"> >> </speciesReference> >> ... >> >> >> >> >> 2. If any child object adds dimensions of its own then it MUST also >> declare the inherited dimensions from the parent. >> >> So my species reference claims to have two dimensions in the one >> dimension reaction so has to redeclare the dimension d0 that it inherits >> and then add another >> >> <reaction id="r" reversible="false" fast="false" compartment="Cell"> >> <arrays:listOfDimensions >> >> xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> >> <arrays:dimension arrays:id="d0" arrays:size="n" >> arrays:arrayDimension="0"/> >> </arrays:listOfDimensions> >> <arrays:listOfIndices >> >> xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> >> <arrays:index arrays:arrayDimension="0" >> arrays:referencedAttribute="compartment"> >> <math xmlns="http://www.w3.org/1998/Math/MathML"> >> <ci> d0 </ci> >> </math> >> </arrays:index> >> </arrays:listOfIndices> >> <listOfReactants metaid="_msr"> >> <speciesReference constant="true" species="A" stoichiometry="1" >> id="sr1"> >> <arrays:listOfDimensions >> >> xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> >> <arrays:dimension arrays:id="d0" arrays:size="n" >> arrays:arrayDimension="0"/> >> <arrays:dimension arrays:id="d1" arrays:size="n" >> arrays:arrayDimension="1"/> >> </arrays:listOfDimensions> >> <arrays:listOfIndices >> >> xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> >> <arrays:index arrays:referencedAttribute="species" >> arrays:arrayDimension="0"> >> <math xmlns="http://www.w3.org/1998/Math/MathML"> >> <ci> d0 </ci> >> </math> >> </arrays:index> >> <arrays:index arrays:referencedAttribute="id" >> arrays:arrayDimension="1"> >> <math xmlns="http://www.w3.org/1998/Math/MathML"> >> <ci> d1 </ci> >> </math> >> </arrays:index> >> </arrays:listOfIndices> >> </speciesReference> >> >> and you would expect when flattened to get (assume n = 2) I think ???? >> >> <reaction id="r_0" reversible="false" fast="false" >> compartment="Cell_0"> >> <listOfReactants metaid="_msr_0"> >> <speciesReference constant="true" species="A_0" >> stoichiometry="1" id="sr1_0_0"> >> <speciesReference constant="true" species="A_0" >> stoichiometry="1" id="sr1_0_1"> >> </speciesReference> >> ... >> <reaction id="r_1" reversible="false" fast="false" >> compartment="Cell_1"> >> <listOfReactants metaid="_msr_1"> >> <speciesReference constant="true" species="A_1" >> stoichiometry="1" id="sr1_1_0"> >> <speciesReference constant="true" species="A_1" >> stoichiometry="1" id="sr1_1_1"> >> </speciesReference> >> ... >> >> >> Before I change my flattening code any more it would be great if someone >> would confirm my recollection and my interpretation :-) >> >> Sarah >> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> sbml-arrays mailing list >> sbm...@li... >> https://lists.sourceforge.net/lists/listinfo/sbml-arrays >> > |