pythonflex 0.3__tar.gz → 0.3.1__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 (31) hide show
  1. {pythonflex-0.3 → pythonflex-0.3.1}/PKG-INFO +1 -1
  2. {pythonflex-0.3 → pythonflex-0.3.1}/pyproject.toml +1 -1
  3. pythonflex-0.3.1/src/pythonflex/examples/test2.py +11 -0
  4. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/plotting.py +19 -8
  5. {pythonflex-0.3 → pythonflex-0.3.1}/.gitignore +0 -0
  6. {pythonflex-0.3 → pythonflex-0.3.1}/.python-version +0 -0
  7. {pythonflex-0.3 → pythonflex-0.3.1}/README.md +0 -0
  8. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/__init__.py +0 -0
  9. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/analysis.py +0 -0
  10. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/data/__init__.py +0 -0
  11. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/data/dataset/__init__.py +0 -0
  12. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/data/dataset/liver_cell_lines_500_genes.csv +0 -0
  13. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/data/dataset/melanoma_cell_lines_500_genes.csv +0 -0
  14. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/data/dataset/neuroblastoma_cell_lines_500_genes.csv +0 -0
  15. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/data/gold_standard/CORUM.parquet +0 -0
  16. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/data/gold_standard/GOBP.parquet +0 -0
  17. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/data/gold_standard/PATHWAY.parquet +0 -0
  18. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/data/gold_standard/__init__.py +0 -0
  19. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/data/gold_standard/corum.csv +0 -0
  20. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/data/gold_standard/gobp.csv +0 -0
  21. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/data/gold_standard/pathway.csv +0 -0
  22. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/examples/basic_usage.py +0 -0
  23. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/examples/comparison.py +0 -0
  24. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/examples/dataset_filtering.py +0 -0
  25. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/examples/diag.py +0 -0
  26. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/examples/test.py +0 -0
  27. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/logging_config.py +0 -0
  28. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/preprocessing.py +0 -0
  29. {pythonflex-0.3 → pythonflex-0.3.1}/src/pythonflex/utils.py +0 -0
  30. {pythonflex-0.3 → pythonflex-0.3.1}/todo.txt +0 -0
  31. {pythonflex-0.3 → pythonflex-0.3.1}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pythonflex
3
- Version: 0.3
3
+ Version: 0.3.1
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.3"
3
+ version = "0.3.1"
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 = [
@@ -0,0 +1,11 @@
1
+ #%%
2
+ import anndata as ad
3
+
4
+ adata = ad.read_h5ad(
5
+ "C:/Users/yd/Desktop/22mcell/GWCD4i.pseudobulk_merged.h5ad",
6
+ backed="r" # read-only, disk-backed
7
+ )
8
+
9
+ #%%
10
+ adata
11
+ # %%
@@ -58,7 +58,12 @@ def plot_precision_recall_curve(line_width=2.0, hide_minor_ticks=True):
58
58
  log.warning(f"Color map '{cmap_name}' not found. Falling back to 'tab10'.")
59
59
  cmap = get_cmap("tab10")
60
60
 
61
- fig, ax = plt.subplots()
61
+ # Increase figure width to accommodate external legend without squashing axes
62
+ fig, ax = plt.subplots(figsize=(6, 4))
63
+
64
+ # Adjust layout to make room for legend on the right
65
+ plt.subplots_adjust(right=0.7)
66
+
62
67
  ax.set_xscale("log")
63
68
 
64
69
  # optionally hide minor ticks on the log axis
@@ -92,7 +97,7 @@ def plot_precision_recall_curve(line_width=2.0, hide_minor_ticks=True):
92
97
  ax.set(title="",
93
98
  xlabel="Number of True Positives (TP)",
94
99
  ylabel="Precision")
95
- ax.legend(loc="upper right", frameon=False)
100
+ ax.legend(loc="upper left", bbox_to_anchor=(1.05, 1), frameon=False)
96
101
  ax.set_ylim(0, 1)
97
102
 
98
103
  # Nature style: no grid, open top/right spines
@@ -1335,7 +1340,10 @@ def plot_mpr_tp_multi(
1335
1340
  colors = final_colors
1336
1341
 
1337
1342
  if ax is None:
1338
- fig, ax = plt.subplots(figsize=(5, 4))
1343
+ # Increase width slightly
1344
+ fig, ax = plt.subplots(figsize=(6, 4))
1345
+ # Reserve space for legend on right
1346
+ plt.subplots_adjust(right=0.7)
1339
1347
  else:
1340
1348
  fig = ax.figure
1341
1349
 
@@ -1504,7 +1512,10 @@ def plot_mpr_complexes_multi(
1504
1512
  colors = final_colors
1505
1513
 
1506
1514
  if ax is None:
1507
- fig, ax = plt.subplots(figsize=(5, 4))
1515
+ # Increase width slightly
1516
+ fig, ax = plt.subplots(figsize=(6, 4))
1517
+ # Reserve space for legend on right
1518
+ plt.subplots_adjust(right=0.7)
1508
1519
  else:
1509
1520
  fig = ax.figure
1510
1521
 
@@ -1602,12 +1613,12 @@ def _add_vertical_legend(ax, dataset_names, colors, show_filters, linewidth):
1602
1613
  legend1 = ax.legend(
1603
1614
  dataset_handles,
1604
1615
  dataset_names,
1605
- loc="upper right",
1616
+ loc="upper left",
1606
1617
  frameon=False,
1607
1618
  title="Dataset",
1608
1619
  fontsize=7,
1609
1620
  title_fontsize=8,
1610
- bbox_to_anchor=(1.0, 1.0)
1621
+ bbox_to_anchor=(1.05, 1.0)
1611
1622
  )
1612
1623
  ax.add_artist(legend1)
1613
1624
 
@@ -1615,10 +1626,10 @@ def _add_vertical_legend(ax, dataset_names, colors, show_filters, linewidth):
1615
1626
  legend2 = ax.legend(
1616
1627
  filter_handles,
1617
1628
  filter_labels,
1618
- loc="upper right",
1629
+ loc="upper left",
1619
1630
  frameon=False,
1620
1631
  fontsize=7,
1621
- bbox_to_anchor=(1.0, 1.0 - len(dataset_names) * 0.04 - 0.08)
1632
+ bbox_to_anchor=(1.05, 1.0 - len(dataset_names) * 0.06 - 0.1)
1622
1633
  )
1623
1634
 
1624
1635
 
File without changes
File without changes
File without changes
File without changes
File without changes