Skip to content

Commit 4a431d6

Browse files
committed
fix: skip multi-variant ClinGen allele IDs in refresh_clinvar_variants
1 parent c778fa8 commit 4a431d6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/mavedb/scripts/refresh_clinvar_variant_data.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ def refresh_clinvar_variants(db: Session, month: Optional[str], year: str, urns:
105105
if total_variants_with_clingen_ids > 0 and index % (max(total_variants_with_clingen_ids // 100, 1)) == 0:
106106
logger.info(f"Progress: {index / total_variants_with_clingen_ids:.0%}")
107107

108+
if "," in clingen_id:
109+
logger.debug("Detected a multi-variant ClinGen allele ID, skipping.")
110+
continue
111+
108112
# Guaranteed based on our query filters.
109113
clingen_data = query_clingen_allele_api(clingen_id) # type: ignore
110114
clinvar_allele_id = clingen_data.get("externalRecords", {}).get("ClinVarAlleles", [{}])[0].get("alleleId")

0 commit comments

Comments
 (0)