copairs
is a Python package for finding groups of profiles based on metadata and calculate mean Average Precision to assess intra- vs inter-group similarities.
copairs supports Python 3.8+ and should work with all modern operating systems (tested with MacOS 13.5, Ubuntu 18.04, Windows 10).
copairs depends on widely used Python packages:
- numpy
- pandas
- tqdm
- statsmodels
- [optional] plotly
To install copairs and dependencies, run:
pip install copairs
To also install dependencies for running examples, run:
pip install copairs[demo]
To run tests, run:
pip install -e .[test]
pytest
We provide examples demonstrating how to use copairs for:
- grouping profiles based on their metadata
- calculating mAP to assess phenotypic activity of perturbations
- calculating mAP to assess phenotypic consistency of perturbations
- estimating null size for mAP p-value calculation
If you find this work useful for your research, please cite our paper:
Kalinin, A.A., Arevalo, J., Serrano, E., Vulliard, L., Tsang, H., Bornholdt, M., Muñoz, A.F., Sivagurunathan, S., Rajwa, B., Carpenter, A.E., Way, G.P. and Singh, S., 2025. A versatile information retrieval framework for evaluating profile strength and similarity. Nature Communications 16, 5181. doi:10.1038/s41467-025-60306-2
BibTeX:
@article{kalinin2025versatile,
author = {Kalinin, Alexandr A. and Arevalo, John and Serrano, Erik and Vulliard, Loan and Tsang, Hillary and Bornholdt, Michael and Muñoz, Alán F. and Sivagurunathan, Suganya and Rajwa, Bartek and Carpenter, Anne E. and Way, Gregory P. and Singh, Shantanu},
title = {A versatile information retrieval framework for evaluating profile strength and similarity},
journal = {Nature Communications},
year = {2025},
volume = {16},
number = {1},
pages = {5181},
doi = {10.1038/s41467-025-60306-2},
url = {https://doi.org/10.1038/s41467-025-60306-2},
issn = {2041-1723}
}