SURE-tools 3.7.1__tar.gz → 3.7.3__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 (27) hide show
  1. {sure_tools-3.7.1 → sure_tools-3.7.3}/PKG-INFO +1 -1
  2. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE/SURE_vae.py +7 -32
  3. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE_tools.egg-info/PKG-INFO +1 -1
  4. {sure_tools-3.7.1 → sure_tools-3.7.3}/setup.py +1 -1
  5. {sure_tools-3.7.1 → sure_tools-3.7.3}/LICENSE +0 -0
  6. {sure_tools-3.7.1 → sure_tools-3.7.3}/README.md +0 -0
  7. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE/SURE.py +0 -0
  8. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE/SUREMO.py +0 -0
  9. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE/SURE_nsf.py +0 -0
  10. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE/SURE_vanilla.py +0 -0
  11. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE/__init__.py +0 -0
  12. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE/atac/__init__.py +0 -0
  13. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE/atac/utils.py +0 -0
  14. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE/dist/__init__.py +0 -0
  15. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE/dist/negbinomial.py +0 -0
  16. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE/graph/__init__.py +0 -0
  17. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE/graph/graph_utils.py +0 -0
  18. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE/utils/__init__.py +0 -0
  19. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE/utils/custom_mlp.py +0 -0
  20. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE/utils/label.py +0 -0
  21. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE/utils/queue.py +0 -0
  22. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE/utils/utils.py +0 -0
  23. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE_tools.egg-info/SOURCES.txt +0 -0
  24. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE_tools.egg-info/dependency_links.txt +0 -0
  25. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE_tools.egg-info/requires.txt +0 -0
  26. {sure_tools-3.7.1 → sure_tools-3.7.3}/SURE_tools.egg-info/top_level.txt +0 -0
  27. {sure_tools-3.7.1 → sure_tools-3.7.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SURE-tools
3
- Version: 3.7.1
3
+ Version: 3.7.3
4
4
  Summary: Succinct Representation of Single Cells
5
5
  Home-page: https://github.com/ZengFLab/SURE
6
6
  Author: Feng Zeng
@@ -256,12 +256,12 @@ class SUREVAE(nn.Module):
256
256
  )
257
257
 
258
258
  if np.sum(self.condition_sizes)>0:
259
- self.decoder_condition_effects = nn.ModuleList()
259
+ self.condition_effects = nn.ModuleList()
260
260
  for condition_size in self.condition_sizes:
261
- self.decoder_condition_effects.append(ZeroBiasMLP3(
262
- [condition_size + self.latent_dim] + self.decoder_hidden_layers + [[self.latent_dim,self.latent_dim]],
261
+ self.condition_effects.append(ZeroBiasMLP3(
262
+ [condition_size + self.latent_dim] + self.decoder_hidden_layers + [self.latent_dim],
263
263
  activation=activate_fct,
264
- output_activation=[None,Exp],
264
+ output_activation=None,
265
265
  post_layer_fct=post_layer_fct,
266
266
  post_act_fct=post_act_fct,
267
267
  allow_broadcast=self.allow_broadcast,
@@ -269,20 +269,6 @@ class SUREVAE(nn.Module):
269
269
  )
270
270
  )
271
271
 
272
- self.encoder_condition_effects = self.decoder_condition_effects
273
- '''self.encoder_condition_effects = nn.ModuleList()
274
- for condition_size in self.condition_sizes:
275
- self.encoder_condition_effects.append(ZeroBiasMLP3(
276
- [condition_size + self.latent_dim] + self.decoder_hidden_layers + [[self.latent_dim,self.latent_dim]],
277
- activation=activate_fct,
278
- output_activation=[None,Exp],
279
- post_layer_fct=post_layer_fct,
280
- post_act_fct=post_act_fct,
281
- allow_broadcast=self.allow_broadcast,
282
- use_cuda=self.use_cuda,
283
- )
284
- )'''
285
-
286
272
  if self.covariate_size>0:
287
273
  self.covariate_effect = ZeroBiasMLP2(
288
274
  [self.covariate_size] + self.decoder_hidden_layers + [self.latent_dim],
@@ -424,10 +410,7 @@ class SUREVAE(nn.Module):
424
410
  shift = 0
425
411
  for i, condition_size in enumerate(self.condition_sizes):
426
412
  cs_i = cs[:,shift:(shift+condition_size)]
427
- l,s = self.decoder_condition_effects[i]([cs_i,zns])
428
- zcs_i = pyro.sample(f'zcs_{i}', dist.Normal(l, s).to_event(1))
429
- #zcs += self.condition_effects[i]([cs_i,zns])
430
- zcs += zcs_i
413
+ zcs += self.condition_effects[i]([cs_i,zns])
431
414
  shift += condition_size
432
415
  else:
433
416
  zcs = torch.zeros_like(zs)
@@ -475,13 +458,6 @@ class SUREVAE(nn.Module):
475
458
 
476
459
  zn_loc, zn_scale = self.encoder_zn(xs)
477
460
  zns = pyro.sample('zn', dist.Normal(zn_loc, zn_scale).to_event(1))
478
-
479
- shift = 0
480
- for i, condition_size in enumerate(self.condition_sizes):
481
- cs_i = cs[:,shift:(shift+condition_size)]
482
- l,s = self.encoder_condition_effects[i]([cs_i,zns])
483
- zcs_i = pyro.sample(f'zcs_{i}', dist.Normal(l, s).to_event(1))
484
- shift += condition_size
485
461
 
486
462
  #alpha = self.encoder_n(zns)
487
463
  alpha = self.encoder_alpha(zns)
@@ -627,7 +603,7 @@ class SUREVAE(nn.Module):
627
603
  C_batch = cs[idx].to(self.get_device())
628
604
 
629
605
  z_basal = self._get_cell_embedding(X_batch)
630
- dzs,_ = self.encoder_condition_effects[i]([C_batch,z_basal])
606
+ dzs = self.condition_effects[i]([C_batch,z_basal])
631
607
 
632
608
  A.append(tensor_to_numpy(dzs))
633
609
  pbar.update(1)
@@ -671,8 +647,7 @@ class SUREVAE(nn.Module):
671
647
  shift = 0
672
648
  for i, condition_size in enumerate(self.condition_sizes):
673
649
  C_batch_i = C_batch[:, shift:(shift+condition_size)]
674
- zcs_i,_ = self.encoder_condition_effects[i]([C_batch_i,z_basal])
675
- zcs += zcs_i
650
+ zcs += self.condition_effects[i]([C_batch_i,z_basal])
676
651
  shift += condition_size
677
652
 
678
653
  zfs = torch.zeros_like(z_basal)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SURE-tools
3
- Version: 3.7.1
3
+ Version: 3.7.3
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='3.7.1',
8
+ version='3.7.3',
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
File without changes
File without changes
File without changes