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

Direct links - exact match #448

Open
boriskovar-m2ms opened this issue Oct 30, 2020 · 7 comments
Open

Direct links - exact match #448

boriskovar-m2ms opened this issue Oct 30, 2020 · 7 comments
Assignees
Labels

Comments

@boriskovar-m2ms
Copy link
Collaborator

boriskovar-m2ms commented Oct 30, 2020

Currently direct links works in a way that toggles are applied when molecule name provided in the URL is substring of the molecule name (protein_code) in the data. This behavior is fine but we need also option for exact match. In this case the name of the molecule in the URL must exactly (sort of... on that later) match the name of the molecule (protein_code) in the data and the toggles are applied only on these exact matches. Protein_code has structure targetName-moleculeName and exact match must only match the moleculeName part of the protein_code.
Currently the example URL is http://localhost:8080/viewer/react/preview/direct/target/Mpro/mols/X0426_0/L/P/S/X2608/L/P - this is current behavior which shall remain unchanged.
If we want only exact matches we should use URL in this format: http://localhost:8080/viewer/react/preview/direct/target/Mpro/mols/X0426_0/exact/L/P/S/X2608/exact/L/P - in this case we are searching exactly for molecules X0426_0 and X2608.
If we want to search exactly for X2608 and all molecules which contains X0426_0 as a substring then the URL should look like thise: http://localhost:8080/viewer/react/preview/direct/target/Mpro/mols/X0426_0/L/P/S/X2608/exact/L/P

NOTE: This task is expansion of #431 (with bug fix in #447 ) - both deployed in production therefore merged in the master

@ag-m2ms
Copy link
Collaborator

ag-m2ms commented Nov 5, 2020

Solution in #448

@teriraj
Copy link
Collaborator

teriraj commented Nov 6, 2020

@ag-m2ms
Copy link
Collaborator

ag-m2ms commented Nov 6, 2020

Should be fixed

@teriraj
Copy link
Collaborator

teriraj commented Nov 9, 2020

It works correctly.

boriskovar-m2ms added a commit that referenced this issue Nov 9, 2020
boriskovar-m2ms added a commit that referenced this issue Nov 9, 2020
#448 - direct links - exact match
@phraenquex
Copy link
Collaborator

Not sure this works.

This ought to show something, but it doesn't:
https://fragalysis.apps.xchem.diamond.ac.uk/viewer/react/preview/direct/target/Mpro/mols/AAR-POS-d2a4d1df-2/exact/L

Without /exact, it brings up everything as expected:
https://fragalysis.apps.xchem.diamond.ac.uk/viewer/react/preview/direct/target/Mpro/mols/AAR-POS-d2a4d1df-2/L

(But no longer has duplicates! So #499 is fixed, awesome.)

@boriskovar-m2ms
Copy link
Collaborator Author

This is because the exact name is actually x0104A:AAR-POS-d2a4d1df-2. So should we detect and strip the first id before ":"? Or should we treat this name as a two IDs and both these urls: https://fragalysis.apps.xchem.diamond.ac.uk/viewer/react/preview/direct/target/Mpro/mols/AAR-POS-d2a4d1df-2/exact/L and https://fragalysis.apps.xchem.diamond.ac.uk/viewer/react/preview/direct/target/Mpro/mols/x0104A/exact/L will produce same result?

@phraenquex
Copy link
Collaborator

Oh... okay, so the real problem is that the IDs and search had to be hacked earlier this year - thanks, I understand. Let's close this ticket, but worth revisiting when we get reworking the identifiers. (I forget the ticket number.)

@mwinokan mwinokan moved this to In production (Done) in Fragalysis May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

4 participants