mcDETECT 2.0.7__tar.gz → 2.0.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.

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.7
3
+ Version: 2.0.8
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.8"
2
+
3
+ from . import model
4
+ from . import utils
5
+
6
+ __all__ = ["model", "utils"]
@@ -20,12 +20,12 @@ from .utils import *
20
20
  class mcDETECT:
21
21
 
22
22
 
23
- def __init__(self, type, transcripts, syn_genes, nc_genes = None, eps = 1.5, minspl = None, grid_len = 1.0, cutoff_prob = 0.95, alpha = 5.0, low_bound = 3,
23
+ def __init__(self, type, transcripts, gnl_genes, nc_genes = None, eps = 1.5, minspl = None, grid_len = 1.0, cutoff_prob = 0.95, alpha = 5.0, low_bound = 3,
24
24
  size_thr = 4.0, in_nucleus_thr = (0.5, 0.5), l = 1.0, rho = 0.2, s = 1.0, nc_top = 20, nc_thr = 0.1):
25
25
 
26
26
  self.type = type # string, iST platform, now support MERSCOPE, Xenium, and CosMx
27
27
  self.transcripts = transcripts # dataframe, transcripts file
28
- self.syn_genes = syn_genes # list, string, all synaptic markers
28
+ self.gnl_genes = gnl_genes # list, string, all granule markers
29
29
  self.nc_genes = nc_genes # list, string, all negative controls
30
30
  self.eps = eps # numeric, searching radius epsilon
31
31
  self.minspl = minspl # integer, manually select min_samples, i.e., no automatic parameter selection
@@ -74,7 +74,7 @@ class mcDETECT:
74
74
  return optimal_m
75
75
 
76
76
 
77
- # [INTERMEDIATE] dictionary, low- and high-in-nucleus spheres for each synaptic marker
77
+ # [INTERMEDIATE] dictionary, low- and high-in-nucleus spheres for each granule marker
78
78
  def dbscan(self, target_names = None, record_cell_id = False, write_csv = False, write_path = "./"):
79
79
 
80
80
  if self.type != "Xenium":
@@ -82,7 +82,7 @@ class mcDETECT:
82
82
  z_grid.sort()
83
83
 
84
84
  if target_names is None:
85
- target_names = self.syn_genes
85
+ target_names = self.gnl_genes
86
86
  transcripts = self.transcripts[self.transcripts["target"].isin(target_names)]
87
87
 
88
88
  num_individual, data_low, data_high = [], {}, {}
@@ -175,7 +175,7 @@ class mcDETECT:
175
175
 
176
176
  # [INNER] merge points from two overlapped spheres, input for remove_overlaps()
177
177
  def find_points(self, sphere_a, sphere_b):
178
- transcripts = self.transcripts[self.transcripts["target"].isin(self.syn_genes)]
178
+ transcripts = self.transcripts[self.transcripts["target"].isin(self.gnl_genes)]
179
179
  tree_temp = make_tree(d1 = np.array(transcripts["global_x"]), d2 = np.array(transcripts["global_y"]), d3 = np.array(transcripts["global_z"]))
180
180
  idx_a = tree_temp.query_ball_point([sphere_a["sphere_x"], sphere_a["sphere_y"], sphere_a["sphere_z"]], sphere_a["sphere_r"])
181
181
  points_a = transcripts.iloc[idx_a]
@@ -239,10 +239,10 @@ class mcDETECT:
239
239
  return set_a, set_b
240
240
 
241
241
 
242
- # [INNER] merge spheres from different synaptic markers, input for detect()
242
+ # [INNER] merge spheres from different granule markers, input for detect()
243
243
  def merge_sphere(self, sphere_dict):
244
244
  sphere = sphere_dict[0].copy()
245
- for j in range(1, len(self.syn_genes)):
245
+ for j in range(1, len(self.gnl_genes)):
246
246
  target_sphere = sphere_dict[j]
247
247
  sphere, target_sphere_new = self.remove_overlaps(sphere, target_sphere)
248
248
  sphere = pd.concat([sphere, target_sphere_new])
@@ -289,7 +289,7 @@ class mcDETECT:
289
289
  return sphere
290
290
 
291
291
 
292
- # [MAIN] dataframe, synapse metadata
292
+ # [MAIN] dataframe, granule metadata
293
293
  def detect(self):
294
294
 
295
295
  _, data_low, data_high = self.dbscan()
@@ -304,7 +304,7 @@ class mcDETECT:
304
304
  return self.nc_filter(sphere_low, sphere_high)
305
305
 
306
306
 
307
- # [MAIN] anndata, synapse spatial transcriptome profile
307
+ # [MAIN] anndata, granule spatial transcriptome profile
308
308
  def profile(self, granule, genes = None, print_itr = False):
309
309
 
310
310
  if genes is None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcDETECT
3
- Version: 2.0.7
3
+ Version: 2.0.8
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.7",
5
+ version = "2.0.8",
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.7"
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