Skip to content

Add cluster assignment capabilities as BitBirch public methods and to the cli #66

Description

@IgnacioJPickering

The idea here is that it should be possible, given an incoming query molecule(s),
do two kinds of assignment:

  • Minimum similarity over all BitBirch leaf clusters
  • "greedy" assignment by sending the molecule through the BitBirch tree using the threshold, but without actually appending to any clusters.

cli should be something like bb assign --tree ./bitbirch.pkl --strategy=greedy|min-tanimoto 'CC(=O)' and output a cluster index, with --strategy=min-tanimoto being the safe default.
We should also support passing *.smi files and *.npy fingerprint files for assignment.
This requires also adding the option of saving the full bitbirch trees after fitting, which the cli currently does not have. In python this is simple to do. For now I think we can do pickle, that would be fine.

In terms of the python API, maybe BitBirch.assign(self, queries: str | list[str] | NDArray[np.integer], *, strategy: str = "min-tanimoto") -> int: would be fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions