SURE-tools 2.1.36__py3-none-any.whl → 2.1.37__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.
SURE/perturb/perturb.py CHANGED
@@ -8,7 +8,7 @@ class LabelMatrix:
8
8
  def __init__(self):
9
9
  self.labels_ = None
10
10
 
11
- def fit_transform(self, labels, control_label, sep_pattern=r'[;_\-\s]', speedup: Literal['none','vectorize','parallel']='none'):
11
+ def fit_transform(self, labels, control_label=None, sep_pattern=r'[;_\-\s]', speedup: Literal['none','vectorize','parallel']='none'):
12
12
  if speedup=='none':
13
13
  mat, self.labels_ = label_to_matrix(labels=labels, sep_pattern=sep_pattern)
14
14
  elif speedup=='vectorize':
@@ -18,9 +18,11 @@ class LabelMatrix:
18
18
 
19
19
  self.labels_ = np.array(self.labels_)
20
20
 
21
- idx = np.where(self.labels_==control_label)[0]
22
- mat = np.delete(mat, idx, axis=1)
23
- self.labels_ = np.delete(self.labels_, idx)
21
+ if control_label is not None:
22
+ idx = np.where(self.labels_==control_label)[0]
23
+ mat = np.delete(mat, idx, axis=1)
24
+ self.labels_ = np.delete(self.labels_, idx)
25
+
24
26
  return mat
25
27
 
26
28
  def inverse_transform(self, matrix):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SURE-tools
3
- Version: 2.1.36
3
+ Version: 2.1.37
4
4
  Summary: Succinct Representation of Single Cells
5
5
  Home-page: https://github.com/ZengFLab/SURE
6
6
  Author: Feng Zeng
@@ -12,14 +12,14 @@ SURE/flow/__init__.py,sha256=rsAjYsh1xVIrxBCuwOE0Q_6N5th1wBgjJceV0ABPG3c,183
12
12
  SURE/flow/flow_stats.py,sha256=cBBsPEDpWNMpbzlyQ3f0385RSrX6_5RCH2caOyi4ihM,9908
13
13
  SURE/flow/plot_quiver.py,sha256=UbmuScUcgbQHeMmjKmgqxjrIjHhiHx0VWct16UMMwuE,8110
14
14
  SURE/perturb/__init__.py,sha256=ouxShhbxZM4r5Gf7GmKiutrsmtyq7QL8rHjhgF0BU08,32
15
- SURE/perturb/perturb.py,sha256=GVNgfNLGKic_jOwuhMLW8VZa2Md_9O3cwL2Dwik-sTI,3476
15
+ SURE/perturb/perturb.py,sha256=uUFUNJzIzvjA_2rN8801Le-i3oS7vOEvFav1w_lSFSE,3544
16
16
  SURE/utils/__init__.py,sha256=QJUOfrXzdWSmoM0P3LH8oKEHttzCWqpDy2UF0F0dtN4,673
17
17
  SURE/utils/custom_mlp.py,sha256=rHnx9jEef02zfCUdbYVCmbuHcDdIBmRgt__wpdpZvYg,8104
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.36.dist-info/licenses/LICENSE,sha256=TFHKwmrAViXQbSX5W-NDItkWFjm45HWOeUniDrqmnu0,1065
21
- sure_tools-2.1.36.dist-info/METADATA,sha256=ImWAYH50tlvLpd6rDzNya96MEQbICgIzbq2I1mcsAzY,2651
22
- sure_tools-2.1.36.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
- sure_tools-2.1.36.dist-info/entry_points.txt,sha256=-nJI8rVe_qqrR0HmfAODzj-JNfEqCcSsyVh6okSqyHk,83
24
- sure_tools-2.1.36.dist-info/top_level.txt,sha256=BtFTebdiJeqra4r6mm-uEtwVRFLZ_IjYsQ7OnalrOvY,5
25
- sure_tools-2.1.36.dist-info/RECORD,,
20
+ sure_tools-2.1.37.dist-info/licenses/LICENSE,sha256=TFHKwmrAViXQbSX5W-NDItkWFjm45HWOeUniDrqmnu0,1065
21
+ sure_tools-2.1.37.dist-info/METADATA,sha256=9OEHt9VYrCralJ-l5Ssbk8lAie-8BGHRvwNNpUUqG_E,2651
22
+ sure_tools-2.1.37.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
+ sure_tools-2.1.37.dist-info/entry_points.txt,sha256=-nJI8rVe_qqrR0HmfAODzj-JNfEqCcSsyVh6okSqyHk,83
24
+ sure_tools-2.1.37.dist-info/top_level.txt,sha256=BtFTebdiJeqra4r6mm-uEtwVRFLZ_IjYsQ7OnalrOvY,5
25
+ sure_tools-2.1.37.dist-info/RECORD,,