SURE-tools 2.1.31__tar.gz → 2.1.33__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 (30) hide show
  1. {sure_tools-2.1.31 → sure_tools-2.1.33}/PKG-INFO +1 -1
  2. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/PerturbFlow.py +0 -1
  3. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/SURE.py +22 -9
  4. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/flow/plot_quiver.py +1 -1
  5. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE_tools.egg-info/PKG-INFO +1 -1
  6. {sure_tools-2.1.31 → sure_tools-2.1.33}/setup.py +1 -1
  7. {sure_tools-2.1.31 → sure_tools-2.1.33}/LICENSE +0 -0
  8. {sure_tools-2.1.31 → sure_tools-2.1.33}/README.md +0 -0
  9. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/__init__.py +0 -0
  10. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/assembly/__init__.py +0 -0
  11. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/assembly/assembly.py +0 -0
  12. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/assembly/atlas.py +0 -0
  13. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/atac/__init__.py +0 -0
  14. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/atac/utils.py +0 -0
  15. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/codebook/__init__.py +0 -0
  16. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/codebook/codebook.py +0 -0
  17. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/flow/__init__.py +0 -0
  18. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/flow/flow_stats.py +0 -0
  19. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/perturb/__init__.py +0 -0
  20. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/perturb/perturb.py +0 -0
  21. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/utils/__init__.py +0 -0
  22. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/utils/custom_mlp.py +0 -0
  23. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/utils/queue.py +0 -0
  24. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE/utils/utils.py +0 -0
  25. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE_tools.egg-info/SOURCES.txt +0 -0
  26. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE_tools.egg-info/dependency_links.txt +0 -0
  27. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE_tools.egg-info/entry_points.txt +0 -0
  28. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE_tools.egg-info/requires.txt +0 -0
  29. {sure_tools-2.1.31 → sure_tools-2.1.33}/SURE_tools.egg-info/top_level.txt +0 -0
  30. {sure_tools-2.1.31 → sure_tools-2.1.33}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SURE-tools
3
- Version: 2.1.31
3
+ Version: 2.1.33
4
4
  Summary: Succinct Representation of Single Cells
5
5
  Home-page: https://github.com/ZengFLab/SURE
6
6
  Author: Feng Zeng
@@ -207,7 +207,6 @@ class PerturbFlow(nn.Module):
207
207
  post_act_fct=post_act_fct,
208
208
  allow_broadcast=self.allow_broadcast,
209
209
  use_cuda=self.use_cuda,
210
- bias=True,
211
210
  )
212
211
  )
213
212
  else:
@@ -111,6 +111,7 @@ class SURE(nn.Module):
111
111
  config_enum: str = 'parallel',
112
112
  use_cuda: bool = False,
113
113
  seed: int = 42,
114
+ zero_bias: bool = True,
114
115
  dtype = torch.float32, # type: ignore
115
116
  ):
116
117
  super().__init__()
@@ -134,6 +135,7 @@ class SURE(nn.Module):
134
135
  self.post_layer_fct = post_layer_fct
135
136
  self.post_act_fct = post_act_fct
136
137
  self.hidden_layer_activation = hidden_layer_activation
138
+ self.use_bias = not zero_bias
137
139
 
138
140
  self.codebook_weights = None
139
141
 
@@ -232,15 +234,26 @@ class SURE(nn.Module):
232
234
  )
233
235
 
234
236
  if self.cell_factor_size>0:
235
- self.cell_factor_effect = MLP(
236
- [self.latent_dim + self.cell_factor_size] + self.decoder_hidden_layers + [self.latent_dim],
237
- activation=activate_fct,
238
- output_activation=None,
239
- post_layer_fct=post_layer_fct,
240
- post_act_fct=post_act_fct,
241
- allow_broadcast=self.allow_broadcast,
242
- use_cuda=self.use_cuda,
243
- )
237
+ if self.use_bias:
238
+ self.cell_factor_effect = MLP(
239
+ [self.latent_dim + self.cell_factor_size] + self.decoder_hidden_layers + [self.latent_dim],
240
+ activation=activate_fct,
241
+ output_activation=None,
242
+ post_layer_fct=post_layer_fct,
243
+ post_act_fct=post_act_fct,
244
+ allow_broadcast=self.allow_broadcast,
245
+ use_cuda=self.use_cuda,
246
+ )
247
+ else:
248
+ self.cell_factor_effect = ZeroBiasMLP(
249
+ [self.latent_dim + self.cell_factor_size] + self.decoder_hidden_layers + [self.latent_dim],
250
+ activation=activate_fct,
251
+ output_activation=None,
252
+ post_layer_fct=post_layer_fct,
253
+ post_act_fct=post_act_fct,
254
+ allow_broadcast=self.allow_broadcast,
255
+ use_cuda=self.use_cuda,
256
+ )
244
257
 
245
258
  self.decoder_concentrate = MLP(
246
259
  [self.latent_dim] + self.decoder_hidden_layers + [self.input_size],
@@ -7,7 +7,7 @@ from matplotlib.colors import ListedColormap
7
7
 
8
8
  def plot_quiver(z_points, delta_z, method='pca', figsize=(6,4), dpi=200,
9
9
  subsample=None, color_by=None, colormap='viridis',
10
- arrow_scale=1.0, arrow_width=0.005, alpha=0.8):
10
+ arrow_scale=1.0, arrow_width=0.002, alpha=0.8):
11
11
  """
12
12
  优化后的quiver可视化函数
13
13
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SURE-tools
3
- Version: 2.1.31
3
+ Version: 2.1.33
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.1.31',
8
+ version='2.1.33',
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