-
Notifications
You must be signed in to change notification settings - Fork 6
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
add basic support for tracking gene type (not exposed anywhere) #638
base: development
Are you sure you want to change the base?
Conversation
Is it possible to use an enumerated type for this? It will be exposed in the RESTful API as a string field otherwise. |
The underlying NCBIGeneInfo.GeneType could be used or a new type made if that's better. |
It would be preferable to have our own internal representation that we control for gene type and convert between the two, otherwise we would be at the mercy of NCBI for gene type definitions. |
Well, actually we could relocate the GeneType enum into our models because we parse it from a string supplied by NCBI. We can do a bit of renaming for clarity because the enum names will be stored in the database. The Hibernate mapping is really simple for these: <property name="type">
<column name="TYPE" not-null="false" unique="false" sql-type="VARCHAR(255)"/>
<type name="org.hibernate.type.EnumType">
<param name="enumClass">ubic.gemma.model.common.description.DatabaseType</param>
<param name="useNamed">true</param>
</type>
</property> |
That is our internal representation. It's just part of our model for the NCBI gene info. Our practice has been to not carry stuff like that over directly to our entities. In this case the elements of the enum would be identical to the one we already implemented. |
Yes that is the right solution |
Agree here too. We can add an extra |
84692c7
to
e0ec3da
Compare
As per #64
This should be added as a field to the API and probably displayed on the UI.
Consider making more human-readable but not important.