gotmap-benchmark 0.2.0__tar.gz → 0.2.2__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.
- {gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/PKG-INFO +13 -2
- {gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/README.md +12 -1
- {gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/gotmap_benchmark/__init__.py +1 -1
- {gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/gotmap_benchmark.egg-info/PKG-INFO +13 -2
- {gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/pyproject.toml +1 -1
- {gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/gotmap_benchmark/cli.py +0 -0
- {gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/gotmap_benchmark/datasets.py +0 -0
- {gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/gotmap_benchmark/methods.py +0 -0
- {gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/gotmap_benchmark/metrics.py +0 -0
- {gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/gotmap_benchmark/pipeline.py +0 -0
- {gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/gotmap_benchmark.egg-info/SOURCES.txt +0 -0
- {gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/gotmap_benchmark.egg-info/dependency_links.txt +0 -0
- {gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/gotmap_benchmark.egg-info/entry_points.txt +0 -0
- {gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/gotmap_benchmark.egg-info/requires.txt +0 -0
- {gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/gotmap_benchmark.egg-info/top_level.txt +0 -0
- {gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gotmap-benchmark
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Benchmark pipeline for gotmap (query-to-reference atlas mapping) vs baselines.
|
|
5
5
|
Author: gotmap developers
|
|
6
6
|
License: MIT
|
|
@@ -57,7 +57,18 @@ label_key = "bulk_labels" if "bulk_labels" in adata.obs.columns else "louvain"
|
|
|
57
57
|
if label_key not in adata.obs.columns:
|
|
58
58
|
sc.tl.louvain(adata, resolution=0.8, key_added="louvain"); label_key = "louvain"
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
import numpy as np
|
|
61
|
+
from sklearn.model_selection import train_test_split
|
|
62
|
+
|
|
63
|
+
idx = np.arange(adata.n_obs)
|
|
64
|
+
strat = adata.obs[label_key].values if label_key in adata.obs.columns else None
|
|
65
|
+
train_idx, test_idx = train_test_split(
|
|
66
|
+
idx, test_size=0.3, shuffle=True, random_state=42, stratify=strat
|
|
67
|
+
)
|
|
68
|
+
ref, query = adata[train_idx].copy(), adata[test_idx].copy()
|
|
69
|
+
|
|
70
|
+
# --- alternative: split by batch (preferred for atlas mapping) ---
|
|
71
|
+
# ref, query = sc.pp.train_test_split(adata, test_size=0.3, random_state=42,
|
|
61
72
|
stratify=label_key)
|
|
62
73
|
|
|
63
74
|
bench = BenchmarkPipeline(ref, query, label_key=label_key, use_rep="X_pca",
|
|
@@ -33,7 +33,18 @@ label_key = "bulk_labels" if "bulk_labels" in adata.obs.columns else "louvain"
|
|
|
33
33
|
if label_key not in adata.obs.columns:
|
|
34
34
|
sc.tl.louvain(adata, resolution=0.8, key_added="louvain"); label_key = "louvain"
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
import numpy as np
|
|
37
|
+
from sklearn.model_selection import train_test_split
|
|
38
|
+
|
|
39
|
+
idx = np.arange(adata.n_obs)
|
|
40
|
+
strat = adata.obs[label_key].values if label_key in adata.obs.columns else None
|
|
41
|
+
train_idx, test_idx = train_test_split(
|
|
42
|
+
idx, test_size=0.3, shuffle=True, random_state=42, stratify=strat
|
|
43
|
+
)
|
|
44
|
+
ref, query = adata[train_idx].copy(), adata[test_idx].copy()
|
|
45
|
+
|
|
46
|
+
# --- alternative: split by batch (preferred for atlas mapping) ---
|
|
47
|
+
# ref, query = sc.pp.train_test_split(adata, test_size=0.3, random_state=42,
|
|
37
48
|
stratify=label_key)
|
|
38
49
|
|
|
39
50
|
bench = BenchmarkPipeline(ref, query, label_key=label_key, use_rep="X_pca",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gotmap-benchmark
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Benchmark pipeline for gotmap (query-to-reference atlas mapping) vs baselines.
|
|
5
5
|
Author: gotmap developers
|
|
6
6
|
License: MIT
|
|
@@ -57,7 +57,18 @@ label_key = "bulk_labels" if "bulk_labels" in adata.obs.columns else "louvain"
|
|
|
57
57
|
if label_key not in adata.obs.columns:
|
|
58
58
|
sc.tl.louvain(adata, resolution=0.8, key_added="louvain"); label_key = "louvain"
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
import numpy as np
|
|
61
|
+
from sklearn.model_selection import train_test_split
|
|
62
|
+
|
|
63
|
+
idx = np.arange(adata.n_obs)
|
|
64
|
+
strat = adata.obs[label_key].values if label_key in adata.obs.columns else None
|
|
65
|
+
train_idx, test_idx = train_test_split(
|
|
66
|
+
idx, test_size=0.3, shuffle=True, random_state=42, stratify=strat
|
|
67
|
+
)
|
|
68
|
+
ref, query = adata[train_idx].copy(), adata[test_idx].copy()
|
|
69
|
+
|
|
70
|
+
# --- alternative: split by batch (preferred for atlas mapping) ---
|
|
71
|
+
# ref, query = sc.pp.train_test_split(adata, test_size=0.3, random_state=42,
|
|
61
72
|
stratify=label_key)
|
|
62
73
|
|
|
63
74
|
bench = BenchmarkPipeline(ref, query, label_key=label_key, use_rep="X_pca",
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "gotmap-benchmark"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.2"
|
|
8
8
|
description = "Benchmark pipeline for gotmap (query-to-reference atlas mapping) vs baselines."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/gotmap_benchmark.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{gotmap_benchmark-0.2.0 → gotmap_benchmark-0.2.2}/gotmap_benchmark.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|