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

Add option to metabolite full text search results to only return metabolites with concentration data #86

Open
jonrkarr opened this issue May 23, 2020 · 2 comments
Labels
enhancement New feature or request future

Comments

@jonrkarr
Copy link
Member

jonrkarr commented May 23, 2020

Example:

If there's no data, shouldn't this be excluded from the full-text search results?

@jonrkarr jonrkarr added the bug Something isn't working label May 23, 2020
@lzy7071
Copy link
Contributor

lzy7071 commented May 23, 2020

Did you mean /ftx/text_search/num_of_index/ or /metabolites/concentrations/similar_compounds/?

  • With regards to /ftx/text_search/num_of_index/, it should return results regardless of if the metabolite itself contains concentration information or not precisely because of the function offered by /metabolites/concentrations/similar_compounds/ endpoint. An abstract example would be if a user searches for glucose, for which we don't have concentration information. However, we do have concentration information for fructose, and presumably fructose is structually similar to glucose. If we filtered out glucose at the full-text stage, the user would not have seen glucose in the intermediate stage under Metabolites, which could lead the user to believe we have absolutely no information, including various meta info, on glucose. It would also remove the possibility for the user to choose concentration information from the structually similar compound, fructose

  • With regards to /metabolites/concentrations/similar_compounds/. https://api.datanator.info/metabolites/concentrations/similar_compounds/?inchikey=BJHIKXHVCXFQLS-UYFOZJQFSA-N&threshold=0.6&taxon_distance=false returns an empty array because none of the similar compounds, including the compound itself (BJHIKXHVCXFQLS-UYFOZJQFSA-N), within the tanimoto threshold value have concentration information. But it cannot be known at the full-text search stage. It was originally conceived that the threshold value is user defined, which isn't done until the metabolite-specific page.

@jonrkarr jonrkarr added enhancement New feature or request future and removed bug Something isn't working labels May 24, 2020
@jonrkarr
Copy link
Member Author

This is similar to #89. Upon further reflection, I think its useful for Datanator to explicitly communicate to users that we do not have relevant data about a metabolite.

After we finish debugging, we can add an option to the full text search and UI to only return results that have data.

@jonrkarr jonrkarr changed the title Metabolite full text search results include metabolites with no concentration data Add option to metabolite full text search results to only return metabolites with concentration data May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request future
Projects
None yet
Development

No branches or pull requests

2 participants