Closed piotr-gawron closed 3 years ago
Hi @piotr-gawron, thank you for the PR. The conversion seems to be working.
I ran into some problems in Newt while trying to export as SBML and then import from the same file.
The original map in Newt looks like the following:
The SBML file from the service response has the following warning (the file as exported should be valid, it passes Newt's SBGN validation at least).
Even though there is a warning, I'm still able to import this file. The node color scheme being black and white doesn't matter but the compartment color is interesting. Our color scheme in the original doesn't have this color. Its hex code is #8080FFFF
.
Can you tell me if this is somehow related to the above warning in the file, or is it some default color used in the conversion service?
Dear @msalihaltun, the warning you see in the re-imported file is due to the fact that libsbgn library validation method failed (https://github.com/sbgn/libsbgn/blob/master/org.sbgn/src/org/sbgn/SbgnUtil.java#L186). Usually this should not be an issue.
If there is a problem with color preservation I would like to fix it. The problem might be with gradient colors though - we don't support it and they might be translated to something unexpected. Another issue might be with export to sbml - I'm gradually add support for some functionalities and compartment color support might not be there yet... If compartment color support is an issue I will fix it in the next major release.
Could you please give send me small examples where the color is not preserved (together with transformed sbml/sbgnml files)
Hi @piotr-gawron.
In Newt, the gradient color schemes are actually achieved via background images rather than color. The fill-color values of the nodes are white and borders are black.
Github won't let me upload sbml files but here is the file (as in the example screenshot), exported as SBML, as a .txt file instead: example.sbml.txt
I can't explicitly see the SBGNML file as it is converted but here it is when I export the imported file from Newt: example.sbgn.txt
Here is the original map file exported as SBGN-ML by Newt (no conversions): original.sbgn.txt
There are some added color values in the converted version. Might be some sort of format mismatch maybe? I'm not quite sure though.
I'm merging this now since the connection issue is resolved. The conversation can continue here.
This MR fixes problem with sbml-sbgnml conversion using minerva API.
I also added tests and bundled everything in the CI travis job so if the problem reappear it will be easier to spot. The tests are running in headless chrome, so it also checks against any CORS related issues that might happen.