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

Test actions branch #5

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:


steps:
- uses: actions/checkout@v4
- name: Checkout code with submodules
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -36,4 +37,5 @@ jobs:

- name: Test with pytest
run: |
poetry run pytest
poetry run pytest -s
working-directory: ${{ github.workspace }}
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "data/nf1_schwann_cell_painting_data"]
path = data/nf1_schwann_cell_painting_data
url = git@github.com:WayScience/nf1_schwann_cell_painting_data.git
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,28 @@
# pairwise_compare
# Pairwise Compare
This tool allows the user to compare groups of data specified in a tidy-wide pandas dataframe with ease.
In this repo the capabilities of the PairwiseCompareManger are shown through an example using the nuclear speckle data (`example_pairwise_comparisons.ipynb`).
Although, most of the development efforts can be found in the `src` folder.
Users should almost exclusively interact with the PairwiseCompareManager, however, there may be rare exceptions.
If you choose to interact with another component of the tool, then there will be less input validation safeguards available.

## Data Formats
When passing arguments to the `PairwiseCompareManager` you can specify the columns that remain the same in each group-to-group comparison, and the columns that will be different in these comparisons.
These columns are parameterized by `_same_columns` and `_different_columns`, respectively.
The column values in these columns uniquely define each group.
During pairwise comparisons of groups, all of the column values of the columns specified in `_same_columns` will be the same between both groups compared for all paired combinations of groups.
Likewise, all of the column values of the columns specified in `_different_columns` will be different between both groups compared for all paired combinations of groups.

One of the following column arguments conditions must be satisified when using the `PairwiseCompareManager`:
1. `_same_columns` must include at least one list element if `_different_columns` has less than two list elements.
2. `_different_columns` must contain one or more list elements.
3. `_same_columns` and `_different_columns` should not contain any of the same columns.

## Limitations
1. Input validation is enforced in the `PairwiseCompareManager` and `PairwiseCompare` classes.
2. Additional column values are not tracked aside from columns used to compare groups (_same_columns, _different_columns).
3. Output and input python data structures are limited.
4. All of the data, in the supplied pandas dataframe, is used to compute comparisons.

## Extensibility
This tool compares features between any two groups of a tidy-wide pandas dataframe.
To incorporate additional comparators for making comparisons, you must introduce the functionality as a class and inherit from the `Comparator` class (See `Comparator.py` for details).
Binary file added data/Plate_4_bulk_feature_selected.parquet
Binary file not shown.
1 change: 1 addition & 0 deletions data/nf1_schwann_cell_painting_data
Loading