populationgenomics / automated-interpretation-pipeline

Rare Disease variant prioritisation MVP
MIT License
5 stars 4 forks source link

scripted prototype for seqr interactions #153

Closed MattWellie closed 1 year ago

MattWellie commented 1 year ago

Fixes

This is not polished or robust, it's just a proof of concept

Proposed Changes

  1. query metamist for the correct seqr project to use, or die if not found
  2. query seqr for CPGid -> seqr family ID lookup
  3. query seqr for all current flagged variants in the project
  4. digest a set of AIP results
  5. find all results in the AIP set which don't already exist as flags
  6. push each of those flags as a new saved variant

I've played around with this on a local seqr deployment, and tested most of these methods/api calls against that instance. Without an elastic connection it's not been possible to confirm that the pushed tag work perfectly

Not done:

There's some many2many mappings behind the scenes, so the same tag can be shared by 2 families , or a variant can be linked to multiple tags. This is a basic implementation, but there's some slightly more involved syntax that could be used to update/extend existing tags instead of always creating new ones.

Also a fair bit of this logic could be done on the seqr ORM side, but I gave up on that because tracing joins on the backend was giving me a migraine.

Checklist

cassimons commented 1 year ago

Can you retract a 'approve? Too much muscle memory...

MattWellie commented 1 year ago

Closing for now