bblean 0.7.7__tar.gz → 0.7.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bblean-0.7.7 → bblean-0.7.8}/PKG-INFO +1 -1
- {bblean-0.7.7 → bblean-0.7.8}/bblean/_version.py +2 -2
- {bblean-0.7.7 → bblean-0.7.8}/bblean/cli.py +79 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean.egg-info/PKG-INFO +1 -1
- {bblean-0.7.7 → bblean-0.7.8}/.cruft.json +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/.flake8 +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/.github/CODEOWNERS +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/.github/workflows/ci-cpp.yaml +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/.github/workflows/ci.yaml +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/.github/workflows/upload-to-pypi.yaml +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/.gitignore +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/.pre-commit-config.yaml +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/LICENSE +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/LICENSES/BSD-3-Clause.txt +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/LICENSES/GPL-3.0-only.txt +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/README.md +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/__init__.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/_config.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/_console.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/_legacy/__init__.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/_legacy/bb_int64.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/_legacy/bb_uint8.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/_memory.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/_merges.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/_py_similarity.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/_timer.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/analysis.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/bitbirch.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/csrc/README.md +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/csrc/similarity.cpp +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/fingerprints.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/metrics.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/multiround.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/plotting.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/similarity.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/sklearn.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/smiles.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean/utils.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean-demo-v2.gif +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean-demo.cast +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean.egg-info/SOURCES.txt +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean.egg-info/dependency_links.txt +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean.egg-info/entry_points.txt +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean.egg-info/requires.txt +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/bblean.egg-info/top_level.txt +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/_static/api.svg +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/_static/installing.svg +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/_static/logo-dark-bw.svg +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/_static/logo-light-bw.svg +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/_static/publications.svg +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/_static/style.css +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/_static/user-guide.svg +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/_templates/module.rst +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/api-reference.rst +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/conf.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/index.rst +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/installing.rst +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/publications.rst +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/user-guide/linux_memory_setup.rst +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/user-guide/notebooks/bitbirch_best_practices.ipynb +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/user-guide/notebooks/bitbirch_quickstart.ipynb +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/user-guide/parameters.rst +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/docs/src/user-guide.rst +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/environment.yaml +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/examples/best_practices/best_practices_functions.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/examples/best_practices/best_practices_plots.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/examples/best_practices/bitbirch_best_practices.ipynb +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/examples/best_practices/bitbirch_best_practices_RDKit.ipynb +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/examples/best_practices/bitbirch_parameter.ipynb +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/examples/biogen_logS.csv +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/examples/bitbirch_best_practices.ipynb +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/examples/bitbirch_quickstart.ipynb +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/examples/chembl-33-natural-products-subset.smi +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/examples/dataset_splitting.ipynb +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/pyproject.toml +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/setup.cfg +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/setup.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/chembl-sample-3k.smi +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/chembl-sample-bad.smi +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/legacy_merges.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/legacy_metrics.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/test_bb_consistency.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/test_cli.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/test_fake_fps.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/test_fingerprints.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/test_global_clustering.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/test_import_bblean.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/test_merges.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/test_metrics.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/test_multiround.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/test_refine.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/test_regression.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/test_sampling.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/test_similarity.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/test_simple.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/test_sklearn.py +0 -0
- {bblean-0.7.7 → bblean-0.7.8}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bblean
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.8
|
|
4
4
|
Summary: BitBirch-Lean Python package
|
|
5
5
|
Author: The Miranda-Quintana Lab and other BitBirch developers
|
|
6
6
|
Author-email: Ramon Alain Miranda Quintana <quintana@chem.ufl.edu>, Krisztina Zsigmond <kzsigmond@ufl.edu>, Ignacio Pickering <ipickering@ufl.edu>, Kenneth Lopez Perez <klopezperez@chem.ufl.edu>, Miroslav Lzicar <miroslav.lzicar@deepmedchem.com>
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.7.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 7,
|
|
31
|
+
__version__ = version = '0.7.8'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 7, 8)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -76,6 +76,85 @@ def _main(
|
|
|
76
76
|
pass
|
|
77
77
|
|
|
78
78
|
|
|
79
|
+
@app.command("compare", rich_help_panel="Analysis", hidden=True)
|
|
80
|
+
def _compare(
|
|
81
|
+
clusters_a_path: Annotated[Path, Argument()],
|
|
82
|
+
clusters_b_path: Annotated[Path, Argument()],
|
|
83
|
+
ari: Annotated[
|
|
84
|
+
bool,
|
|
85
|
+
Option("--ari/--no-ari", help="Adjusted Rand index"),
|
|
86
|
+
] = True,
|
|
87
|
+
ami: Annotated[
|
|
88
|
+
bool,
|
|
89
|
+
Option("--ami/--no-ami", help="Adjusted mutual information (slow)"),
|
|
90
|
+
] = True,
|
|
91
|
+
top: Annotated[
|
|
92
|
+
int,
|
|
93
|
+
Option("-t", "--top"),
|
|
94
|
+
] = 30,
|
|
95
|
+
use_first_clustering_indices: Annotated[
|
|
96
|
+
bool,
|
|
97
|
+
Option("--use-first-clustering-indices/--no-use-first-clustering-indices"),
|
|
98
|
+
] = False,
|
|
99
|
+
verbose: Annotated[
|
|
100
|
+
bool,
|
|
101
|
+
Option("-v/-V", "--verbose/--no-verbose"),
|
|
102
|
+
] = True,
|
|
103
|
+
) -> None:
|
|
104
|
+
r"""Compare two clusterings of the same data, using different metrics"""
|
|
105
|
+
import pickle
|
|
106
|
+
import numpy as np
|
|
107
|
+
|
|
108
|
+
from sklearn.metrics import adjusted_mutual_info_score, adjusted_rand_score
|
|
109
|
+
|
|
110
|
+
from bblean._console import get_console
|
|
111
|
+
|
|
112
|
+
console = get_console(silent=not verbose)
|
|
113
|
+
|
|
114
|
+
if clusters_a_path.is_dir():
|
|
115
|
+
clusters_a_path = clusters_a_path / "clusters.pkl"
|
|
116
|
+
|
|
117
|
+
if clusters_b_path.is_dir():
|
|
118
|
+
clusters_b_path = clusters_b_path / "clusters.pkl"
|
|
119
|
+
|
|
120
|
+
with console.status("[italic]Collecting labels...[/italic]", spinner="dots"):
|
|
121
|
+
with open(clusters_a_path, mode="rb") as f:
|
|
122
|
+
clusters = pickle.load(f)
|
|
123
|
+
total = sum(len(c) for c in clusters)
|
|
124
|
+
true_labels = np.empty(total, dtype=np.uint64)
|
|
125
|
+
for i, mol_ids in enumerate(clusters):
|
|
126
|
+
true_labels[mol_ids] = i
|
|
127
|
+
idxs_a = np.concatenate(clusters[:top])
|
|
128
|
+
|
|
129
|
+
with open(clusters_b_path, mode="rb") as f:
|
|
130
|
+
clusters = pickle.load(f)
|
|
131
|
+
total = sum(len(c) for c in clusters)
|
|
132
|
+
pred_labels = np.empty(total, dtype=np.uint64)
|
|
133
|
+
for i, mol_ids in enumerate(clusters):
|
|
134
|
+
pred_labels[mol_ids] = i
|
|
135
|
+
idxs_b = np.concatenate(clusters[:top])
|
|
136
|
+
if use_first_clustering_indices:
|
|
137
|
+
idxs = idxs_a
|
|
138
|
+
else:
|
|
139
|
+
idxs = np.unique(np.concatenate((idxs_a, idxs_b)))
|
|
140
|
+
|
|
141
|
+
true_labels = true_labels[idxs]
|
|
142
|
+
pred_labels = pred_labels[idxs]
|
|
143
|
+
|
|
144
|
+
timer = Timer()
|
|
145
|
+
timer.init_timing("total")
|
|
146
|
+
if ami:
|
|
147
|
+
with console.status("[italic]Calc. AMI score...[/italic]", spinner="dots"):
|
|
148
|
+
ami_score = adjusted_mutual_info_score(true_labels, pred_labels)
|
|
149
|
+
console.print(f"Adjusted Mutual Information (AMI): {ami_score:.4f}")
|
|
150
|
+
|
|
151
|
+
if ari:
|
|
152
|
+
with console.status("[italic]Calc. ARI score...[/italic]", spinner="dots"):
|
|
153
|
+
ari_score = adjusted_rand_score(true_labels, pred_labels)
|
|
154
|
+
console.print(f"Adjusted Rand Index (ARI): {ari_score:.4f}")
|
|
155
|
+
timer.end_timing("total", console, indent=False)
|
|
156
|
+
|
|
157
|
+
|
|
79
158
|
@app.command("summary", rich_help_panel="Analysis")
|
|
80
159
|
def _table_summary(
|
|
81
160
|
clusters_path: Annotated[
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bblean
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.8
|
|
4
4
|
Summary: BitBirch-Lean Python package
|
|
5
5
|
Author: The Miranda-Quintana Lab and other BitBirch developers
|
|
6
6
|
Author-email: Ramon Alain Miranda Quintana <quintana@chem.ufl.edu>, Krisztina Zsigmond <kzsigmond@ufl.edu>, Ignacio Pickering <ipickering@ufl.edu>, Kenneth Lopez Perez <klopezperez@chem.ufl.edu>, Miroslav Lzicar <miroslav.lzicar@deepmedchem.com>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|