Open ljwh2 opened 4 weeks ago
@Ala to look in to it in new sprint
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
@ala-ebi to create a ticket to handle this scenario in the obsoletion process
Concluded we don't need to handle this automatically at the moment, Ala will address issues manually that arrive in obsoletion report.
Moving the obsolete EFO's studies and associations to point to the replacement one still needs to be done
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:
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;
db.studies.updateMany(
{ "efoTraits": "mongoIdOld" },
{ $set: { "efoTraits.$[elem]": "mongoIdNew" } },
{ arrayFilters: [ { "elem": "mongoIdOld" } ] }
)
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.