Open susannasiebert opened 1 month ago
Some more technical details:
app/jobs/update_entrez_symbols.rb
which in turn calls out to app/lib/importer/entrez_symbols.rb
. The first file notes the FTP path to the entrez file that we download and use for populating/updating the gene table. Entrez entries that are no longer used are no longer in that file so app/lib/importer/entrez_symbols.rb needs to keep track of civic gene entries that were processed and the ones that weren't processed after fully processing the file, need to be deprecated.feature
, civic bot as the deprecating_user
, and the organization_id
being nil. Civic bot is an actual user entry and the correct entry can be retrieved via the user ID constant (CIVICBOT_USER_ID
) that is being kept in app/model/constants.rb. The note
can be a sentence describing why the gene was deprecated. If possible, try to note which gene feature it has been replaced by, if we can figure out that part.https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=gene&id=122152363
(where 122152363
is the entrez ID of the deprecated version of SMIM44
) returns 122405565
as a current-id
entry. So it looks like you could use this API to find out the entrez ID of the "active" gene and use that to in turn retrieve it's CIViC gene feature entry to mention in the activity note. #FID<civic_feature_idis the format we use to display feature entity tags in a notes and comment in the frontend. So the note could say something like
The gene was replaced with Entrez gene 122405565 (#FID61361)`mode
(?) that is either flag_variants
or deprecate_variants
and have the activity do the appropriate action depending on the mode.Once gene deprecation is enabled via the above there are a few additional things to do:
Entrez sometimes moves genes to a different/new entrez ID: E.g. SMIM44 (entrez ID 122152363) has been replaced with entrez ID 122405565. We currently have both in the database but they should probably be handled in a way that the replaced gene can no longer be used.
We should have CIViCbot handle these - deprecate the gene feature entry and remove deprecated gene features from the typeahead. ~Add comment to the gene feature to explain why it was deprecated. If possible, try to note which gene feature it has been replaced by.~
We should also flag variants (or evidence) under the gene feature that was deprecated.