mc2-center / mc2-center-dcc

Data coordination resources for CCKP (and MC2 in general)
0 stars 0 forks source link

[feat]: CPO-206 #69

Closed vpchung closed 2 months ago

vpchung commented 2 months ago

Changelog

Preview

I used the following dummy tables for testing the script:

Before update

Screenshot 2024-06-27 at 3 11 02 PM

Expected updates:

After update

Screenshot 2024-06-27 at 3 11 13 PM

All expected updates have been applied.

If --dryrun is enabled

$ python annotations/edit_legacy_annotations.py -u syn61486342 --dryrun   

❗❗❗ WARNING: dryrun is enabled. Results will be saved to CSV instead.
================================================================================

Updating annotations found in table ID: syn61486245
        Checking assay...
        Checking tumorType...
Updating annotations found in table ID: syn61486250
        Checking assay...
        Checking tumorType...

where a sample CSV will look something like this:

name,Publication Assay,Publication Tumor Type,entityId
Verena,"MeDIP, Modeling",Malignant Glioma,syn61486245
Test,Forster Resonance Energy Transfer,Bladder Carcinoma,syn61486245
vpchung commented 2 months ago

@Bankso @aditigopalan OK, I did a couple more test runs and I think it is working as expected.

If y'all can think of any other edge cases we should account for, just lmk! I will merge this in the meantime.

Tagging @aclayton555 for awareness as well.