Conversation
|
jaclynbeck-sage
left a comment
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Oh sorry, I didn't realize this was a draft. I could swear I checked :(
There was a problem hiding this comment.
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 >",
...
}
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 viewThis PR introduces support for those new optional parameters to the Model AD Explorer ui_config notebook, and leverages them to:
A new version of ui_config is in synapse: syn66527739.44
TODO: Update Agora and QTL notebooks to support view_noun?