SURE-tools 2.0.6__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 SURE-tools might be problematic. Click here for more details.

Files changed (26) hide show
  1. {sure_tools-2.0.6 → sure_tools-2.0.8}/PKG-INFO +1 -1
  2. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE/SURE.py +11 -1
  3. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE/flow/plot_quiver.py +1 -1
  4. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE_tools.egg-info/PKG-INFO +1 -1
  5. {sure_tools-2.0.6 → sure_tools-2.0.8}/setup.py +1 -1
  6. {sure_tools-2.0.6 → sure_tools-2.0.8}/LICENSE +0 -0
  7. {sure_tools-2.0.6 → sure_tools-2.0.8}/README.md +0 -0
  8. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE/__init__.py +0 -0
  9. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE/assembly/__init__.py +0 -0
  10. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE/assembly/assembly.py +0 -0
  11. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE/assembly/atlas.py +0 -0
  12. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE/atac/__init__.py +0 -0
  13. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE/atac/utils.py +0 -0
  14. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE/codebook/__init__.py +0 -0
  15. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE/codebook/codebook.py +0 -0
  16. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE/flow/__init__.py +0 -0
  17. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE/utils/__init__.py +0 -0
  18. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE/utils/custom_mlp.py +0 -0
  19. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE/utils/queue.py +0 -0
  20. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE/utils/utils.py +0 -0
  21. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE_tools.egg-info/SOURCES.txt +0 -0
  22. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE_tools.egg-info/dependency_links.txt +0 -0
  23. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE_tools.egg-info/entry_points.txt +0 -0
  24. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE_tools.egg-info/requires.txt +0 -0
  25. {sure_tools-2.0.6 → sure_tools-2.0.8}/SURE_tools.egg-info/top_level.txt +0 -0
  26. {sure_tools-2.0.6 → sure_tools-2.0.8}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SURE-tools
3
- Version: 2.0.6
3
+ Version: 2.0.8
4
4
  Summary: Succinct Representation of Single Cells
5
5
  Home-page: https://github.com/ZengFLab/SURE
6
6
  Author: Feng Zeng
@@ -814,7 +814,7 @@ class SURE(nn.Module):
814
814
  return A
815
815
 
816
816
  def _cell_move(self, xs, factor_idx, perturb):
817
- zns = self.encoder_zn(xs)
817
+ zns,_ = self.encoder_zn(xs)
818
818
  if type(factor_idx) == str:
819
819
  factor_idx = np.where(self.cell_factor_names==factor_idx)
820
820
 
@@ -850,6 +850,16 @@ class SURE(nn.Module):
850
850
  Z = np.concatenate(Z)
851
851
  return Z
852
852
 
853
+ def get_metacell_move(self, factor_idx, perturb):
854
+ zs = self._get_codebook()
855
+ ps = convert_to_tensor(perturb, device=self.get_device())
856
+
857
+ if type(factor_idx) == str:
858
+ factor_idx = np.where(self.cell_factor_names==factor_idx)
859
+
860
+ ms = self.cell_factor_effect[factor_idx]([zs,ps])
861
+ return tensor_to_numpy(ms)
862
+
853
863
  def preprocess(self, xs, threshold=0):
854
864
  if self.loss_func == 'bernoulli':
855
865
  ad = sc.AnnData(xs)
@@ -32,7 +32,7 @@ def plot_quiver(z_points, delta_z, method='umap', figsize=(6,4), dpi=200):
32
32
  sc.pp.neighbors(ad)
33
33
  sc.tl.umap(ad)
34
34
  z_2d = ad[:z_points.shape[0]].obsm['X_umap']
35
- delta_z_2d = ad[z_points.shape[0]:] - z_2d
35
+ delta_z_2d = ad[z_points.shape[0]:].obsm['X_umap'] - z_2d
36
36
  dim_names = ['UMAP1', 'UMAP2']
37
37
 
38
38
  # 绘制quiver图
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SURE-tools
3
- Version: 2.0.6
3
+ Version: 2.0.8
4
4
  Summary: Succinct Representation of Single Cells
5
5
  Home-page: https://github.com/ZengFLab/SURE
6
6
  Author: Feng Zeng
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setup(
7
7
  name='SURE-tools',
8
- version='2.0.6',
8
+ version='2.0.8',
9
9
  description='Succinct Representation of Single Cells',
10
10
  long_description=long_description,
11
11
  long_description_content_type="text/markdown",
File without changes
File without changes
File without changes
File without changes