Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.4.4 #76

Merged
merged 22 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
19512eb
added doc strings and inline comments
axiomcura Dec 16, 2024
b4025b0
Merge remote-tracking branch 'origin/main' into doc-strings
axiomcura Dec 16, 2024
68ddeb8
executed ruff
axiomcura Dec 16, 2024
73cc0fb
updated docstrings and type hinting in compute module
axiomcura Dec 18, 2024
dc8515a
updated type hinting for 3.8 support
axiomcura Dec 18, 2024
f9115a0
updated error message
axiomcura Dec 18, 2024
6d68eee
updated error messages
axiomcura Dec 18, 2024
f7a9436
chore: update license year to 2025
shntnu Jan 3, 2025
eb1e5e2
feat(map): add num workers as param
alxndrkalinin Jan 30, 2025
d3cba88
refactor(compute): use index-based null instead of binary; uint dtype…
alxndrkalinin Jan 30, 2025
df344c6
chore: ruff format
alxndrkalinin Feb 3, 2025
e36c3b2
chore(demo): add reference_index to pos_sameby, increase null size
alxndrkalinin Feb 3, 2025
8668420
chore: bump version to 0.4.4
alxndrkalinin Feb 3, 2025
28fcc4a
chore: ruff format demo
alxndrkalinin Feb 3, 2025
fb0898c
feat(matching): add func for assigning reference index col
alxndrkalinin Feb 3, 2025
d2030fa
refactor(examples): add null size example; split activity & consistency
alxndrkalinin Feb 4, 2025
bc49fd4
using np.nonzero
johnarevalo Feb 4, 2025
f595368
Add test for assign reference index function
johnarevalo Feb 4, 2025
0bb7b98
fix(tests): limit ref column test to 2 labels
alxndrkalinin Feb 4, 2025
c3aecb9
chore: gitignore vscode
alxndrkalinin Feb 4, 2025
b0f0129
Update ref_index test
johnarevalo Feb 5, 2025
716bea4
Fix #71: Add docstring validation
johnarevalo Feb 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,6 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

examples/data/
.vscode/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2024, Broad Institute
Copyright (c) 2025, Broad Institute

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ pytest

We provide examples demonstrating how to use copairs for:
- [grouping profiles based on their metadata](./examples/finding_pairs.ipynb)
- [calculating mAP to assess phenotypic activity and consistnecy of perturbation using real data](./examples/mAP_demo.ipynb)

- [calculating mAP to assess phenotypic activity of perturbations](./examples/phenotypic_activity.ipynb)
- [calculating mAP to assess phenotypic consistency of perturbations](./examples/phenotypic_consistency.ipynb)
- [estimating null size for mAP p-value calculation](./examples/null_size.ipynb)

## Citation
If you find this work useful for your research, please cite our [pre-print](https://doi.org/10.1101/2024.04.01.587631):
Expand Down
32 changes: 32 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Examples

Example notebooks demostrating the use of `copairs`.

## Installation

To install dependencies for running examples, run:
```bash
pip install copairs[demo]
```

## Running examples

```bash
cd examples
notebook
```

## List of examples

We show how to use copairs for:

- [grouping profiles based on their metadata](./finding_pairs.ipynb)
- [calculating mAP to assess phenotypic activity of perturbations](./phenotypic_activity.ipynb)
- [calculating mAP to assess phenotypic consistency of perturbations](./phenotypic_consistency.ipynb)
- [estimating null size for mAP p-value calculation](./null_size.ipynb)

## Data used

In these examples, we used a single plate of profiles from the dataset "cpg0004" (aka LINCS), which contains Cell Painting images of 1,327 small-molecule perturbations of A549 human cells. The wells on each plate were perturbed with 56 different compounds in six different doses.

> Way, G. P. et al. Morphology and gene expression profiling provide complementary information for mapping cell state. Cell Syst 13, 911–923.e9 (2022).
6 changes: 3 additions & 3 deletions examples/finding_pairs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -278,7 +278,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "map_benchmark",
"display_name": "copairs",
"language": "python",
"name": "python3"
},
Expand All @@ -292,7 +292,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
"version": "3.9.19"
}
},
"nbformat": 4,
Expand Down
Loading