pythonflex 0.1.1__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.
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pythonflex
|
|
3
|
+
Version: 0.1.1
|
|
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
|
+
Author-email: Yasir Demirtaş <tyasird@hotmail.com>
|
|
6
|
+
Requires-Python: >=3.9
|
|
7
|
+
Requires-Dist: adjusttext
|
|
8
|
+
Requires-Dist: art
|
|
9
|
+
Requires-Dist: bitarray
|
|
10
|
+
Requires-Dist: emoji
|
|
11
|
+
Requires-Dist: importlib-resources
|
|
12
|
+
Requires-Dist: ipython
|
|
13
|
+
Requires-Dist: joblib
|
|
14
|
+
Requires-Dist: loguru
|
|
15
|
+
Requires-Dist: matplotlib
|
|
16
|
+
Requires-Dist: numba
|
|
17
|
+
Requires-Dist: numpy
|
|
18
|
+
Requires-Dist: pandas
|
|
19
|
+
Requires-Dist: pyarrow
|
|
20
|
+
Requires-Dist: python-slugify
|
|
21
|
+
Requires-Dist: scikit-learn
|
|
22
|
+
Requires-Dist: scipy
|
|
23
|
+
Requires-Dist: tqdm
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# pythonFLEX
|
|
27
|
+
|
|
28
|
+
🧬 **pythonFLEX** is a benchmarking toolkit for evaluating CRISPR screen results against biological gold standards. It provides precision-recall analysis using reference gene sets from CORUM protein complexes, Gene Ontology Biological Processes (GO-BP), KEGG pathways, and other curated resources. The toolkit computes gene-level and complex-level performance metrics, helping researchers systematically assess the biological relevance and resolution of their CRISPR screening data.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 🔧 Features
|
|
34
|
+
|
|
35
|
+
- Precision-recall curve generation for ranked gene lists
|
|
36
|
+
|
|
37
|
+
- Evaluation using CORUM complexes, GO terms, pathways
|
|
38
|
+
|
|
39
|
+
- Complex-level resolution analysis and visualization
|
|
40
|
+
|
|
41
|
+
- Easy integration into CRISPR screen workflows
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 📦 Installation
|
|
46
|
+
|
|
47
|
+
Suggested to use Python version `3.10` with `virtual env`.
|
|
48
|
+
|
|
49
|
+
Create `venv`
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
conda create -n p310 python=3.10
|
|
53
|
+
conda activate p310
|
|
54
|
+
pip install uv
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Install pythonFLEX via pip
|
|
58
|
+
|
|
59
|
+
``` bash
|
|
60
|
+
uv pip install pythonflex
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
or
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install pythonflex
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
or Install pythonFLEX via git (to develop package in local)
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
git clone https://github.com/tyasird/pythonFLEX.git
|
|
73
|
+
cd pythonFLEX
|
|
74
|
+
uv pip install -e .
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 🚀 Quickstart
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
|
|
85
|
+
import pythonflex as flex
|
|
86
|
+
|
|
87
|
+
inputs = {
|
|
88
|
+
"Melanoma (63 Screens)": {
|
|
89
|
+
"path": flex.get_example_data_path("melanoma_cell_lines_500_genes.csv"),
|
|
90
|
+
"sort": "high"
|
|
91
|
+
},
|
|
92
|
+
"Liver (24 Screens)": {
|
|
93
|
+
"path": flex.get_example_data_path("liver_cell_lines_500_genes.csv"),
|
|
94
|
+
"sort": "high"
|
|
95
|
+
},
|
|
96
|
+
"Neuroblastoma (37 Screens)": {
|
|
97
|
+
"path": flex.get_example_data_path("neuroblastoma_cell_lines_500_genes.csv"),
|
|
98
|
+
"sort": "high"
|
|
99
|
+
},
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
default_config = {
|
|
105
|
+
"min_genes_in_complex": 2,
|
|
106
|
+
"min_genes_per_complex_analysis": 2,
|
|
107
|
+
"output_folder": "output",
|
|
108
|
+
"gold_standard": "GOBP",
|
|
109
|
+
"color_map": "RdYlBu",
|
|
110
|
+
"jaccard": True,
|
|
111
|
+
"plotting": {
|
|
112
|
+
"save_plot": True,
|
|
113
|
+
"output_type": "png",
|
|
114
|
+
},
|
|
115
|
+
"preprocessing": {
|
|
116
|
+
"fill_na": True,
|
|
117
|
+
"normalize": False,
|
|
118
|
+
},
|
|
119
|
+
"corr_function": "numpy",
|
|
120
|
+
"logging": {
|
|
121
|
+
"visible_levels": ["DONE","STARTED"] # "PROGRESS", "STARTED", ,"INFO","WARNING"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
# Initialize logger, config, and output folder
|
|
127
|
+
flex.initialize(default_config)
|
|
128
|
+
|
|
129
|
+
# Load datasets and gold standard terms
|
|
130
|
+
data, _ = flex.load_datasets(inputs)
|
|
131
|
+
terms, genes_in_terms = flex.load_gold_standard()
|
|
132
|
+
|
|
133
|
+
# Run analysis
|
|
134
|
+
for name, dataset in data.items():
|
|
135
|
+
df, pr_auc = flex.pra(name, dataset)
|
|
136
|
+
fpc = flex.pra_percomplex(name, dataset, is_corr=False)
|
|
137
|
+
cc = flex.complex_contributions(name)
|
|
138
|
+
|
|
139
|
+
# Generate plots
|
|
140
|
+
flex.plot_auc_scores()
|
|
141
|
+
flex.plot_precision_recall_curve()
|
|
142
|
+
flex.plot_percomplex_scatter()
|
|
143
|
+
flex.plot_percomplex_scatter_bysize()
|
|
144
|
+
flex.plot_significant_complexes()
|
|
145
|
+
flex.plot_complex_contributions()
|
|
146
|
+
|
|
147
|
+
# Save Result CSVspyflex.save_results_to_csv()
|
|
148
|
+
flex.save_results_to_csv()
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## 📂 Examples
|
|
156
|
+
|
|
157
|
+
- [src/pythonflex/examples/basic_usage.py](src/pythonflex/examples/basic_usage.py)
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## 📃 License
|
|
162
|
+
|
|
163
|
+
MIT
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
pythonflex-0.1.1.dist-info/METADATA,sha256=CbK0GfAKlqWfcqBDr-jGLAYdbgZKmfYGVB1rK9vjeO4,3928
|
|
2
|
+
pythonflex-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
3
|
+
pythonflex-0.1.1.dist-info/entry_points.txt,sha256=37liK1baI_CRVDivpjsn8JDClL9_YeTTuSMAZ3Ty7oE,47
|
|
4
|
+
pythonflex-0.1.1.dist-info/RECORD,,
|