nf-osi / nfportalutils

Utilities for NF Portal project and data management
https://nf-osi.github.io/nfportalutils/
MIT License
2 stars 2 forks source link

Feat/view fix #134

Closed anngvu closed 11 months ago

anngvu commented 11 months ago

For really relevant context, review PLFM-4862 and PLFM-5869. The discussions there explain:

The more recent issue that brought this up again is https://github.com/nf-osi/dcc-site/issues/669, so figured we can just take stab at this. Useful for:

To see what this looks like in action:

library(nfportalutils)
syn_login(Sys.getenv("SYNAPSE_AUTH_TOKEN"))

# Broken view with three adjustments needed
test_view <- "syn28499567"
adjust_view(test_view)

# After fixing, reset back to the broken schema model
schema <- .syn$get(test_view)
schema <- swap_col(schema, old = "82416", new = "110715") # back to assay with too small size 15
schema <- swap_col(schema, old = "185618", new = "200178") # back to contentType with with too small size 2
schema <- swap_col(schema, old = "200109", new = "200114") # back to tumorType with too small list len 2
allaway commented 11 months ago

Hi @anngvu , neat idea! I'll take a look at the code now. Just as an FYI we recently reopened one of the several old Jira issues about this: https://sagebionetworks.jira.com/browse/PLFM-5346 (a different one than what you linked), so it's possible we might get some Synapse side fix or tools that we could use in the future.

allaway commented 11 months ago

Code and test LGTM, thanks!