Skip to content

Repository files navigation

Vue3 SBML-Validator

This projects hosts a reusable vue component for the validation of SBML files. It uses the precompiled emscripten library ./lib/sbml_validator.js that once instantiated as module, exposes one function instance.validateSBMLString(data) that validates a utf-8 data string and returns a dictionary like:

[
    {
      "line": 3,
      "column": 4,
      "message": "A Model object may only have the following attributes, all of which are optional: 'metaid', 'sboTerm', 'id', 'name', 'substanceUnits', 'timeUnits', 'volumeUnits', 'areaUnits', 'lengthUnits', 'extentUnits' and 'conversionFactor'. No other attributes from the SBML Level 3 Core namespace are permitted on a Model object. Reference: L3V1 Section 4.2  Attribute 'invalid' is not part of the definition of an SBML Level 3 Version 1 <model> element. ",
      "severity": "error",
      "category": "SBML component consistency",
      "errorId": 20222,
      "package": "core"
    }
]

with all errors.

Installation

  1. Clone the repository (or add it as a dependency / submodule):

    git clone https://github.com/sbmlteam/vue3-sbml-validator
    cd vue3-sbml-validator
  2. Install dependencies:

    npm install
  3. Run the development server:

    npm run dev

    Then open the URL shown in the terminal (typically http://localhost:5173).

  4. Build for production:

    npm run build

    Output goes to dist/. Use npm run preview to serve the built app locally.

Note: The validator relies on the precompiled Emscripten library in ./lib/sbml_validator.js (and any associated .wasm files). Ensure the lib/ directory is present and served correctly when running or deploying the app.

Old validator

This component replaces the old validator, in which one could upload sbml files by pasting SBML, or uploading files, or pointing to URLS:

Upload

specifying a couple of options. After validation the results would be displayed like so:

  • status valid | warning | invalid
  • list of errors with except of the reported line, with link to full document below
  • listing of all lines of the SBML file

Result

Acknowledgements

This project has been possible thanks to LiBiS, the Baden-Württemberg Institute for Bioinformatics Infrastructure:

LiBiS Logo

and to the BMBF funded de.NBI initiative (031L0104A, W-de.NBI-016)):

de.NBI logo

License

BSD 2-Clause License see LICENSE

About

vue3 component that validates SBML files

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages