Skip to content

Commit

Permalink
remove rsID check in CatalogScoreVariant model
Browse files Browse the repository at this point in the history
  • Loading branch information
nebfield committed Oct 28, 2024
1 parent 383734c commit f570666
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
2 changes: 1 addition & 1 deletion pgscatalog.core/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pgscatalog.core"
version = "0.3.2"
version = "0.3.3"
description = "Core tools for working with polygenic scores (PGS) and the PGS Catalog"
license = "Apache-2.0"
authors = ["Benjamin Wingfield <[email protected]>", "Samuel Lambert <[email protected]>", "Laurent Gil <[email protected]>"]
Expand Down
18 changes: 0 additions & 18 deletions pgscatalog.core/src/pgscatalog/core/lib/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,24 +555,6 @@ def set_missing_rsid(cls, rsid: Optional[str]) -> Optional[str]:

return rsid

@model_validator(mode="after")
def check_rsid_format(self) -> Self:
if self.is_hm_bad or self.hm_source == "liftover":
# disable this check when harmonisation fails
# variants that have been harmonised by liftover will put coordinates in rsID column
return self

for x in (self.rsID, self.hm_rsID):
if not (
x is None
or x.startswith("rs")
or x.startswith("ss")
or x.startswith("HLA")
):
raise ValueError("rsid field must start with rs or ss or HLA")

return self

@field_validator(
"effect_weight",
"dosage_0_weight",
Expand Down

0 comments on commit f570666

Please sign in to comment.