mcDETECT 2.0.10__py3-none-any.whl → 2.0.11__py3-none-any.whl

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/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "2.0.10"
1
+ __version__ = "2.0.11"
2
2
 
3
3
  from . import model
4
4
  from . import utils
mcDETECT/model.py CHANGED
@@ -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
@@ -0,0 +1,8 @@
1
+ mcDETECT/__init__.py,sha256=8ZH_Aljm3rgizWtNHOlZMSrmaALRJwLuiyygwrgEWAk,93
2
+ mcDETECT/model.py,sha256=VskA4YKQ9-16AB-Le6HdWNEwyNoQiFxIckCZ8xR8HiY,29950
3
+ mcDETECT/utils.py,sha256=0gvqZV7sGi8qvvdC5x9XScyiTXlSfqbUt1zks4t7Xd4,4545
4
+ mcdetect-2.0.11.dist-info/licenses/LICENSE,sha256=uxq-shEWOGTIGVnQLmpElILmfCkuUhFZRAMnZUiKvtg,1070
5
+ mcdetect-2.0.11.dist-info/METADATA,sha256=BCb4S7JuBZCUq3wpyHbW4rhjRGKjmLi-lhLkLzAoTgE,3017
6
+ mcdetect-2.0.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ mcdetect-2.0.11.dist-info/top_level.txt,sha256=WwzBojt5U-T2hZ8llO6XgpM9OFIBkWQQldQKu19O8EY,9
8
+ mcdetect-2.0.11.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- mcDETECT/__init__.py,sha256=FoRKnIon2qyKVkAcetKJDkIw8YuDuM1LhpoCZv-AE38,93
2
- mcDETECT/model.py,sha256=oEkBpFPZWBTRScjsyfwes6oTu6hDsjsI-MCVdVxGiFk,29375
3
- mcDETECT/utils.py,sha256=0gvqZV7sGi8qvvdC5x9XScyiTXlSfqbUt1zks4t7Xd4,4545
4
- mcdetect-2.0.10.dist-info/licenses/LICENSE,sha256=uxq-shEWOGTIGVnQLmpElILmfCkuUhFZRAMnZUiKvtg,1070
5
- mcdetect-2.0.10.dist-info/METADATA,sha256=N8RO2SHnwLe-LZ1wEu1xFTumQ_u4mTfMEdF8exePRYM,3017
6
- mcdetect-2.0.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- mcdetect-2.0.10.dist-info/top_level.txt,sha256=WwzBojt5U-T2hZ8llO6XgpM9OFIBkWQQldQKu19O8EY,9
8
- mcdetect-2.0.10.dist-info/RECORD,,