Skip to content

Commit

Permalink
issue #971 - summary stats for vep 112
Browse files Browse the repository at this point in the history
  • Loading branch information
davmlaw committed Aug 8, 2024
1 parent 82382b3 commit b85823b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 7 deletions.
12 changes: 6 additions & 6 deletions annotation/migrations/0115_one_off_vep_column_fields_vep112.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _one_off_vep_112_summary_stats_fields(apps, schema_editor):
{'column': 'phastcons_30_way_mammalian_max',
'variant_grid_column_id': 'phastcons_30_way_mammalian',
'genome_build_id': 'GRCh38',
'pipeline_type': 'S',
'pipeline_type': None,
'category': 'C',
'source_field': 'max',
'source_field_processing_description': 'max() for indels',
Expand All @@ -50,7 +50,7 @@ def _one_off_vep_112_summary_stats_fields(apps, schema_editor):
{'column': 'phastcons_100_way_vertebrate_max',
'variant_grid_column_id': 'phastcons_100_way_vertebrate',
'genome_build_id': None,
'pipeline_type': 'S',
'pipeline_type': None,
'category': 'C',
'source_field': 'max',
'source_field_processing_description': 'max() for indels',
Expand All @@ -65,7 +65,7 @@ def _one_off_vep_112_summary_stats_fields(apps, schema_editor):
{'column': 'phylop_100_way_vertebrate_max',
'variant_grid_column_id': 'phylop_100_way_vertebrate',
'genome_build_id': None,
'pipeline_type': 'S',
'pipeline_type': None,
'category': 'C',
'source_field': 'max',
'source_field_processing_description': 'max() for indels',
Expand All @@ -80,7 +80,7 @@ def _one_off_vep_112_summary_stats_fields(apps, schema_editor):
{'column': 'phastcons_46_way_mammalian_max',
'variant_grid_column_id': 'phastcons_46_way_mammalian',
'genome_build_id': 'GRCh37',
'pipeline_type': 'S',
'pipeline_type': None,
'category': 'C',
'source_field': 'max',
'source_field_processing_description': 'max() for indels',
Expand All @@ -95,7 +95,7 @@ def _one_off_vep_112_summary_stats_fields(apps, schema_editor):
{'column': 'phylop_46_way_mammalian_max',
'variant_grid_column_id': 'phylop_46_way_mammalian',
'genome_build_id': 'GRCh37',
'pipeline_type': 'S',
'pipeline_type': None,
'category': 'C',
'source_field': 'max',
'source_field_processing_description': 'max() for indels',
Expand All @@ -110,7 +110,7 @@ def _one_off_vep_112_summary_stats_fields(apps, schema_editor):
{'column': 'phylop_30_way_mammalian_max',
'variant_grid_column_id': 'phylop_30_way_mammalian',
'genome_build_id': 'GRCh38',
'pipeline_type': 'S',
'pipeline_type': None,
'category': 'C',
'source_field': 'max',
'source_field_processing_description': 'max() for indels',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 4.2.10 on 2024-08-08 02:28

from django.db import migrations

def _one_off_update_vep_112_conservation_sv(apps, schema_editor):
"""
These were accidentally left as short/standard variant only due to copy/paste
I have modified the migration 0115 - so can delete this if squishing migrations
"""
ColumnVEPField = apps.get_model('annotation', 'ColumnVEPField')
ColumnVEPField.objects.filter(min_vep_version=112).update(pipeline_type=None)


class Migration(migrations.Migration):

dependencies = [
('annotation', '0115_one_off_vep_column_fields_vep112'),
]

operations = [
migrations.RunPython(_one_off_update_vep_112_conservation_sv)
]
3 changes: 2 additions & 1 deletion annotation/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,8 @@ def has_pathogenicity(self) -> bool:

@property
def has_conservation(self) -> bool:
return self.is_standard_annotation
""" Thanks to summary stats we can now do this in VEP112 """
return self.is_standard_annotation or self.version.vep >= 112

@property
def has_splicing(self) -> bool:
Expand Down

0 comments on commit b85823b

Please sign in to comment.