Skip to content

Commit

Permalink
support antimony
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Metelkin committed May 15, 2021
1 parent 4ac01b7 commit 22ed82c
Show file tree
Hide file tree
Showing 2 changed files with 1,196 additions and 16 deletions.
50 changes: 34 additions & 16 deletions src/sbml-to-xhtml/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const sbml2tableText = require('./sbml2table.xsl');
const sbml2mathText = require('./sbml2math.xsl');
const sbml2elementText = require('./sbml2element.xsl');
const sbml2hetaText = require('./sbml2heta.xsl');
const sbml2antimonyText = require('./sbml2antimony.xsl');

const sbml3tableText = require('./sbml3table.xsl');
const sbml3mathText = require('./sbml3math.xsl');
Expand All @@ -12,11 +13,24 @@ module.exports = function(parser){
let sbml2math = parser.parseFromString(sbml2mathText, 'application/xml');
let sbml2element = parser.parseFromString(sbml2elementText, 'application/xml');
let sbml2heta = parser.parseFromString(sbml2hetaText, 'application/xml');
let sbml2antimony = parser.parseFromString(sbml2antimonyText, 'application/xml');

let sbml3table = parser.parseFromString(sbml3tableText, 'application/xml');
let sbml3math = parser.parseFromString(sbml3mathText, 'application/xml');

return [
{
format: 'SBML',
level: '2',
name: 'sbml2table',
xslt: sbml2table,
parameters: ['useNames', 'correctMathml', 'equationsOff'],
parameterNotes: {
useNames: 'Use "names" attribute instead of "id" attribute. Turn on the option for models with very long or uninformative ids',
correctMathml: 'Make some correction for MathML generated by SimBiology. Some of SimBiology models generate wrong MathML. Try this option if something looks wrong in equations.',
equationsOff: 'Use this option if you are not interested in math. It reduces time of transformation.'
}
},
{
format: 'SBML',
level: '2',
Expand All @@ -30,14 +44,10 @@ module.exports = function(parser){
{
format: 'SBML',
level: '2',
name: 'sbml2table',
xslt: sbml2table,
parameters: ['useNames', 'correctMathml', 'equationsOff'],
parameterNotes: {
useNames: 'Use "names" attribute instead of "id" attribute. Turn on the option for models with very long or uninformative ids',
correctMathml: 'Make some correction for MathML generated by SimBiology. Some of SimBiology models generate wrong MathML. Try this option if something looks wrong in equations.',
equationsOff: 'Use this option if you are not interested in math. It reduces time of transformation.'
}
name: 'sbml2antimony',
xslt: sbml2antimony,
parameters: [],
parameterNotes: {}
},
{
format: 'SBML',
Expand All @@ -63,6 +73,18 @@ module.exports = function(parser){
equationsOff: 'Use this option if you are not interested in math. It reduces time of transformation.'
}
},
{
format: 'SBML',
level: '3',
name: 'sbml3table',
xslt: sbml3table,
parameters: ['useNames', 'correctMathml', 'equationsOff'],
parameterNotes: {
useNames: 'Use "names" attribute instead of "id" attribute. Turn on the option for models with very long or uninformative ids',
correctMathml: 'Make some correction for MathML generated by SimBiology. Some of SimBiology models generate wrong MathML. Try this option if something looks wrong in equations.',
equationsOff: 'Use this option if you are not interested in math. It reduces time of transformation.'
}
},
{
format: 'SBML',
level: '3',
Expand All @@ -76,14 +98,10 @@ module.exports = function(parser){
{
format: 'SBML',
level: '3',
name: 'sbml3table',
xslt: sbml3table,
parameters: ['useNames', 'correctMathml', 'equationsOff'],
parameterNotes: {
useNames: 'Use "names" attribute instead of "id" attribute. Turn on the option for models with very long or uninformative ids',
correctMathml: 'Make some correction for MathML generated by SimBiology. Some of SimBiology models generate wrong MathML. Try this option if something looks wrong in equations.',
equationsOff: 'Use this option if you are not interested in math. It reduces time of transformation.'
}
name: 'sbml3antimony',
xslt: sbml2antimony,
parameters: [],
parameterNotes: {}
},
{
format: 'SBML',
Expand Down
Loading

0 comments on commit 22ed82c

Please sign in to comment.