Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine/fix import/export operations #712

Open
hasanbalci opened this issue Jun 10, 2024 · 5 comments
Open

Refine/fix import/export operations #712

hasanbalci opened this issue Jun 10, 2024 · 5 comments
Assignees
Labels
enhancement Enhancement to existing feature
Milestone

Comments

@hasanbalci
Copy link
Contributor

Current export menu is implemented for exporting SBGNML maps to other formats such as SBML, SIF etc. and they should be working well. However, when we added other formats, SIF and SBML, we didn't put any restrictions for users to use export functionality for these types and this currently leads to wrong export operations. For example, user is able to export SBML file to SBGNML but not in the proper way. The output file of this conversion leads to an SBGNML file with map type SBML which is inconvenient. As a solution we need to add support for possible conversions and disable the rest with a warning message.

Minerva converter that we are currently using for some format conversions supports conversion of SBML to SBGN, GPML and CellDesigner. So we can add support for these three conversions (For SBML -> SBGN conversion, we need to check to which SBGNML version Minerva converts). I think, SBML to SIF conversion can be implemented manually.

Other conversions, SIF to all other formats and if there is any from SBML, we need to show a warning to the user that the export is not currently possible.

@hasanbalci hasanbalci added the enhancement Enhancement to existing feature label Jun 10, 2024
@ugurdogrusoz
Copy link
Contributor

ugurdogrusoz commented Jun 13, 2024

To properly understand the current situation, I prepared some tables here and proposed handling of invalid situations. @hasanbalci Please check.

@hasanbalci
Copy link
Contributor Author

One problem I noticed is the following: Before SBML support, when we try to export SBGN maps as SBML, we were using MINERVA service. After the SBML support, we have write functionality for SBML maps and current 'Export as SBML' button uses that functionality. However, when an SBGN map is open in the canvas and if we try to export the map SBML, the app behaves like the current map is SBML and tries to write it with the write functionality provided with SBML support. Instead it should use Minerva converter instead to convert the current SBGN map to SBML.

@ugurdogrusoz ugurdogrusoz changed the title Refine export operations Refine/fix import/export operations Jun 28, 2024
@ugurdogrusoz ugurdogrusoz assigned okg21 and unassigned hasanbalci Jun 28, 2024
@ugurdogrusoz
Copy link
Contributor

ugurdogrusoz commented Jun 28, 2024

After having discussed all varying combinations, here is what needs to change according to this document (same numbering used in the document):

  • 1. Where we see "NA" in export table entries, let's popup a dialog (similar style to existing ones), that says "Not applicable for the current map type!"
  • 2. Use the Minerva service when converting from PD to .sbml and from SBML to .sbgnml (if 0.3 is chosen, make sure to use 0.3 instead of 0.2 in the file).
  • 3. Use our native code to convert the native SBML Model to .sbml. Currently misses layout information (should only perform layout when such info is nonexistent).
  • 4. Use our native code to convert .sbml contents to our native SBML model. Currently misses layout information (should only perform layout when such info is nonexistent).
  • 5. Use our local web service to convert PD to CellDesigner. Currently sometimes says Conversion service not available.
  • 6. If the currently active map is not SIF, it does nothing now; instead, we should warn the user with a popup that says "Can only be used on SIF maps!"

okg21 added a commit that referenced this issue Jul 1, 2024
okg21 added a commit that referenced this issue Jul 2, 2024
@okg21
Copy link

okg21 commented Jul 3, 2024

For item 2, I encountered two types of problem when using minerva service for PD to SBML conversion.

  1. For some PD samples sbgnml to sbml minerva conversion returns an xml with this note inside:
[Complex:glyph15]	Unknown extension: extraInfo
[Complex:glyph11]	Unknown extension: extraInfo
[glyph32_0:state]	Invalid structural state
[Complex:glyph14]	Unknown extension: extraInfo
[Complex:glyph12]	Unknown extension: extraInfo
[Complex:glyph13]	Unknown extension: extraInfo
[Complex:glyph18]	Unknown extension: extraInfo
[Complex:glyph16]	Unknown extension: extraInfo</p>
  1. For some PD samples Minerva returns an Internal Server Error. For instance, when I try to export the PD sample Drosophila Cell Cycle as SBML, I get the following error:
error: "Internal server error."
error-id: "0a5fb699-3739-42cf-a5f9-a5779b367de1"
reason: "[Complex 89360553-bab4-532a-c6c7-624272c4e43b]\tProblem with exporting bioEntity"

I did some further investigation regarding this, and this happens when elements inside the complex are not linked to reactions in the model. Here is an example: the first image throws the above error with Minerva API, but the second one is exported with no issues.
Screenshot 2024-07-03 at 14 49 09
Screenshot 2024-07-03 at 14 38 48

okg21 added a commit that referenced this issue Jul 4, 2024
…t imports. Item 2: Using Minerva when converting SBML to .sbgnml
@okg21
Copy link

okg21 commented Jul 4, 2024

Regarding item 3, I pushed some fixes to sbgnviz for the SBML map to .sbml export. iVis-at-Bilkent/sbgnviz.js@2cc6ec6
Below are the pre-fix and post-fix exports for the SBML mapped Pharmacokinetics sample.
Before fix:
Screenshot 2024-07-04 at 17 10 52
After fix:
Screenshot 2024-07-04 at 17 07 46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to existing feature
Projects
None yet
Development

No branches or pull requests

3 participants