-
Notifications
You must be signed in to change notification settings - Fork 2
Description
At present, OddsPaths values are stored in the data model with their equivalent score range. This was probably the wrong decision for a couple of reasons:
- It isn't guaranteed a set of ranges will have only one normal and/or abnormal range, and OddsPaths values are calculated from the combination of ranges.
- OddsPaths are sometimes given without ranges, such as when we have classifications given at the variant level (see Data Model for Associating Calibrations with Individual Variants #502, and note that consistency with this feature should be kept in mind).
Given these constraints, we should evaluate treating OddsPaths as separate from range information. The way I envision this, a set of Brnich style functional ranges might have a ranges property that behaves as it does now, as well as an oddsPaths property that stores OddsPaths information. This object could have the following structure:
...
class OddsRatio(BaseClass):
ratio: float
evidence: Optional[Literal[PS3_SUPPORTING, ..., BS3_STRONG]]
class OddsPaths(BaseClass):
oddsPathNormal: Optional[OddsRatio]
oddsPathAbnormal: Optional[OddsRatio]
source: list[PublicationIdentifierCreate]
...Investigators would then supply these odds paths at time of upload, and they could be associated with a score range objects that has its ranges property set to an empty list. Note that we should validate the ratio is not smaller than 0. After making the requisite edits to the internal data model, we should:
- Migrate existing OddsPaths
- Ingest additional OddsPaths which have no associated (see Load new pillar project ranges and OddsPaths., #513 for more information on these data sets)
- Update the UI to display the new model
- Allow investigators to submit the new OddsPaths model through the UI