SED-ML / sed-ml

Simulation Experiment Description Markup Language (SED-ML)
http://sed-ml.org
5 stars 2 forks source link

L2 Proposal: collapse DataGenerators to single, 'Variable'-like object #200

Open luciansmith opened 2 years ago

luciansmith commented 2 years ago

I'm working with raw SED-ML again, and am reminded of how incredibly incredibly awkward it is to work with data generators.

I propose that at the least, we introduce a new type of Data Generator that's just a Variable. A creator would switch from using:

    <dataGenerator id="NUC_CYT_SMAD2_1_task1" name="Values[NUC/CYT SMAD2]">
      <listOfVariables>
        <variable id="p1_NUC_CYT_SMAD2_task1" name="NUC_CYT_SMAD2" 
                  target="/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id=&apos;NUC_CYT_SMAD2&apos;]" 
                  taskReference="task1"/>
      </listOfVariables>
      <math xmlns="http://www.w3.org/1998/Math/MathML">
        <ci> p1_NUC_CYT_SMAD2_task1 </ci>
      </math>
    </dataGenerator>

to just:

    <dataGenerator id="p1_NUC_CYT_SMAD2_task1" name="NUC_CYT_SMAD2" 
                  target="/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id=&apos;NUC_CYT_SMAD2&apos;]" 
                  taskReference="task1"/>

It seems to me that this use case covers 98% of all SED-ML use cases.

If we wanted to allow MathML for output to continue to cover the remaining 2%,, instead of insisting that people define local variables, you just let them use other datagenerator IDs in math:

    <dataGenerator id="half_NUC" name="half of NUC, etc.">
      <math xmlns="http://www.w3.org/1998/Math/MathML">
          <apply>
            <divide/>
            <ci> p1_NUC_CYT_SMAD2_task1 </ci>
            <cn type="integer"> 2 </cn>
          </apply>
      </math>
    </dataGenerator>
matthiaskoenig commented 2 years ago

Sounds good to me. That addresses one of the issues with the current SED-ML: "Everything is very complicated for the 99% of typical use cases so that we can handle the 1% of edge cases which could occur." One problem is of course that to support the more complicated things a software has to implement everything. This is the same discussion we had with the SimpleRepeatedTask vs. RepeatedTask, where the simple version is what most people are doing, but the repeated version can handle everything.