Skip to content

Bugfix: only count known variants#385

Merged
daisieh merged 1 commit intodevelopfrom
daisieh/ignore-errors
Dec 24, 2025
Merged

Bugfix: only count known variants#385
daisieh merged 1 commit intodevelopfrom
daisieh/ignore-errors

Conversation

@daisieh
Copy link
Member

@daisieh daisieh commented Dec 24, 2025

All vcf files will be indexed because the indexer actually looks at the file type of the file itself (line 638 of htsget_operations.py), but if the metadata is wrong, for example, categorizing a vcf file as a transcriptome:

  "metadata": {
    "analysis_attribute": {
      "subtype": "mutation"
    },
    "analysis_type": "sequence_annotation",
    "reference": "hg38"
  },

we can get a key error where the variantfile that was indexed is present in the search hits, but the AnalysisDrsObject is not classed as a variant.

Probably the ideal solution is to prevent this sort of mismatched metadata from getting into the system, but in the meantime this fix prevents an error from being thrown in case something like this happens.

@daisieh daisieh requested a review from mshadbolt December 24, 2025 19:25
Copy link
Contributor

@mshadbolt mshadbolt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@daisieh daisieh merged commit 39ea458 into develop Dec 24, 2025
1 check passed
@daisieh daisieh deleted the daisieh/ignore-errors branch December 24, 2025 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants