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

Issue normalizing GO terms #51

Closed
cthoyt opened this issue Jan 6, 2022 · 5 comments
Closed

Issue normalizing GO terms #51

cthoyt opened this issue Jan 6, 2022 · 5 comments
Assignees

Comments

@cthoyt
Copy link
Member

cthoyt commented Jan 6, 2022

The following code currently fails, meaning that I can't run a proper query for HGNC genes for this GO term. Looking into it now...

from indra_cogex.representation import norm_id

assert norm_id("GO", "0032571") == "go:0032571"
@cthoyt cthoyt self-assigned this Jan 6, 2022
@bgyori
Copy link
Member

bgyori commented Jan 6, 2022

I think the expected input is

norm_id("GO", "GO:0032571")

Here the namespace and ID have to correspond to valid INDRA values hence the above.

@cthoyt
Copy link
Member Author

cthoyt commented Jan 6, 2022

either way what comes out is "go:2571", totally crazy

@cthoyt
Copy link
Member Author

cthoyt commented Jan 6, 2022

oh sorry, I misread that. I will check if I fix the input

@cthoyt
Copy link
Member Author

cthoyt commented Jan 6, 2022

False alarm (norm_id("GO", "GO:0032571") does in fact work)! perhaps the normalize function should yell if it gets something unexpected?

@bgyori
Copy link
Member

bgyori commented Jan 6, 2022

That's just because 3 characters corresponding to "GO:" are stripped off by index since the code recognizes that this is a "namespace embedded in ID" situation, which is why this weirdness happens if the embedded prefix is missing.

@cthoyt cthoyt closed this as completed Feb 1, 2022
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

No branches or pull requests

2 participants