Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

combine_matches fails if no matches matched are found #52

Closed
openpaul opened this issue Aug 24, 2023 · 3 comments
Closed

combine_matches fails if no matches matched are found #52

openpaul opened this issue Aug 24, 2023 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@openpaul
Copy link
Contributor

While learning how to use https://github.com/PGScatalog/pgsc_calc/ I came across the error:

AssertionError: Duplicate IDs in final matches

Thrown by https://github.com/PGScatalog/pgscatalog_utils/blob/main/pgscatalog_utils/match/combine_matches.py#L52

In my case I debugged the input file and found that

max_occurrence == [None]

Clearly the issue is not duplicated IDs but rather no ids. I added a small debug statement and got:

set(matches.collect().get_column("match_status").to_list())

# {'excluded', 'not_best'}

I am not sure what check to add or how such a situation should be handled, but currently the pgsc_calc just crashed quite harshly.

This is related to PGScatalog/pgsc_calc#72 and #36.

I hope this helps making the pipeline more robust.

@smlmbrt
Copy link
Member

smlmbrt commented Aug 24, 2023

Thanks @openpaul, making this check (and all the errors/assertions) more informative & robust is very much on our radar! Quick question: where you running the matching software with a single PGS consisting of a single variant?

@smlmbrt smlmbrt added the bug Something isn't working label Aug 24, 2023
@openpaul
Copy link
Contributor Author

cheers, its already and amazing resource you are building here. I am just learning how to work with snp data, so might have been my input data.

I was not using it though with a single PGS with a single variant. Cant find logs for it anymore, but will update you with the command I ran if I see the bug again.

I think it was triggered as my vcf file was too short, to few variants. But not sure

@nebfield
Copy link
Member

nebfield commented Dec 5, 2023

@nebfield nebfield closed this as completed Dec 5, 2023
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

No branches or pull requests

3 participants