pantherdb / fullgo_paint_update

Update of Panther and PAINT DBs with monthly GO release data
0 stars 0 forks source link

Fix handling of obsoleted terms #37

Closed dustine32 closed 4 years ago

dustine32 commented 5 years ago

Example discovered by @pgaudet. I found like four things wrong with the update queries handling obsoleted terms:

  1. Term obsolescence date isn't parsed from the ontology correctly so it's always set to today's date
  2. Obsoleting the PAINT annotations to the obsolete term for some reason sets the annotation's obsolescence date to be the term's obsolescence date.
  3. Same query in 2 doesn't check to see if annotation is already obsolete so every update resets the date for all annotations ever annotated to any obsolete term.
  4. The "[term] is obsoleted and no replaced term, so the annotion to [PTN####] is obsolted" comment query doesn't even check ANY date so the comment is also repeatedly added every update. You can see this same message repeated:
    2018-08-23: GO:0001129 is obsoleted and no replaced term, so the annotion to PTN000028884 is obsolted.
    2018-09-28: GO:0001129 is obsoleted and no replaced term, so the annotion to PTN000028884 is obsolted.
    2018-10-30: GO:0001129 is obsoleted and no replaced term, so the annotion to PTN000028884 is obsolted.
    2018-11-30: GO:0001129 is obsoleted and no replaced term, so the annotion to PTN000028884 is obsolted.
    2018-12-31: GO:0001129 is obsoleted and no replaced term, so the annotion to PTN000028884 is obsolted.
    2019-01-31: GO:0001129 is obsoleted and no replaced term, so the annotion to PTN000028884 is obsolted.
    2019-03-29: GO:0001129 is obsoleted and no replaced term, so the annotion to PTN000028884 is obsolted.
    2019-07-23: GO:0001129 is obsoleted and no replaced term, so the annotion to PTN000028884 is obsolted.

    Will fix and test. This example is in PTHR10252.

pgaudet commented 5 years ago

Thanks Dustin ! While you're at it, can you fix the typo 'obsolted' -> obsoleted

Thanks !

Pascale

dustine32 commented 5 years ago

@pgaudet Sure thing about the typo(s)!

dustine32 commented 5 years ago

https://github.com/pantherdb/fullgo_paint_update/commit/bb2063cc3b271038cea5fa0c9f9fdf834f14f4da addresses some things related to item 1 above:

dustine32 commented 5 years ago

Above commits https://github.com/pantherdb/fullgo_paint_update/commit/237194bd08cae3995bf8ea2a62537f3a553ffc01 and https://github.com/pantherdb/fullgo_paint_update/commit/78d2c9a051953db3f7604184572e7f0127da1783 should fix items 2-4 as well as the typos mentioned by @pgaudet .