-
Notifications
You must be signed in to change notification settings - Fork 2
ClinVar Export
At the time of this writing (28-04-2022) all ClinVar export operations need to be triggered manually, and the state of the data will be cached.
Import Models:
Settings per VariantGrid environment.
- mode - 'test' or 'prod' (test will send data to ClinVar in test mode, where ClinVar will just validate it's well formatted but not do anything with the data).
- api_key - not actually used as we use lab's clinvar api keys
- org_id - records submitted will be "behalfOrgID" this org-id. Despite the name the behalf of org is just given "additional submitter" status, and the classification is assigned to the submitting lab.
One or more labs can be assigned a ClinVar Key - this will represent an org within ClinVar.
Glue to tie an allele and a ClinVar key together, can effectively be ignored.
A combination of an allele, ClinVar key and condition.
- classification_candidate - the published Classification version that will inform the data of the ClinVarExport. If there are several classifications for the same key/allele, then the most recent, non-withdrawn record will be picked as the candidate. The candidate will change if the classification is updated, or if a new classification comes along with a more recent curation date. So importantly, if a lab performs re-classifies the same variant as a new classification, the new classification will just be sent to ClinVar as an update of the old.
- scv - the ClinVar identifier for this record. Will be assigned automatically upon submission to ClinVar but can also be assigned pre-emptively if the allele/condition combination had previously been submitted to ClinVar manually or through some other means.
- condition_umbrella - the top level condition that this ClinVarExport will apply to. e.g. if the first time we find a classification for this ClinVarExport it has a condition of MONDO:0019171 familial long QT syndrome That becomes the umbrella. If there's another record for the same key/allele with the condition of MONDO:0013367 long QT syndrome 2 or even if the same record is later given that as a more precise condition, that falls under the same umbrella, so will become part of the same ClinVarExport. The condition umbrella is calculated in MONDO whenever possible, so a condition of OMIM:613688 LONG QT SYNDROME 2; LQT would produce a condition_umbrella of ong QT syndrome 2
- status - The status of the record as it compares to ClinVar. New Submission : not yet in a (not rejected) ClinVarExportBatch Changes Pending : the JSON produced by this ClinVarExport has changed since it was last put into a (not rejected) ClinVarExportBatch. Up To Date : no changes since it was last sent to ClinVarExport In Error : if the JSON we produced is not valid for ClinVar. This can include data that's perfectly fine (a record with multiple conditions uncertain) but just not valid for ClinVar. Most flags will also cause a record to be marked as In Error. Exclude : If the specific Exclude from ClinVar flag has been raised against the candidate record.
It's important to note that when these statuses are in reference to the last (not rejected) ClinVarExportBatch. So if a record is put into an ExportBatch it has gone from New Submission to Up To Date, even though ClinVar has not received this data yet. This is so we can produce multiple pending ExportBatches without risk of us redundantly sending the same data twice.
This is a snapshot of a ClinVarSubmission, specifically focused around the ClinVar formatted JSON. Every time we intend to send a ClinVarExport to ClinVar, a Submission is versioned off. So records that have been sent to ClinVar, then sent again as an update will have multiple Submissions linked off them.
A combination of ClinVarExportSubmissions (though only from ClinVarExport's that share the same ClinVarKey, e.g. you can't submit to multiple keys in the one batch). The batch generates the one large blob of JSON that will be sent to ClinVar. status - The status of the export batch. Typically, Ready to Send, Polling, Submitted, Error.
Command Line
There's a command line function clinvar_export --prepare
which will create new ClinVarExport records and update old ones for all labs that are configured with a ClinVarKey.
Admin page - Allele The same as above but only applies to one allele at a time.
Admin page - ClinVarExport update(), leaving the same classification candidate in place, update the status (based on a change to any flags, or admin level data that's changed, e.g. default affected status)