Skip to content

MG-1093: Extend Model AD DE ui_config to support parent/child config - #398

Draft
JessterB wants to merge 4 commits into
devfrom
jbritton/MG-1093
Draft

JessterB wants to merge 4 commits into
devfrom
jbritton/MG-1093

Conversation

@JessterB

@JessterB JessterB commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Problem

The Differential Expression CT is being extended to support both RNA and Protein evidence types. This introduces additional complexity, as we now need to map user-specified pinned item lists between CT views that have slightly different data models, and rows that have a 1:many relationship. We've solved this problem before in Agora's GCT, but not in a generic way.

Solution

To support pinned item caching and translation across generic CT views, we are adopting the approach outlined in the parent/child design doc, which is built on top of the generic pin all design doc:

This design requires four new optional view-level ui_config properties:

  • row_id_data_key: the name of the parent view field used as the unique row identifier (can be generated by the API server)
  • parent_id_data_key: the name of the child view field used as the unique row identifier (ditto)
  • view_noun: An object specifying the singular and plural display label nouns used for the current view (e.g. gene/genes or protein/proteins)
  • parent_noun: An object specifying the singular and plural display label nouns used by the parent view

This PR introduces support for those new optional parameters to the Model AD Explorer ui_config notebook, and leverages them to:

  • Set the required target values for RNA and Protein DE views to enable parent-child pin translation
  • Set the optional display noun for both Model Overview CTs to specify only the display label noun
  • Does not set the optional display noun for Disease Correlation, we expect the default display label

A new version of ui_config is in synapse: syn66527739.44

TODO: Update Agora and QTL notebooks to support view_noun?

@sonarqubecloud

sonarqubecloud Bot commented Sep 9, 2026

Copy link
Copy Markdown

@JessterB JessterB changed the title MG-1093: Extend model ad DE ui_config to support parent/child config MG-1093: Extend Model AD DE ui_config to support parent/child config Sep 9, 2026

@jaclynbeck-sage jaclynbeck-sage left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but I have a question about the parent ID naming scheme (see comment).


# Parent/child row_ids
protein_de_row_id_data_key <- "composite_id"
protein_de_parent_id_data_key <- "rna_composite_id"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is labeled protein data key but the value is "rna_composite_id"? Actually in general I am confused by the naming scheme between rna/protein row_id/parent_id keys.

The parent for RNA is just "composite_id" but the parent for protein is "rna_composite_id" -- are these supposed to be different or the same?

I tried reading the design doc, but this section is using gene_id as the parent for all 3 data types, and the row_id values have the data type in them, so that didn't clarify anything for me.

If the values in this notebook are correct, then this section needs comments explaining what's going on.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, I didn't realize this was a draft. I could swear I checked :(

@JessterB JessterB Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the DE CT, the API layer will generate these composite keys & inject them into the rna_de_aggregate or protein_de_aggregate data payloads. However, if there is a natural field in the data that can be used as the a unique row identifier, we can reference that field directly.

In the case of the DE CT, we don't have a natural unique row ID so the API will generate the required field(s) per collection, and inject them into the response.

  • The RNA view only needs it's own row key; since it doesn't have a parent, the parent row ID is set to reference the same data field as the current view row ID. [It could also be null, but the devs chose this approach.]

rna_de_aggregate (API version)

  {
    "ensembl_gene_id": "ENSMUSG00000000001",
    "gene_symbol": "Gnai3",
   "row_id_data_key": "<generated value based on ens + model + sex >",
   "parent_row_id_data_key": "<same as above>",
   ...
  }
  • The protein view needs both row keys, so the API server adds them into that payload:
  {
    "ensembl_gene_id": "ENSMUSG00000000001",
    "gene_symbol": "Gnai3",
    "uniprotid": "P99910",
    "unique_id": "ENSMUSG00000000001P99910",
    "display_symbol": "Gnai3 (P99910)",
   "row_id_data_key": " <generated value based on ens + uniprot +  model + sex >",
   "parent_row_id_data_key": "<generated value based on ens + model + sex >",
   ...
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants