-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# annotation/models/models.py # annotation/vep_annotation.py # classification/migrations/0151_one_off_tier_1_2.py # snpdb/management/commands/one_off_fix_symbolic_variants.py
- Loading branch information
Showing
5 changed files
with
74 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
classification/migrations/0152_allele_origin_confirmed_ekey.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Generated by Django 4.2.11 on 2024-07-31 01:02 | ||
|
||
from django.db import migrations | ||
|
||
|
||
def add_evidence_key(apps, schema_editor): | ||
data = { | ||
"key": "allele_origin_confirmation", | ||
"order": 12, | ||
"evidence_category": "V", | ||
"value_type": "S", | ||
"description": "Paired or follow up testing to confirm allele origin of variant.", | ||
"options": [ | ||
{ | ||
"key": "confirmed", | ||
"index": 1 | ||
}, | ||
{ | ||
"key": "unconfirmed", | ||
"index": 2 | ||
} | ||
], | ||
"copy_consensus": False | ||
} | ||
EvidenceKey = apps.get_model('classification', 'EvidenceKey') | ||
EvidenceKey.objects.get_or_create(key="allele_origin_confirmation", defaults=data) | ||
|
||
|
||
def remove_evidence_key(apps, schema_editor): | ||
EvidenceKey = apps.get_model('classification', 'EvidenceKey') | ||
if ek := EvidenceKey.objects.filter(key="allele_origin_confirmation").first(): | ||
ek.delete() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('classification', '0151_one_off_tier_1_2'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(add_evidence_key, remove_evidence_key) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters