bridgedb / bridgedb/BridgeDb

Database identifiers should be sorted by closest match

Open
#97 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
37
Forks
22
PR merge metrics
No merged PRs in 30d

Description

This issue has been raised in the [PathVisio issue tracker](https://github.com/PathVisio/pathvisio/issues/89) 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](https://stackoverflow.com/questions/2784514/sort-arraylist-of-custom-objects-by-property) and one using the [Levenshtein distance](https://www.sanfoundry.com/java-program-implement-levenshtein-distance-computing-algorithm/).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.