Skip to content

Comments

fix: do not include n/a clinvar ids in mappings#206

Merged
korikuzma merged 3 commits intomasterfrom
issue-205
Feb 19, 2026
Merged

fix: do not include n/a clinvar ids in mappings#206
korikuzma merged 3 commits intomasterfrom
issue-205

Conversation

@korikuzma
Copy link
Collaborator

close #205

@korikuzma korikuzma self-assigned this Feb 12, 2026
@korikuzma korikuzma added the bug Something isn't working label Feb 12, 2026
@korikuzma
Copy link
Collaborator Author

@susannasiebert and @acoffman

I tried updating the test cache by using the staging API URL, but getting:

╰─$ civicpy update --hard    
WARNING:root:Getting all molecular_profiles. This may take a couple of minutes...
WARNING:root:Getting all genes. This may take a couple of minutes...
WARNING:root:Getting all factors. This may take a couple of minutes...
WARNING:root:Getting all fusions. This may take a couple of minutes...
WARNING:root:Getting all variants. This may take a couple of minutes...
Traceback (most recent call last):
  File "civicpy/.venv/bin/civicpy", line 10, in <module>
    sys.exit(cli())
             ^^^^^
  File "civicpy/.venv/lib/python3.12/site-packages/click/core.py", line 1485, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "civicpy/.venv/lib/python3.12/site-packages/click/core.py", line 1406, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "civicpy/.venv/lib/python3.12/site-packages/click/core.py", line 1873, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "civicpy/.venv/lib/python3.12/site-packages/click/core.py", line 1269, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "civicpy/.venv/lib/python3.12/site-packages/click/core.py", line 824, in invoke
    return callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "civicpy/civicpy/cli.py", line 44, in update
    civic.update_cache(from_remote_cache=soft, local_cache_path=cache_save_path)
  File "civicpy/civicpy/civic.py", line 264, in update_cache
    variants = _get_elements_by_ids("variant", allow_cached=False, get_all=True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "civicpy/civicpy/civic.py", line 1986, in _get_elements_by_ids
    e = _postprocess_response_element(e, element)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "civicpy/civicpy/civic.py", line 2088, in _postprocess_response_element
    raise Exception("Variant type {} not supported yet".format(e["__typename"]))
Exception: Variant type RegionVariant not supported yet

I tried doing a small workaround in 008ce6b to try to ignore region variants.

@susannasiebert
Copy link
Collaborator

If you base your PR off of #204 it should work. However, that would then require this PR to wait to be merged until the above is merged which is currently blocked by region variants going live. We expect regions to go live later this week so maybe that short of a wait is acceptable.

@susannasiebert
Copy link
Collaborator

#204 also resolves the test failures you are seeing which are caused by newer versions of pandas reading in empty fields as numpy NaNs instead of None. #204 updates the dependencies to requires an older version of pandas to prevent this issue from occurring.

@korikuzma
Copy link
Collaborator Author

If you base your PR off of #204 it should work. However, that would then require this PR to wait to be merged until the above is merged which is currently blocked by region variants going live. We expect regions to go live later this week so maybe that short of a wait is acceptable.

Oh perfect! I will convert this to a draft and wait until #204 is merged (didn't think to check open PRs, duh).

@korikuzma korikuzma marked this pull request as draft February 17, 2026 14:14
@susannasiebert
Copy link
Collaborator

@korikuzma I merged in the regions PR and merged main into this PR. So I think it is ready to be reviewed, correct?

Copy link
Collaborator

@susannasiebert susannasiebert left a comment

Choose a reason for hiding this comment

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

+1

@korikuzma korikuzma marked this pull request as ready for review February 19, 2026 15:04
@korikuzma korikuzma merged commit 3efb89e into master Feb 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CivicGksMolecularProfile should ignore ClinVar IDs that are N/A

2 participants