SURE-tools 2.1.82__py3-none-any.whl → 2.1.84__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 SURE-tools might be problematic. Click here for more details.

SURE/PerturbFlow.py CHANGED
@@ -681,6 +681,9 @@ class PerturbFlow(nn.Module):
681
681
  zus = zus + self.cell_factor_effect[i]([zns,us[:,i].reshape(-1,1)])
682
682
  return zus
683
683
 
684
+ def _get_codebook_identity(self):
685
+ return torch.eye(self.code_size, **self.options)
686
+
684
687
  def _get_codebook(self):
685
688
  I = torch.eye(self.code_size, **self.options)
686
689
  if self.latent_dist=='studentt':
SURE/utils/custom_mlp.py CHANGED
@@ -239,7 +239,10 @@ class ZeroBiasMLP(nn.Module):
239
239
  def forward(self, x):
240
240
  y = self.mlp(x)
241
241
  mask = torch.zeros_like(y)
242
- mask[x[1][:,0]>0,:] = 1
242
+ if len(y.shape)==2:
243
+ mask[x[1][:,0]>0,:] = 1
244
+ elif len(y.shape)==3:
245
+ mask[:,x[1][:,0]>0,:] = 1
243
246
  return y*mask
244
247
 
245
248
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SURE-tools
3
- Version: 2.1.82
3
+ Version: 2.1.84
4
4
  Summary: Succinct Representation of Single Cells
5
5
  Home-page: https://github.com/ZengFLab/SURE
6
6
  Author: Feng Zeng
@@ -1,4 +1,4 @@
1
- SURE/PerturbFlow.py,sha256=mP2Yxib3YLUVfR8EH-EXRB7VgPtnDX4PAVvs3eg6fvA,54583
1
+ SURE/PerturbFlow.py,sha256=11MmXAMHovmvAHHUvBYGMKo-GS2mOiWxBgkzhq-yZE4,54683
2
2
  SURE/SURE.py,sha256=g8EhovBxjfpbVJA0AkmVkQ_ZW_JFc8TtkTCg8FCybV4,47750
3
3
  SURE/__init__.py,sha256=NOJI_K-eCqPgStXXvgl3wIEMp6d8saMTDYLJ7Ga9MqE,293
4
4
  SURE/assembly/__init__.py,sha256=jxZLURXKPzXe21LhrZ09LgZr33iqdjlQy4oSEj5gR2Q,172
@@ -14,12 +14,12 @@ SURE/flow/plot_quiver.py,sha256=UbmuScUcgbQHeMmjKmgqxjrIjHhiHx0VWct16UMMwuE,8110
14
14
  SURE/perturb/__init__.py,sha256=8TP1dSUhXiZzKpFebHZmm8XMMGbUz_OfQ10xu-6uPPY,43
15
15
  SURE/perturb/perturb.py,sha256=1iSsCePcwkA2CyM1nCdq_G8gogUNjhMH0BfhhvhpJQk,5037
16
16
  SURE/utils/__init__.py,sha256=YF5jB-PAHJQ40OlcZ7BCZbsN2q1JKuPT6EppilRXQqM,680
17
- SURE/utils/custom_mlp.py,sha256=C0EXLGYsWkUQpEL49AyBFPSzKmasb2hdvtnJfxbF-YU,9282
17
+ SURE/utils/custom_mlp.py,sha256=HuNb7f8-6RFjsvfEu1XOuNpLrHZkGYHgf8TpJfPSNO0,9382
18
18
  SURE/utils/queue.py,sha256=E_5PA5EWcBoGAZj8BkKQnkCK0p4C-4-xcTPqdIXaPXU,1892
19
19
  SURE/utils/utils.py,sha256=IUHjDDtYaAYllCWsZyIzqQwaLul6fJRvHRH4vIYcR-c,8462
20
- sure_tools-2.1.82.dist-info/licenses/LICENSE,sha256=TFHKwmrAViXQbSX5W-NDItkWFjm45HWOeUniDrqmnu0,1065
21
- sure_tools-2.1.82.dist-info/METADATA,sha256=u4c0qdwERWKOHRSpHR4MJaB5BZ1iI3xmIm67rJkWej0,2678
22
- sure_tools-2.1.82.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
- sure_tools-2.1.82.dist-info/entry_points.txt,sha256=-nJI8rVe_qqrR0HmfAODzj-JNfEqCcSsyVh6okSqyHk,83
24
- sure_tools-2.1.82.dist-info/top_level.txt,sha256=BtFTebdiJeqra4r6mm-uEtwVRFLZ_IjYsQ7OnalrOvY,5
25
- sure_tools-2.1.82.dist-info/RECORD,,
20
+ sure_tools-2.1.84.dist-info/licenses/LICENSE,sha256=TFHKwmrAViXQbSX5W-NDItkWFjm45HWOeUniDrqmnu0,1065
21
+ sure_tools-2.1.84.dist-info/METADATA,sha256=l_eZxgCGKk6isE5ZgbyyRyMI1ZuGYgSK_Dpl_zFqOxs,2678
22
+ sure_tools-2.1.84.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
+ sure_tools-2.1.84.dist-info/entry_points.txt,sha256=-nJI8rVe_qqrR0HmfAODzj-JNfEqCcSsyVh6okSqyHk,83
24
+ sure_tools-2.1.84.dist-info/top_level.txt,sha256=BtFTebdiJeqra4r6mm-uEtwVRFLZ_IjYsQ7OnalrOvY,5
25
+ sure_tools-2.1.84.dist-info/RECORD,,