🧬 Abstract
Genetic networks derived from omics data are a powerful tool for systematic gene function prediction. Performance evaluation of such predictions is crucial to judge the data and computational pipeline to derive the networks, but functional diversity within protein complex or pathway standards often cause hidden evaluation biases. To visualize and mitigate such biases, we recently developed an R package FLEX. Here, we present the FLEX genetic network benchmarking tool as Python library with new and improved functionality. The pythonFLEX library improves the overall runtime 4.1 to 15.8-fold. It offers additional evaluation metrics that allow for an easy comparison of precision recall performance at the complex or pathway resolution between genetic networks. We demonstrate the utility of pythonFLEX for evaluating tissue-specific co-essentiality networks and data normalization strategies of the Cancer Dependency Map. This illustrates how different biological module-resolved precision recall metrics in pythonFLEX enable sensitive and fast evaluation of genetic networks.
- Precision-recall curve generation for ranked gene lists
- Evaluation using CORUM complexes, GO terms, pathways
- Complex-level resolution analysis and visualization
- Easy integration into CRISPR screen workflows
Suggested to use Python version 3.10 with virtual env.
Create venv:
conda create -n p310 python=3.10
conda activate p310
pip install uvInstall pFLEX via pip:
uv pip install pflexor:
pip install pflexor install pFLEX via git to develop the package locally:
git clone https://github.com/tyasird/pFLEX.git
cd pFLEX
uv pip install -e .import pflex as flex
inputs = {
"Melanoma (63 Screens)": {
"path": flex.get_example_data_path("melanoma_cell_lines_500_genes.csv"),
"sort": "high",
"color": "#FF0000",
},
"Liver (24 Screens)": {
"path": flex.get_example_data_path("liver_cell_lines_500_genes.csv"),
"sort": "high",
"color": "#FFDD00",
},
"Neuroblastoma (37 Screens)": {
"path": flex.get_example_data_path("neuroblastoma_cell_lines_500_genes.csv"),
"sort": "high",
"color": "#FFDDDD",
},
}
default_config = {
"min_genes_in_complex": 0,
"min_genes_per_complex_analysis": 3,
"output_folder": "CORUM",
"gold_standard": "CORUM",
"color_map": "BuGn",
"jaccard": False,
"use_common_genes": False,
"plotting": {
"save_plot": True,
"output_type": "png",
},
"preprocessing": {
"fill_na": True,
"normalize": False,
},
"corr_function": "numpy",
"logging": {
"visible_levels": ["DONE"],
},
}
flex.initialize(default_config)
data, _ = flex.load_datasets(inputs)
terms, genes_in_terms = flex.load_gold_standard()
for name, dataset in data.items():
pra = flex.pra(name, dataset, is_corr=False)
fpc = flex.pra_percomplex(name, dataset, is_corr=False)
cc = flex.complex_contributions(name)
flex.mpr_prepare(name)
flex.plot_precision_recall_curve()
flex.plot_auc_scores()
flex.plot_significant_complexes()
flex.plot_percomplex_scatter(n_top=20)
flex.plot_percomplex_scatter_bysize()
flex.plot_complex_contributions()
flex.plot_mpr_tp_multi()
flex.plot_mpr_complexes_multi()
flex.save_results_to_csv()MIT