pythonflex 0.2.1__tar.gz → 0.2.2__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 (24) hide show
  1. {pythonflex-0.2.1 → pythonflex-0.2.2}/PKG-INFO +1 -1
  2. {pythonflex-0.2.1 → pythonflex-0.2.2}/pyproject.toml +1 -1
  3. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/utils.py +14 -7
  4. {pythonflex-0.2.1 → pythonflex-0.2.2}/.gitignore +0 -0
  5. {pythonflex-0.2.1 → pythonflex-0.2.2}/.python-version +0 -0
  6. {pythonflex-0.2.1 → pythonflex-0.2.2}/README.md +0 -0
  7. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/__init__.py +0 -0
  8. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/analysis.py +0 -0
  9. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/data/dataset/liver_cell_lines_500_genes.csv +0 -0
  10. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/data/dataset/melanoma_cell_lines_500_genes.csv +0 -0
  11. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/data/dataset/neuroblastoma_cell_lines_500_genes.csv +0 -0
  12. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/data/gold_standard/CORUM.parquet +0 -0
  13. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/data/gold_standard/GOBP.parquet +0 -0
  14. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/data/gold_standard/PATHWAY.parquet +0 -0
  15. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/data/gold_standard/corum.csv +0 -0
  16. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/data/gold_standard/gobp.csv +0 -0
  17. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/data/gold_standard/pathway.csv +0 -0
  18. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/examples/basic_usage.py +0 -0
  19. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/examples/dataset_filtering.py +0 -0
  20. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/examples/test.py +0 -0
  21. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/logging_config.py +0 -0
  22. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/plotting.py +0 -0
  23. {pythonflex-0.2.1 → pythonflex-0.2.2}/src/pythonflex/preprocessing.py +0 -0
  24. {pythonflex-0.2.1 → pythonflex-0.2.2}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pythonflex
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: pythonFLEX is a benchmarking toolkit for evaluating CRISPR screen results against biological gold standards. The toolkit computes gene-level and complex-level performance metrics, helping researchers systematically assess the biological relevance and resolution of their CRISPR screening data.
5
5
  Author-email: Yasir Demirtaş <tyasird@hotmail.com>
6
6
  Requires-Python: >=3.9
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pythonflex"
3
- version = "0.2.1"
3
+ version = "0.2.2"
4
4
  description = "pythonFLEX is a benchmarking toolkit for evaluating CRISPR screen results against biological gold standards. The toolkit computes gene-level and complex-level performance metrics, helping researchers systematically assess the biological relevance and resolution of their CRISPR screening data."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -97,21 +97,28 @@ def dload(category, name=None, path=None): # 'path' ignored for compatibility
97
97
  os.remove(full_path) # Delete corrupted file
98
98
  return out
99
99
 
100
- # Load specific name (try extensions in order)
101
- for ext in VALID_EXTS:
100
+ # Load specific name (try extensions in order - PREFER PARQUET over FEATHER)
101
+ # Check parquet first since it's more reliable for complex data
102
+ preferred_order = [".parquet", ".feather", ".npy", ".pkl"]
103
+
104
+ for ext in preferred_order:
105
+ if ext not in VALID_EXTS:
106
+ continue
102
107
  target = _safe_path(category, name, ext)
103
108
  if os.path.exists(target):
104
109
  try:
105
110
  if ext == ".feather":
106
111
  return pd.read_feather(target)
107
- elif ext == ".parquet": # ADDED
112
+ elif ext == ".parquet":
108
113
  return pd.read_parquet(target)
109
114
  elif ext == ".npy":
110
115
  return np.load(target, mmap_mode="r") # MMap for perf
111
116
  elif ext == ".pkl":
112
117
  return joblib.load(target, mmap_mode="r") # MMap for perf
113
- except (EOFError, ValueError, OSError):
114
- print(f"Warning: '{target}' is corrupted. Deleting and returning {{}}...")
115
- os.remove(target)
116
- return {}
118
+ except (EOFError, ValueError, OSError) as e:
119
+ print(f"Warning: '{target}' is corrupted ({e}). Trying next format...")
120
+ os.remove(target) # Delete corrupted file
121
+ continue # Try next format instead of returning {}
122
+
123
+ print(f"Warning: No valid file found for {category}/{name}")
117
124
  return {}
File without changes
File without changes
File without changes
File without changes