Check for missing annotation
- Dominant language
- Python
- Stars
- 30
- Forks
- 3
- Avg merge
- 9h 28m
- Merged PRs (30d)
- 42
Description
It's probably due to me deleting lots of annotation manually, but there can be cases where there are gaps in annotation and the annotation scheduler doesn't pick up on it due to the way it's trying to do things quickly
We should have some kind of process that looks for missing annotation, ideally kick it off from annotation pipeline runs page:
**Deleted AnnotationRangeLock**
Looks for variants inbetween annotation range locks - in case one is deleted:
```
variant_qs = Variant.objects.filter(Variant.get_contigs_q(GenomeBuild.grch37()))
prev_max = 0
for arl in AnnotationRangeLock.objects.filter(version=vav).order_by("min_variant"):
print(arl)
num_gap_variants = variant_qs.filter(pk__gt=prev_max, pk__lt=arl.min_variant_id).count()
if num_gap_variants:
print(f"{prev_max} - {arl.min_variant_id} - {num_gap_variants=}")
prev_max = arl.max_variant_id
```
**Missing AnnotationRun for range lock**
```
for arl in AnnotationRangeLock.objects.filter(version=vav):
#print(arl, arl.annotationrun_set.all())
for pipeline_type in VariantAnnotationPipelineType:
if not arl.annotationrun_set.filter(pipeline_type=pipeline_type).exists():
print(f"Warning: {arl} missing {VariantAnnotationPipelineType(pipeline_type).label}")
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.