Closed luciansmith closed 3 years ago
If we end up adding 'termName' cf https://github.com/SED-ML/sed-ml/issues/164, we can automatically set that, too.
https://stackoverflow.com/questions/39022787/error-non-aggregate-type-vectorint-cannot-be-initialized-with-an-initialize/39022883 claims that to get this to build on a mac, we need to tell it to use c++11 or higher, passing it the flag
-std=c++11
However, I don't know how the build system is set up to do this.
@luciansmith so it does compile now, but I'm not entirely happy with it,
If we already have such a map, i'd have preferred a structure, that would allow to find relationships between kisao elements, perhaps even the description of them. Even with the current setup, I would have hoped for a static method, that would allow to retrieve the name given an id, that is then being exported (so it could be used as function from outside), rather than on every use having to go for an external member. That way people could with one call add the name later on (if they so chose), rather than it happening automatically.
and i'll merge it, since you obviously need it lets see how it goes. I'll leave the branch around if you want to make more commits to it. I'll make a new release with the analysis class and this in it, so you can try it out yourself.
I'm more than happy to do this a different way; this seemed relatively simple for now.
All the other information is present in KISAO.csv, so we can pull it out from there if you like. We could even pull in a proper OWL parser, but I decided to do it this way so as to not introduce another dependency.
I dont think we want a full owl parser in libsedml. lets see how it goes and what if any feedback we get.
The KISAO.csv file was taken from https://bioportal.bioontology.org/ontologies/KISAO and will need to be updated periodically. When you do, run the python script to recreate the kisaomap.cpp file.
If the name was already set, don't overwrite it.