This PR introduces the idea of a backup identifier type to the CompoundResolver. The backup identifier type is an extra identifier that can be returned from services and subsequently used for further lookups.
Having a backup identifier type might be useful when the original input identifier can only be resolved by a small number of services. If possible, the successful services can return the backup identifier type (in addition to the desired output identifier type), and that backup identifier type can be used to call other services.
For example, imagine a compound identifier can be resolved only by PubChem to the desired output of SMILES. If InChi is used as a backup identifier type, then PubChem could also return the InChi of the compound, and another service could confirm that this InChi resolves to the desired SMILES.
A specific example is shown below. Since the original name can only be found using PubChem, the backup identifier type is needed to find the SMILES on CIR and reach the necessary agreement of 2.
This PR introduces the idea of a backup identifier type to the
CompoundResolver
. The backup identifier type is an extra identifier that can be returned from services and subsequently used for further lookups.Having a backup identifier type might be useful when the original input identifier can only be resolved by a small number of services. If possible, the successful services can return the backup identifier type (in addition to the desired output identifier type), and that backup identifier type can be used to call other services.
For example, imagine a compound identifier can be resolved only by PubChem to the desired output of SMILES. If InChi is used as a backup identifier type, then PubChem could also return the InChi of the compound, and another service could confirm that this InChi resolves to the desired SMILES.
A specific example is shown below. Since the original name can only be found using PubChem, the backup identifier type is needed to find the SMILES on CIR and reach the necessary agreement of 2.
Implementation
There are two major changes to the code-base
resolve_one_compound
In the following diagram of the resolution algorithm, the green boxes represent new additions.
To-DO
resolve_one_compound
Related Issues