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

WBM60 strain causes search to fail even though the strain exists. #324

Closed
Paul-Davis opened this issue Feb 25, 2021 · 10 comments
Closed

WBM60 strain causes search to fail even though the strain exists. #324

Paul-Davis opened this issue Feb 25, 2021 · 10 comments
Assignees
Labels
bug Something isn't working UX Issue with user interaction with application

Comments

@Paul-Davis
Copy link

I believe that this is caused by the autocomplete "hack"/Edit where if the search string starts with WB but has less than ?7 characters then the search does not kick in correctly?

WBM60 - WBStrain00040333

The autocomplete work around was put in place to stop returning every Variation/Strain/Gene as the user typed. I thought that this was exclusively for the UI end points but it seems the perl API also uses it?

@Paul-Davis Paul-Davis added bug Something isn't working UX Issue with user interaction with application labels Feb 25, 2021
@Paul-Davis
Copy link
Author

WBM60_not_found
WBM60_found

@Paul-Davis
Copy link
Author

Paul-Davis commented Feb 25, 2021

Example perl script query:

acedb3:cat WBM60.in 
WBM60
 
acedb3: perl $CVS_DIR/GENEACE/show_NS_ids.pl -in WBM60.in -out WBM60.out -debug pad -species elegans -domain Strain
 
acedb3: less WBM60.out
//Cannot find WBM60

@tuli
Copy link

tuli commented Feb 26, 2021 via email

@Paul-Davis
Copy link
Author

@tuli as it's github you probably need to login and leave all the repos you signed up to as I don't believe anyone in WB can just kick you?

P

@Paul-Davis
Copy link
Author

@tuli if you go to your profile you can leave the WormBase organisation which will remove you from all WB repos. You can probably resolve it faster for yourself as it's only just gone 3:30AM for Todd and he's the only person who can do it.

@tuli
Copy link

tuli commented Feb 26, 2021 via email

@mluypaert
Copy link
Member

@Paul-Davis Your guess was correct, search for this particular strain fails because of its resemblance to wormbase IDs (identified by the API as WB[a-zA-Z]+(\d+)) and a filter blocking searches for IDs when less than 7 digits are provided. However, this filter is present both in the UI and in the API itself, causing the perl script to fail as well.

FYI: the API returns an error message that indicates this when queried directly:

$ curl --no-progress-meter -X "GET" -H "Authorization: Token $WB_API_KEY" -H "Accept: application/json" 'https://names.wormbase.org/api/entity/strain?pattern=WBM60' | jq .
{
  "matches": [],
  "message": "Identifier must contain at least 7 digits (received 2)."
}

@mluypaert
Copy link
Member

Fix implemented, searching for WB-ID-like patterns with < 7 digits will now result in the return of exact matches only (with a warning message) by the API, rather than no matches at all. Autocomplete will still not return anything. Release and deployment still to be done, combined with #304

@mluypaert
Copy link
Member

@sdiamantakis A fix for this has now been deployed to production. Searching for WB-ID-like patterns will now return results when the pattern has an exact match on the database, or if the search pattern has 7 or more digits (like WBStrain0001234) in which case it will return partial matches as well. This behavior is implemented identically for both API and UI.

@sdiamantakis
Copy link

Epic! Thanks @mluypaert !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working UX Issue with user interaction with application
Projects
None yet
Development

No branches or pull requests

4 participants