EBISPOT / goci

GWAS Catalog Ontology and Curation Infrastructure
Apache License 2.0
26 stars 19 forks source link

EFO_0003761 has obsoletion error #1414

Open ljwh2 opened 4 weeks ago

ljwh2 commented 4 weeks ago

There is an error coming in the obsolete EFO report for EFO_0003761, which was deprecated with replacement in EFO

Please find out what the error is and whether any action is required.

sajo-ebi commented 3 weeks ago

@Ala to look in to it in new sprint

ala-ebi commented 2 weeks ago

Errors for this term because it already exists in our DB, likely added manually by a curator. Both obsolete (EFO_0003761) and replacement (MONDO_0002009) terms have studies and associations, I think we need to move the obsolete EFO's studies and associations to point to the replacement one, while making sure we do not fall into the same issue we encountered last time we did something similar causing some traits to be removed from studies/associations

ljwh2 commented 2 weeks ago

@ala-ebi to create a ticket to handle this scenario in the obsoletion process

ljwh2 commented 1 week ago

Concluded we don't need to handle this automatically at the moment, Ala will address issues manually that arrive in obsoletion report.

ljwh2 commented 1 week ago

Moving the obsolete EFO's studies and associations to point to the replacement one still needs to be done

ala-ebi commented 1 week ago

this is now done, for future reference: here’s what to do to replace an obsolete EFO with the new one that already exists, in Oracle and Mongo:

  1. updates to oracle
    UPDATE STUDY_EFO_TRAIT SET EFO_TRAIT_ID = oracleIdNew WHERE EFO_TRAIT_ID = oracleIdOld;
    UPDATE STUDY_BACKGROUND_EFO_TRAIT SET EFO_TRAIT_ID = oracleIdNew WHERE EFO_TRAIT_ID = oracleIdOld;
    UPDATE ASSOCIATION_EFO_TRAIT SET EFO_TRAIT_ID = oracleIdNew WHERE EFO_TRAIT_ID = oracleIdOld;
    UPDATE ASSOCIATION_BKG_EFO_TRAIT SET EFO_TRAIT_ID = oracleIdNew WHERE EFO_TRAIT_ID = oracleIdOld;
  2. updates to mongo
    db.studies.updateMany(
    { "efoTraits": "mongoIdOld" },
    { $set: { "efoTraits.$[elem]": "mongoIdNew" } },
    { arrayFilters: [ { "elem": "mongoIdOld" } ] }
    )
  3. delete the old efotrait from depo-curation (or mongo)