immucellai2 2.1.28__tar.gz → 2.1.29__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.
Files changed (21) hide show
  1. {immucellai2-2.1.28 → immucellai2-2.1.29}/PKG-INFO +1 -1
  2. {immucellai2-2.1.28 → immucellai2-2.1.29}/immucellai2/PrepareData.py +12 -27
  3. {immucellai2-2.1.28 → immucellai2-2.1.29}/immucellai2.egg-info/PKG-INFO +1 -1
  4. {immucellai2-2.1.28 → immucellai2-2.1.29}/setup.cfg +1 -1
  5. {immucellai2-2.1.28 → immucellai2-2.1.29}/README.md +0 -0
  6. {immucellai2-2.1.28 → immucellai2-2.1.29}/immucellai2/Deconvolution.py +0 -0
  7. {immucellai2-2.1.28 → immucellai2-2.1.29}/immucellai2/Drawplot.py +0 -0
  8. {immucellai2-2.1.28 → immucellai2-2.1.29}/immucellai2/ObtainCategory.py +0 -0
  9. {immucellai2-2.1.28 → immucellai2-2.1.29}/immucellai2/Time.py +0 -0
  10. {immucellai2-2.1.28 → immucellai2-2.1.29}/immucellai2/__init__.py +0 -0
  11. {immucellai2-2.1.28 → immucellai2-2.1.29}/immucellai2/myclasses.py +0 -0
  12. {immucellai2-2.1.28 → immucellai2-2.1.29}/immucellai2/myconfig/Celltype.category +0 -0
  13. {immucellai2-2.1.28 → immucellai2-2.1.29}/immucellai2/myconfig/MarkerUsedDeconvolution.txt +0 -0
  14. {immucellai2-2.1.28 → immucellai2-2.1.29}/immucellai2/myconfig/reference_normalCelltypes.txt +0 -0
  15. {immucellai2-2.1.28 → immucellai2-2.1.29}/immucellai2/myconfig/reference_tumorCelltypes.txt +0 -0
  16. {immucellai2-2.1.28 → immucellai2-2.1.29}/immucellai2.egg-info/SOURCES.txt +0 -0
  17. {immucellai2-2.1.28 → immucellai2-2.1.29}/immucellai2.egg-info/dependency_links.txt +0 -0
  18. {immucellai2-2.1.28 → immucellai2-2.1.29}/immucellai2.egg-info/entry_points.txt +0 -0
  19. {immucellai2-2.1.28 → immucellai2-2.1.29}/immucellai2.egg-info/requires.txt +0 -0
  20. {immucellai2-2.1.28 → immucellai2-2.1.29}/immucellai2.egg-info/top_level.txt +0 -0
  21. {immucellai2-2.1.28 → immucellai2-2.1.29}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: immucellai2
3
- Version: 2.1.28
3
+ Version: 2.1.29
4
4
  Summary: A tool for immune cell type deconvolution
5
5
  Home-page: https://github.com/VyvyanYjm/ImmuCellAI2.0
6
6
  Author: YangJingmin
@@ -8,33 +8,18 @@ import sys
8
8
  import multiprocessing as mp
9
9
 
10
10
  def SelectGeneForDeconvolution(DFReferenceProfile, FileCoveredGenes="", Method="UsedMarker"):
11
- print("Select the gene for the following deconvolution...")
12
- GeneUsedForDeconvolution = []
13
- DFReferenceProfileGenes = DFReferenceProfile.index.values
14
- if Method == "UsedMarker":
15
- if FileCoveredGenes == "":
16
- try:
17
- marker_path = files("immucellai2.myconfig").joinpath("MarkerUsedDeconvolution.txt")
18
- FileCoveredGenes = str(marker_path)
19
- except Exception as e:
20
- script_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
21
- FileCoveredGenes = os.path.join(script_dir, "immucellai2/myconfig/MarkerUsedDeconvolution.txt")
22
- print(f"[WARNING] Using fallback path: {FileCoveredGenes}")
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]))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: immucellai2
3
- Version: 2.1.28
3
+ Version: 2.1.29
4
4
  Summary: A tool for immune cell type deconvolution
5
5
  Home-page: https://github.com/VyvyanYjm/ImmuCellAI2.0
6
6
  Author: YangJingmin
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = immucellai2
3
- version = 2.1.28
3
+ version = 2.1.29
4
4
  author = YangJingmin
5
5
  author_email = yangjingmin2021@163.com
6
6
  description = A tool for immune cell type deconvolution
File without changes