IGS / gEAR

The gEAR Portal was created as a data archive and viewer for gene expression data including microarrays, bulk RNA-Seq, single-cell RNA-Seq and more.
https://umgear.org
GNU Affero General Public License v3.0
10 stars 5 forks source link

V2 - Allow dataset to be added to a layout multiple times #687

Open adkinsrs opened 4 weeks ago

adkinsrs commented 4 weeks ago

This has been a longstanding request and previously users have addressed this by cloning a dataset upload for the sole purpose of changing to a different default display for the cloned dataset.

The idea is to modify the layout_members table and client/server side code to accept multiple datasets in a single layout. This will require, in my opinion, some extensive modifications.

(I also apologize if I use "layout" and "collection" interchangeably)

These are just some thoughts I had around switching over to a layout (collection) format that allows a dataset to appear multiple times. Overall, while it's a "need-to-have", I think there are some logistical hurdles we need to discuss before diving head-first into this, as simply changing the table has widespread ramifications on default displays, filtering single and multigene displays, and any code that relies on those and layout member information.

adkinsrs commented 3 weeks ago

@jorvis and I had a chat about this and came to a couple of conclusions

adkinsrs commented 3 weeks ago

TODO:

  1. Create a new database table to serve as a temp layout_members using the display ID
  2. On the original layout_members table, if the "multigene" columns have not been added, we need to add them. The conversion script I wrote to migrate from layout_members to layout_displays assumes they exist. This way we can also apply a "legacy mode" update to the new layout_displays table if the single- and multigene layout displays have entries that resemble the original layout_members table (only width, no height and starting row and column)
  3. Write script to populate new temp layout_members table using the old one. Convert dataset ID into their default single and multigene display ID. If a multigene curation does not exist, just do not include, since single-gene and multi-gene collections can be different sizes.
  4. Backup db and wipe old table
  5. Modify geardb.py code and CGI code that uses layouts
adkinsrs commented 2 weeks ago

To ease transition while I rewrite this, I converted the old layout members into a display-based one found in a new table called "layout_displays". Then I plan on adding a LayoutDisplay class in geardb.py and change/link all the calls to the LayoutMember to the new class (and table references everywhere too)