immucellai2 2.1.31__py3-none-any.whl → 2.1.32__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.
immucellai2/myclasses.py CHANGED
@@ -99,16 +99,10 @@ class CLASS_FOR_RUNRESULT(object):
99
99
  self.EmceeFunction2( McSamplingResultList[sampleii, :, :, :] )
100
100
  return NewMcSamplingResultList
101
101
  def optimized_calculation(self, FlatSamplingResultOne, nCellType):
102
- row_sums = FlatSamplingResultOne.sum(axis=1, keepdims=True)
103
- row_sums_safe = row_sums + 1e-10
104
- if FlatSamplingResultOne.shape[1] == nCellType:
105
- return FlatSamplingResultOne / row_sums_safe
106
- elif FlatSamplingResultOne.shape[1] + 1 == nCellType:
107
- normalized = FlatSamplingResultOne / row_sums_safe
108
- last_col = 1 - normalized.sum(axis=1, keepdims=True)
109
- return numpy.column_stack((normalized, last_col))
110
- else:
111
- raise ValueError(f"Dimension mismatch: input {FlatSamplingResultOne.shape[1]} columns, target {nCellType}columns")
102
+ if FlatSamplingResultOne.shape[1] == nCellType:
103
+ return FlatSamplingResultOne / FlatSamplingResultOne.sum(axis=1)[:, None]
104
+ elif FlatSamplingResultOne.shape[1] + 1 == nCellType:
105
+ return numpy.column_stack((FlatSamplingResultOne, 1 - FlatSamplingResultOne.sum(axis=1)))
112
106
  def EmceeFunction2(self, FlatSamplingResultList):
113
107
  fshape = FlatSamplingResultList.shape
114
108
  nCellType = len(self.CellType)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: immucellai2
3
- Version: 2.1.31
3
+ Version: 2.1.32
4
4
  Summary: A tool for immune cell type deconvolution
5
5
  Home-page: https://github.com/VyvyanYjm/ImmuCellAI2.0
6
6
  Author: YangJingmin
@@ -4,13 +4,13 @@ immucellai2/ObtainCategory.py,sha256=N1F_yUHoaIisnlms4aNNJ2UIzZDI2TIc0t7IRLtM7So
4
4
  immucellai2/PrepareData.py,sha256=tJWtQbfFfXszAQMnAmyzFrXB40wgHl48WP3WZKfeifg,5935
5
5
  immucellai2/Time.py,sha256=et3aAqyVDKwP5_tdGIwA6yxdXRbbYemc9wEaPHpQCck,572
6
6
  immucellai2/__init__.py,sha256=wi7UznfkskCvT4yj-u1RuyN0SK1tZptpXffIaQW2XkQ,3055
7
- immucellai2/myclasses.py,sha256=9Rgil00HX_RfOhvpdvUZDsvFi7RdIfXay4V3lRcQsQ8,12409
7
+ immucellai2/myclasses.py,sha256=LFVMgIwraRrw_uv4g5BG-799AiH3apHXc-mBlAlYRd4,12120
8
8
  immucellai2/myconfig/Celltype.category,sha256=l_5vspGpyDbuaQ7QOLIQjSs4xb6x6_pvvtnP709CVzQ,5530
9
9
  immucellai2/myconfig/MarkerUsedDeconvolution.txt,sha256=33gCFD1_Clis7NFaQTUHc5s7BXoN61jWgWPgjT-m0n0,60756
10
10
  immucellai2/myconfig/reference_normalCelltypes.txt,sha256=zhKP5Z1TgVyB6ijIamjM1ETmuwQgRATofO-0ds89gP4,39107049
11
11
  immucellai2/myconfig/reference_tumorCelltypes.txt,sha256=xYgjehHIXb5re20bmXeoqxfyvQmgpr4y-0ysCVnEeI8,40893156
12
- immucellai2-2.1.31.dist-info/METADATA,sha256=SCPG7R6NhSKAaAkxPkANPa8LVvs4O2owcR-GB6U4FYg,1662
13
- immucellai2-2.1.31.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
14
- immucellai2-2.1.31.dist-info/entry_points.txt,sha256=asskhaErD37JB_X_4TPB1itaIytWCU-RHFIyVGQ8Jbw,62
15
- immucellai2-2.1.31.dist-info/top_level.txt,sha256=9r84YbXmTdnKZnK2OGrTsgYPFoSBdk4EkeieDg-7_DY,12
16
- immucellai2-2.1.31.dist-info/RECORD,,
12
+ immucellai2-2.1.32.dist-info/METADATA,sha256=w38DgKWAAk7CitVbgQCeFPrzutbR6d--KeHeRIsVhTM,1662
13
+ immucellai2-2.1.32.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
14
+ immucellai2-2.1.32.dist-info/entry_points.txt,sha256=asskhaErD37JB_X_4TPB1itaIytWCU-RHFIyVGQ8Jbw,62
15
+ immucellai2-2.1.32.dist-info/top_level.txt,sha256=9r84YbXmTdnKZnK2OGrTsgYPFoSBdk4EkeieDg-7_DY,12
16
+ immucellai2-2.1.32.dist-info/RECORD,,