cytocommunity2 0.1.7__tar.gz → 0.1.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.
Files changed (43) hide show
  1. {cytocommunity2-0.1.7/src/cytocommunity2.egg-info → cytocommunity2-0.1.8}/PKG-INFO +1 -1
  2. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/pyproject.toml +1 -1
  3. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/__init__.py +1 -1
  4. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/config.py +1 -0
  5. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/communication/cca.py +1 -1
  6. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/communication/within.py +1 -1
  7. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/moran.py +7 -10
  8. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8/src/cytocommunity2.egg-info}/PKG-INFO +1 -1
  9. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/LICENSE +0 -0
  10. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/README.md +0 -0
  11. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/setup.cfg +0 -0
  12. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/colors.py +0 -0
  13. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/__init__.py +0 -0
  14. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/coherence.py +0 -0
  15. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/communication/__init__.py +0 -0
  16. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/communication/between.py +0 -0
  17. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/communication/utils.py +0 -0
  18. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/differential_composition.py +0 -0
  19. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/dominant_celltype.py +0 -0
  20. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/plotting/__init__.py +0 -0
  21. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/plotting/cn_selection.py +0 -0
  22. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/plotting/coherence.py +0 -0
  23. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/plotting/common.py +0 -0
  24. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/plotting/communication.py +0 -0
  25. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/plotting/composition.py +0 -0
  26. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/plotting/dominant.py +0 -0
  27. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/plotting/dotplots.py +0 -0
  28. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/plotting/recurrence.py +0 -0
  29. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/downstream/runtime.py +0 -0
  30. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/ensemble.py +0 -0
  31. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/learning/__init__.py +0 -0
  32. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/learning/api.py +0 -0
  33. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/learning/dataset.py +0 -0
  34. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/learning/model.py +0 -0
  35. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/learning/selection.py +0 -0
  36. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/learning/training.py +0 -0
  37. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/paths.py +0 -0
  38. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/visualization/__init__.py +0 -0
  39. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2/visualization/spatial.py +0 -0
  40. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2.egg-info/SOURCES.txt +0 -0
  41. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2.egg-info/dependency_links.txt +0 -0
  42. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2.egg-info/requires.txt +0 -0
  43. {cytocommunity2-0.1.7 → cytocommunity2-0.1.8}/src/cytocommunity2.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cytocommunity2
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Summary: Weakly supervised cellular-neighborhood learning for spatial omics
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cytocommunity2"
7
- version = "0.1.7"
7
+ version = "0.1.8"
8
8
  description = "Weakly supervised cellular-neighborhood learning for spatial omics"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -10,7 +10,7 @@ from .learning import (
10
10
  )
11
11
  from .visualization import visualize_results
12
12
 
13
- __version__ = "0.1.7"
13
+ __version__ = "0.1.8"
14
14
 
15
15
  __all__ = [
16
16
  "CytoCommunityConfig",
@@ -29,6 +29,7 @@ FIXED_DOWNSTREAM = {
29
29
  "cca_minimum_abs_rho": 0.0,
30
30
  "cca_sd_epsilon": 1e-8,
31
31
  "cca_max_iterations": 1000,
32
+ "cca_canonical_components": 2,
32
33
  },
33
34
  }
34
35
 
@@ -107,7 +107,7 @@ def run_cca_for_scores(
107
107
  extreme = 0
108
108
  valid_count = 0
109
109
  invalid_count = 0
110
- for _ in range(communication_params["cca_n_bootstrap"]):
110
+ for _ in range(communication_params["cca_n_permutations"]):
111
111
  shuffled_y = rng.permutation(y_matrix)
112
112
  permutation_model = CCA(
113
113
  n_components=min(
@@ -245,7 +245,7 @@ def run_within_cn_analysis(config, *, input_file=None, output_dir=None):
245
245
  cn_order=cn_order,
246
246
  celltype_order=celltype_order,
247
247
  min_samples=params["minimum_samples"],
248
- n_permutations=params["n_permutations"],
248
+ n_permutations=params["within_cn_n_permutations"],
249
249
  max_attempt_multiplier=params["permutation_max_attempt_multiplier"],
250
250
  base_seed=config.random_seed,
251
251
  )
@@ -56,9 +56,7 @@ def build_distance_weights(coordinates, distance_threshold):
56
56
  return weights
57
57
 
58
58
 
59
- def calculate_celltype_moran(
60
- cell_type_series, weights, minimum_positive_count, permutations
61
- ):
59
+ def calculate_celltype_moran(cell_type_series, weights, minimum_positive_count):
62
60
  """Calculate Moran's I for every eligible cell type in one CN."""
63
61
  try:
64
62
  from esda.moran import Moran
@@ -75,7 +73,7 @@ def calculate_celltype_moran(
75
73
  positive_count = int(indicator.sum())
76
74
  if positive_count < minimum_positive_count or positive_count == n_cells:
77
75
  continue
78
- moran = Moran(indicator, weights, permutations=permutations)
76
+ moran = Moran(indicator, weights, permutations=0)
79
77
  rows.append(
80
78
  {
81
79
  "CellType": cell_type,
@@ -116,12 +114,11 @@ def calculate_sample_moran_frame(
116
114
  )
117
115
  if weights.sparse.nnz == 0:
118
116
  continue
119
- for result in calculate_celltype_moran(
120
- cn_frame["Cell_Type"],
121
- weights,
122
- moran_params["minimum_positive_count"],
123
- moran_params["permutations"],
124
- ):
117
+ for result in calculate_celltype_moran(
118
+ cn_frame["Cell_Type"],
119
+ weights,
120
+ moran_params["minimum_positive_count"],
121
+ ):
125
122
  rows.append(
126
123
  {
127
124
  "Sample": str(sample_name),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cytocommunity2
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Summary: Weakly supervised cellular-neighborhood learning for spatial omics
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
File without changes
File without changes
File without changes