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

add basic support for tracking gene type (not exposed anywhere) #638

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

ppavlidis
Copy link
Collaborator

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.

@arteymix
Copy link
Member

Is it possible to use an enumerated type for this? It will be exposed in the RESTful API as a string field otherwise.

@ppavlidis
Copy link
Collaborator Author

The underlying NCBIGeneInfo.GeneType could be used or a new type made if that's better.

@arteymix
Copy link
Member

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.

@arteymix
Copy link
Member

arteymix commented Apr 12, 2023

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>

@ppavlidis
Copy link
Collaborator Author

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.

@ppavlidis
Copy link
Collaborator Author

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>

Yes that is the right solution

@arteymix
Copy link
Member

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.

Agree here too. We can add an extra OTHER type to match unsupported NCBI gene types.

@arteymix arteymix added this to the 1.30.0 milestone Apr 21, 2023
@arteymix arteymix removed this from the 1.30.0 milestone May 16, 2023
@arteymix arteymix added this to the 1.31.0 milestone Jun 6, 2023
@arteymix arteymix force-pushed the development branch 2 times, most recently from 84692c7 to e0ec3da Compare December 4, 2023 19:58
@arteymix arteymix modified the milestones: 1.31.0, 1.32.0 Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants