Refactor ColumnVEPField to be simpler data structures
- Dominant language
- Python
- Stars
- 30
- Forks
- 3
- Avg merge
- 9h 28m
- Merged PRs (30d)
- 42
Description
Now that we have T2T the combinatorial explosion of different builds is starting to bite
Instead of creating multiple entries in the DB, we could have eg ```genome_build = [ "GRCh37", "GRCh38"]``` etc - can do more with JSON than
This is not the final form, but useful to see how much you can remove
```
records = ColumnVEPField.objects.all().order_by("variant_grid_column").values()
cleaned_data = defaultdict(list)
for r in records:
data = {k:v for k,v in r.items() if v is not None}
del data["id"]
if data.get("source_field_has_custom_prefix") is False:
del data["source_field_has_custom_prefix"]
del data["column"]
vgc = data.pop("variant_grid_column_id")
data["variant_grid_column"] = vgc
sf = data.pop("source_field")
cleaned_data[sf].append(data)
```
A few strange things:
Mastermind_counts is processed 3 times (and stored in different fields)
gnomAD_SV_AF is copied to both gnomad_sv_overlap_af and gnomad_sv_overlap_af
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.