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

Database identifiers should be sorted by closest match #97

Open
DeniseSl22 opened this issue May 1, 2019 · 0 comments
Open

Database identifiers should be sorted by closest match #97

DeniseSl22 opened this issue May 1, 2019 · 0 comments

Comments

@DeniseSl22
Copy link
Contributor

This issue has been raised in the PathVisio issue tracker by @egonw , but @mkutmon and me agree that it belongs here.

Currently, the class freeAttributeSearch is used in PV (which is a BridgeDb class) to search for free text (names of genes/proteins/compounds) in the locally loaded BridgeDb mapping files. There doesn't seem to be a good sorting of results (for example, looking for "TP53" first gives some names that are longer (but contain the phrase TP53), before the 'TP53' only string is given. This also happens for metabolites (see issue on PV). @ariutta suggested: " You could use Levenshtein distance."

This sorting should then happen in the results produced by the freeAttributeSearch (and will then automatically be displayed in that order by PV). Some example code on how to build your own custom comparator and one using the Levenshtein distance.

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

1 participant