immucellai2 2.1.27__py3-none-any.whl → 2.1.29__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/PrepareData.py +12 -27
- immucellai2/__init__.py +2 -2
- {immucellai2-2.1.27.dist-info → immucellai2-2.1.29.dist-info}/METADATA +1 -1
- {immucellai2-2.1.27.dist-info → immucellai2-2.1.29.dist-info}/RECORD +7 -7
- {immucellai2-2.1.27.dist-info → immucellai2-2.1.29.dist-info}/WHEEL +0 -0
- {immucellai2-2.1.27.dist-info → immucellai2-2.1.29.dist-info}/entry_points.txt +0 -0
- {immucellai2-2.1.27.dist-info → immucellai2-2.1.29.dist-info}/top_level.txt +0 -0
immucellai2/PrepareData.py
CHANGED
|
@@ -8,33 +8,18 @@ import sys
|
|
|
8
8
|
import multiprocessing as mp
|
|
9
9
|
|
|
10
10
|
def SelectGeneForDeconvolution(DFReferenceProfile, FileCoveredGenes="", Method="UsedMarker"):
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
try:
|
|
24
|
-
GeneUsedForDeconvolution0 = pandas.read_table(FileCoveredGenes, sep="\t", header=None).iloc[1].tolist()
|
|
25
|
-
print(f"[DEBUG] head:\n list(islice(GeneUsedForDeconvolution0, 3))")
|
|
26
|
-
GeneUsedForDeconvolution = list(set(GeneUsedForDeconvolution0).intersection(set(DFReferenceProfileGenes)))
|
|
27
|
-
print(f"Successfully loaded {len(GeneUsedForDeconvolution)} marker genes")
|
|
28
|
-
except FileNotFoundError:
|
|
29
|
-
print(f"Error: Marker file not found - {FileCoveredGenes}")
|
|
30
|
-
print("Please check:")
|
|
31
|
-
print("1. Package is installed correctly (pip install --upgrade immucellai2)")
|
|
32
|
-
print("2. Environment variable IMMUCELLAI_CONFIG_DIR is set")
|
|
33
|
-
return []
|
|
34
|
-
except Exception as e:
|
|
35
|
-
print(f"Error reading marker file: {str(e)}")
|
|
36
|
-
return []
|
|
37
|
-
return GeneUsedForDeconvolution
|
|
11
|
+
print("Select the gene for the following deconvolution...")
|
|
12
|
+
GeneUsedForDeconvolution = []
|
|
13
|
+
DFReferenceProfileGenes = DFReferenceProfile.index.values
|
|
14
|
+
if Method == "UsedMarker":
|
|
15
|
+
if FileCoveredGenes == "":
|
|
16
|
+
pkg_marker_path = os.path.join(get_package_dir("immucellai2"), "myconfig/MarkerUsedDeconvolution.txt")
|
|
17
|
+
if os.path.exists(pkg_marker_path):
|
|
18
|
+
FileCoveredGenes = pkg_marker_path
|
|
19
|
+
print(f"[INFO] Found marker file in immucellai2 package: {FileCoveredGenes}")
|
|
20
|
+
GeneUsedForDeconvolution0 = (pandas.read_table(FileCoveredGenes, sep= "\t")).iloc[0].to_list()
|
|
21
|
+
GeneUsedForDeconvolution = list(set(GeneUsedForDeconvolution0).intersection(set(DFReferenceProfileGenes)))
|
|
22
|
+
return GeneUsedForDeconvolution
|
|
38
23
|
|
|
39
24
|
def Obtainmyconfigpath():
|
|
40
25
|
script_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
|
immucellai2/__init__.py
CHANGED
|
@@ -11,12 +11,12 @@ import numpy as np
|
|
|
11
11
|
import random
|
|
12
12
|
|
|
13
13
|
def load_tumor_reference_data():
|
|
14
|
-
from
|
|
14
|
+
from importlib.resources import path
|
|
15
15
|
with path("immucellai2.myconfig", "reference_tumorCelltypes.txt") as file_path:
|
|
16
16
|
return pandas.read_table(file_path, sep="\t", header=0, index_col=0)
|
|
17
17
|
|
|
18
18
|
def load_normal_reference_data():
|
|
19
|
-
from
|
|
19
|
+
from importlib.resources import path
|
|
20
20
|
with path("immucellai2.myconfig", "reference_normalCelltypes.txt") as file_path:
|
|
21
21
|
return pandas.read_table(file_path, sep="\t", header=0, index_col=0)
|
|
22
22
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
immucellai2/Deconvolution.py,sha256=8fYLWKHFf1qahY7qEt5nnsrju7S7kF9f2ch3YXaKQMU,12577
|
|
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=euV1lror7KiNh_UupVaPYsl7F81_nDPCv0AX2QgR8QM,5639
|
|
5
5
|
immucellai2/Time.py,sha256=et3aAqyVDKwP5_tdGIwA6yxdXRbbYemc9wEaPHpQCck,572
|
|
6
|
-
immucellai2/__init__.py,sha256=
|
|
6
|
+
immucellai2/__init__.py,sha256=wi7UznfkskCvT4yj-u1RuyN0SK1tZptpXffIaQW2XkQ,3055
|
|
7
7
|
immucellai2/myclasses.py,sha256=9Rgil00HX_RfOhvpdvUZDsvFi7RdIfXay4V3lRcQsQ8,12409
|
|
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.
|
|
13
|
-
immucellai2-2.1.
|
|
14
|
-
immucellai2-2.1.
|
|
15
|
-
immucellai2-2.1.
|
|
16
|
-
immucellai2-2.1.
|
|
12
|
+
immucellai2-2.1.29.dist-info/METADATA,sha256=UNQSDwTCCPmfR8HgpgYfVCJDZ_EBk3q5QGRWDsEQ2i4,1662
|
|
13
|
+
immucellai2-2.1.29.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
14
|
+
immucellai2-2.1.29.dist-info/entry_points.txt,sha256=asskhaErD37JB_X_4TPB1itaIytWCU-RHFIyVGQ8Jbw,62
|
|
15
|
+
immucellai2-2.1.29.dist-info/top_level.txt,sha256=9r84YbXmTdnKZnK2OGrTsgYPFoSBdk4EkeieDg-7_DY,12
|
|
16
|
+
immucellai2-2.1.29.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|