SURE-tools 2.1.52__tar.gz → 2.1.53__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.52 → sure_tools-2.1.53}/PKG-INFO +1 -1
  2. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/PerturbFlow.py +13 -5
  3. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE_tools.egg-info/PKG-INFO +1 -1
  4. {sure_tools-2.1.52 → sure_tools-2.1.53}/setup.py +1 -1
  5. {sure_tools-2.1.52 → sure_tools-2.1.53}/LICENSE +0 -0
  6. {sure_tools-2.1.52 → sure_tools-2.1.53}/README.md +0 -0
  7. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/SURE.py +0 -0
  8. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/__init__.py +0 -0
  9. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/assembly/__init__.py +0 -0
  10. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/assembly/assembly.py +0 -0
  11. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/assembly/atlas.py +0 -0
  12. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/atac/__init__.py +0 -0
  13. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/atac/utils.py +0 -0
  14. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/codebook/__init__.py +0 -0
  15. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/codebook/codebook.py +0 -0
  16. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/flow/__init__.py +0 -0
  17. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/flow/flow_stats.py +0 -0
  18. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/flow/plot_quiver.py +0 -0
  19. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/perturb/__init__.py +0 -0
  20. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/perturb/perturb.py +0 -0
  21. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/utils/__init__.py +0 -0
  22. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/utils/custom_mlp.py +0 -0
  23. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/utils/queue.py +0 -0
  24. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE/utils/utils.py +0 -0
  25. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE_tools.egg-info/SOURCES.txt +0 -0
  26. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE_tools.egg-info/dependency_links.txt +0 -0
  27. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE_tools.egg-info/entry_points.txt +0 -0
  28. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE_tools.egg-info/requires.txt +0 -0
  29. {sure_tools-2.1.52 → sure_tools-2.1.53}/SURE_tools.egg-info/top_level.txt +0 -0
  30. {sure_tools-2.1.52 → sure_tools-2.1.53}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SURE-tools
3
- Version: 2.1.52
3
+ Version: 2.1.53
4
4
  Summary: Succinct Representation of Single Cells
5
5
  Home-page: https://github.com/ZengFLab/SURE
6
6
  Author: Feng Zeng
@@ -317,12 +317,14 @@ class PerturbFlow(nn.Module):
317
317
  if self.loss_func=='negbinomial':
318
318
  total_count = pyro.param("inverse_dispersion", self.inverse_dispersion *
319
319
  xs.new_ones(self.input_size), constraint=constraints.positive)
320
+ elif self.loss_func == 'multinomial':
321
+ total_count = pyro.param('total_count', int(1e8), constraint=constraints.positive_integer)
320
322
 
321
323
  if self.use_zeroinflate:
322
324
  gate_logits = pyro.param("dropout_rate", xs.new_zeros(self.input_size))
323
325
 
324
326
  acs_scale = pyro.param("codebook_scale", xs.new_ones(self.latent_dim), constraint=constraints.positive)
325
-
327
+
326
328
  I = torch.eye(self.code_size)
327
329
  if self.latent_dist=='studentt':
328
330
  acs_dof,acs_loc = self.codebook(I)
@@ -369,7 +371,7 @@ class PerturbFlow(nn.Module):
369
371
  else:
370
372
  pyro.sample('x', dist.Poisson(rate=rate).to_event(1), obs=xs.round())
371
373
  elif self.loss_func == 'multinomial':
372
- pyro.sample('x', dist.Multinomial(total_count=int(1e8), probs=theta), obs=xs)
374
+ pyro.sample('x', dist.Multinomial(total_count=total_count, probs=theta), obs=xs)
373
375
  elif self.loss_func == 'bernoulli':
374
376
  if self.use_zeroinflate:
375
377
  pyro.sample('x', dist.ZeroInflatedDistribution(dist.Bernoulli(logits=log_theta),gate_logits=gate_logits).to_event(1), obs=xs)
@@ -395,6 +397,8 @@ class PerturbFlow(nn.Module):
395
397
  if self.loss_func=='negbinomial':
396
398
  total_count = pyro.param("inverse_dispersion", self.inverse_dispersion *
397
399
  xs.new_ones(self.input_size), constraint=constraints.positive)
400
+ elif self.loss_func == 'multinomial':
401
+ total_count = pyro.param('total_count', int(1e8), constraint=constraints.positive_integer)
398
402
 
399
403
  if self.use_zeroinflate:
400
404
  gate_logits = pyro.param("dropout_rate", xs.new_zeros(self.input_size))
@@ -458,7 +462,7 @@ class PerturbFlow(nn.Module):
458
462
  else:
459
463
  pyro.sample('x', dist.Poisson(rate=rate).to_event(1), obs=xs.round())
460
464
  elif self.loss_func == 'multinomial':
461
- pyro.sample('x', dist.Multinomial(total_count=int(1e8), probs=theta), obs=xs)
465
+ pyro.sample('x', dist.Multinomial(total_count=total_count, probs=theta), obs=xs)
462
466
  elif self.loss_func == 'bernoulli':
463
467
  if self.use_zeroinflate:
464
468
  pyro.sample('x', dist.ZeroInflatedDistribution(dist.Bernoulli(logits=log_theta),gate_logits=gate_logits).to_event(1), obs=xs)
@@ -484,6 +488,8 @@ class PerturbFlow(nn.Module):
484
488
  if self.loss_func=='negbinomial':
485
489
  total_count = pyro.param("inverse_dispersion", self.inverse_dispersion *
486
490
  xs.new_ones(self.input_size), constraint=constraints.positive)
491
+ elif self.loss_func == 'multinomial':
492
+ total_count = pyro.param('total_count', int(1e8), constraint=constraints.positive_integer)
487
493
 
488
494
  if self.use_zeroinflate:
489
495
  gate_logits = pyro.param("dropout_rate", xs.new_zeros(self.input_size))
@@ -553,7 +559,7 @@ class PerturbFlow(nn.Module):
553
559
  else:
554
560
  pyro.sample('x', dist.Poisson(rate=rate).to_event(1), obs=xs.round())
555
561
  elif self.loss_func == 'multinomial':
556
- pyro.sample('x', dist.Multinomial(total_count=int(1e8), probs=theta), obs=xs)
562
+ pyro.sample('x', dist.Multinomial(total_count=total_count, probs=theta), obs=xs)
557
563
  elif self.loss_func == 'bernoulli':
558
564
  if self.use_zeroinflate:
559
565
  pyro.sample('x', dist.ZeroInflatedDistribution(dist.Bernoulli(logits=log_theta),gate_logits=gate_logits).to_event(1), obs=xs)
@@ -577,6 +583,8 @@ class PerturbFlow(nn.Module):
577
583
  if self.loss_func=='negbinomial':
578
584
  total_count = pyro.param("inverse_dispersion", self.inverse_dispersion *
579
585
  xs.new_ones(self.input_size), constraint=constraints.positive)
586
+ elif self.loss_func == 'multinomial':
587
+ total_count = pyro.param('total_count', int(1e8), constraint=constraints.positive_integer)
580
588
 
581
589
  if self.use_zeroinflate:
582
590
  gate_logits = pyro.param("dropout_rate", xs.new_zeros(self.input_size))
@@ -656,7 +664,7 @@ class PerturbFlow(nn.Module):
656
664
  else:
657
665
  pyro.sample('x', dist.Poisson(rate=rate).to_event(1), obs=xs.round())
658
666
  elif self.loss_func == 'multinomial':
659
- pyro.sample('x', dist.Multinomial(total_count=int(1e8), probs=theta), obs=xs)
667
+ pyro.sample('x', dist.Multinomial(total_count=total_count, probs=theta), obs=xs)
660
668
  elif self.loss_func == 'bernoulli':
661
669
  if self.use_zeroinflate:
662
670
  pyro.sample('x', dist.ZeroInflatedDistribution(dist.Bernoulli(logits=log_theta),gate_logits=gate_logits).to_event(1), obs=xs)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SURE-tools
3
- Version: 2.1.52
3
+ Version: 2.1.53
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.52',
8
+ version='2.1.53',
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