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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcDETECT
3
- Version: 2.0.10
3
+ Version: 2.0.11
4
4
  Summary: Uncovering the dark transcriptome in polarized neuronal compartments with mcDETECT
5
5
  Home-page: https://github.com/chen-yang-yuan/mcDETECT
6
6
  Author: Chenyang Yuan
@@ -0,0 +1,6 @@
1
+ __version__ = "2.0.11"
2
+
3
+ from . import model
4
+ from . import utils
5
+
6
+ __all__ = ["model", "utils"]
@@ -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
- # coords_unique = np.unique(coords, axis=0)
125
+
126
126
  temp = pd.DataFrame(coords, columns=["global_x", "global_y", "global_z"])
127
127
  temp = temp.drop_duplicates()
128
- center, r2 = miniball.get_bounding_ball(np.array(temp), epsilon=1e-8)
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:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcDETECT
3
- Version: 2.0.10
3
+ Version: 2.0.11
4
4
  Summary: Uncovering the dark transcriptome in polarized neuronal compartments with mcDETECT
5
5
  Home-page: https://github.com/chen-yang-yuan/mcDETECT
6
6
  Author: Chenyang Yuan
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name = "mcDETECT",
5
- version = "2.0.10",
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",
@@ -1,6 +0,0 @@
1
- __version__ = "2.0.10"
2
-
3
- from . import model
4
- from . import utils
5
-
6
- __all__ = ["model", "utils"]
File without changes
File without changes
File without changes
File without changes