-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/devsu 2518 add multivariant statement loading #405
base: develop
Are you sure you want to change the base?
Feature/devsu 2518 add multivariant statement loading #405
Conversation
…feature/DEVSU-2518-add-multivariant-statement-loading
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #405 +/- ##
===========================================
+ Coverage 76.89% 76.96% +0.07%
===========================================
Files 179 180 +1
Lines 6076 6113 +37
Branches 725 734 +9
===========================================
+ Hits 4672 4705 +33
- Misses 1328 1331 +3
- Partials 76 77 +1 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
} | ||
] | ||
} | ||
], | ||
"kbMatches": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that each kbMatches record is a 1-1-1 relationship between the observed variant (variant & variantType), a gkb statement (kbStatementId), and the variant it match to in that statement's conditions (kbVariantId). So 1 record for each of these combinations, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment it's possible to do a 1-many relationship with one kbmatch to many kbstatements, in this section. That functionality is not removed in this pr, it just adds the ability to load in the inverse way (1-many with one kbstatement to many kbmatches).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant for a sigle kbMatches record. Are you talking about the capability to create multiple records using the same observed variant but linked to different kbStatementId?
"variantType": "mut", | ||
"kbVariantId": "#999:9999" | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is kbMatchedStatements only for fully-matched statements? And kbMatchedStatements.kbMatches an array where each element correspond to an element in kbMatches?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each element in the kbmatch array will be created as a new kbmatch record in the db. It doesn't have to be defined anywhere else in the json (except the observed variant of course).
"kbVariant": "APC frameshift mutation", | ||
"variant": "a12458ff7c8eb865656fd61f670cd0d5", | ||
"variantType": "mut", | ||
"kbVariantId": "#161:769", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Further down (line 391 and others), kbStatementId is assigned a long description; I suppose it's meant to be an RID now?
for (const createStatement of statementData) { | ||
const [statement] = await db.models.kbMatchedStatements.findOrCreate({ | ||
where: { | ||
// TODO revert this test change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this still a todo for future tickets @elewis2?
Adds report uploading functionality: report json can now include a section 'kbStatements', each of which can contain an array of kbmatches. During loading associations are created between each match in this array, and the parent statement.
Prevents associations being created between kbmatches and kbstatements that are not explicitly associated, in the kbmatches section.