immucellai2 2.1.29__py3-none-any.whl → 2.1.31__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/Deconvolution.py +22 -25
- immucellai2/PrepareData.py +8 -0
- {immucellai2-2.1.29.dist-info → immucellai2-2.1.31.dist-info}/METADATA +1 -1
- {immucellai2-2.1.29.dist-info → immucellai2-2.1.31.dist-info}/RECORD +7 -7
- {immucellai2-2.1.29.dist-info → immucellai2-2.1.31.dist-info}/WHEEL +0 -0
- {immucellai2-2.1.29.dist-info → immucellai2-2.1.31.dist-info}/entry_points.txt +0 -0
- {immucellai2-2.1.29.dist-info → immucellai2-2.1.31.dist-info}/top_level.txt +0 -0
immucellai2/Deconvolution.py
CHANGED
|
@@ -267,36 +267,33 @@ def MainRun(RunObject, seed=42, MultithreadModule = 'joblib'):
|
|
|
267
267
|
RunObject.SampleList[sample_index],
|
|
268
268
|
RunObject.MAPorMLE
|
|
269
269
|
))
|
|
270
|
-
|
|
271
|
-
MultiprocessingReturnValue = []
|
|
270
|
+
MultiprocessingReturnValue = []
|
|
272
271
|
if MultithreadModule == 'joblib':
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
272
|
+
try:
|
|
273
|
+
MultiprocessingReturnValue = joblib.Parallel(n_jobs=int(EnvironmentRun.ThreadNum), backend='loky',verbose=0)(joblib.delayed(ThreadRunEachSamples)(*arg) for arg in parameterlist)
|
|
274
|
+
except:
|
|
275
|
+
print('error occurs while paralleling')
|
|
276
|
+
finally:
|
|
277
|
+
del parameterlist
|
|
278
|
+
print('finished all!')
|
|
280
279
|
elif MultithreadModule == 'multiprocessing':
|
|
281
280
|
with multiprocessing.Pool(processes=int(EnvironmentRun.ThreadNum)) as pool:
|
|
282
|
-
|
|
283
|
-
ThreadRunEachSamples,
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
) for sample_index in range(nsamples)]
|
|
291
|
-
)
|
|
281
|
+
try:
|
|
282
|
+
MultiprocessingReturnValue = pool.starmap(ThreadRunEachSamples, parameterlist)
|
|
283
|
+
except Exception as e:
|
|
284
|
+
print(f'Error occurs while paralleling: {e}')
|
|
285
|
+
finally:
|
|
286
|
+
pool.close()
|
|
287
|
+
pool.join()
|
|
288
|
+
print('Finished all!')
|
|
292
289
|
MergedResultObject = MergeResultsForAllSample(
|
|
293
|
-
ThreadList=[MultiprocessesResult(
|
|
294
|
-
RunObject.SampleList[
|
|
295
|
-
|
|
296
|
-
deepcopy(RunObject.CellType)
|
|
297
|
-
)
|
|
290
|
+
ThreadList = [MultiprocessesResult(
|
|
291
|
+
SampleName = RunObject.SampleList[Sampleii],
|
|
292
|
+
SamplingResult = MultiprocessingReturnValue[Sampleii],
|
|
293
|
+
CellType=deepcopy(RunObject.CellType),
|
|
294
|
+
) for Sampleii in range(len(MultiprocessingReturnValue))],
|
|
298
295
|
OtherParams=[deepcopy(RunObject.CellType), RunObject.FileCellTypeCategory]
|
|
299
|
-
|
|
296
|
+
)
|
|
300
297
|
RecordTime.ShowCostTime()
|
|
301
298
|
if os.path.exists("TempThread"):
|
|
302
299
|
os.system("rm -rf TempThread")
|
immucellai2/PrepareData.py
CHANGED
|
@@ -6,6 +6,14 @@ import os
|
|
|
6
6
|
import re
|
|
7
7
|
import sys
|
|
8
8
|
import multiprocessing as mp
|
|
9
|
+
import importlib.util
|
|
10
|
+
|
|
11
|
+
def get_package_dir(package_name):
|
|
12
|
+
spec = importlib.util.find_spec(package_name)
|
|
13
|
+
if spec is None:
|
|
14
|
+
raise ModuleNotFoundError(f"Package '{package_name}' not found")
|
|
15
|
+
path = spec.origin or spec.submodule_search_locations[0]
|
|
16
|
+
return os.path.dirname(path)
|
|
9
17
|
|
|
10
18
|
def SelectGeneForDeconvolution(DFReferenceProfile, FileCoveredGenes="", Method="UsedMarker"):
|
|
11
19
|
print("Select the gene for the following deconvolution...")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
immucellai2/Deconvolution.py,sha256=
|
|
1
|
+
immucellai2/Deconvolution.py,sha256=Ai3cE_YhVXyu5OWymnNbRqGWUHdXiTE8FVSmu5pdNvM,12507
|
|
2
2
|
immucellai2/Drawplot.py,sha256=YnUleceEyim9SsTiU18mbAMcjOH9ovBXJW3pwXxA7as,5136
|
|
3
3
|
immucellai2/ObtainCategory.py,sha256=N1F_yUHoaIisnlms4aNNJ2UIzZDI2TIc0t7IRLtM7So,7008
|
|
4
|
-
immucellai2/PrepareData.py,sha256=
|
|
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
7
|
immucellai2/myclasses.py,sha256=9Rgil00HX_RfOhvpdvUZDsvFi7RdIfXay4V3lRcQsQ8,12409
|
|
@@ -9,8 +9,8 @@ immucellai2/myconfig/Celltype.category,sha256=l_5vspGpyDbuaQ7QOLIQjSs4xb6x6_pvvt
|
|
|
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.
|
|
13
|
-
immucellai2-2.1.
|
|
14
|
-
immucellai2-2.1.
|
|
15
|
-
immucellai2-2.1.
|
|
16
|
-
immucellai2-2.1.
|
|
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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|