mcDETECT 2.0.10__tar.gz → 2.0.11__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.
Potentially problematic release.
This version of mcDETECT might be problematic. Click here for more details.
- {mcdetect-2.0.10 → mcdetect-2.0.11}/PKG-INFO +1 -1
- mcdetect-2.0.11/mcDETECT/__init__.py +6 -0
- {mcdetect-2.0.10 → mcdetect-2.0.11}/mcDETECT/model.py +13 -2
- {mcdetect-2.0.10 → mcdetect-2.0.11}/mcDETECT.egg-info/PKG-INFO +1 -1
- {mcdetect-2.0.10 → mcdetect-2.0.11}/setup.py +1 -1
- mcdetect-2.0.10/mcDETECT/__init__.py +0 -6
- {mcdetect-2.0.10 → mcdetect-2.0.11}/LICENSE +0 -0
- {mcdetect-2.0.10 → mcdetect-2.0.11}/README.md +0 -0
- {mcdetect-2.0.10 → mcdetect-2.0.11}/mcDETECT/utils.py +0 -0
- {mcdetect-2.0.10 → mcdetect-2.0.11}/mcDETECT.egg-info/SOURCES.txt +0 -0
- {mcdetect-2.0.10 → mcdetect-2.0.11}/mcDETECT.egg-info/dependency_links.txt +0 -0
- {mcdetect-2.0.10 → mcdetect-2.0.11}/mcDETECT.egg-info/requires.txt +0 -0
- {mcdetect-2.0.10 → mcdetect-2.0.11}/mcDETECT.egg-info/top_level.txt +0 -0
- {mcdetect-2.0.10 → mcdetect-2.0.11}/setup.cfg +0 -0
|
@@ -122,10 +122,21 @@ class mcDETECT:
|
|
|
122
122
|
continue
|
|
123
123
|
temp_in_nucleus = np.sum(target["overlaps_nucleus"].values[mask])
|
|
124
124
|
temp_size = coords.shape[0]
|
|
125
|
-
|
|
125
|
+
|
|
126
126
|
temp = pd.DataFrame(coords, columns=["global_x", "global_y", "global_z"])
|
|
127
127
|
temp = temp.drop_duplicates()
|
|
128
|
-
|
|
128
|
+
coords_unique = temp.to_numpy()
|
|
129
|
+
if coords_unique.shape[0] < self.low_bound:
|
|
130
|
+
print(f"Skipping small cluster for gene {j}, cluster {k} (n = {coords_unique.shape[0]})")
|
|
131
|
+
continue
|
|
132
|
+
try:
|
|
133
|
+
center, r2 = miniball.get_bounding_ball(coords_unique, epsilon=1e-8)
|
|
134
|
+
except np.linalg.LinAlgError:
|
|
135
|
+
print(f"Warning: singular matrix for gene {j}, cluster {k} —- using fallback sphere.")
|
|
136
|
+
center = coords_unique.mean(axis=0)
|
|
137
|
+
dists = np.linalg.norm(coords_unique - center, axis=1)
|
|
138
|
+
r2 = (dists.max() ** 2)
|
|
139
|
+
|
|
129
140
|
if self.type != "Xenium":
|
|
130
141
|
closest_z = closest(z_grid, center[2])
|
|
131
142
|
else:
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name = "mcDETECT",
|
|
5
|
-
version = "2.0.
|
|
5
|
+
version = "2.0.11",
|
|
6
6
|
packages = find_packages(),
|
|
7
7
|
install_requires = ["anndata", "miniball", "numpy", "pandas", "rtree", "scanpy", "scikit-learn", "scipy", "shapely"],
|
|
8
8
|
author = "Chenyang Yuan",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|