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

Cytopy widgets #30

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c26f33a
added automatic cache of the logicle of common values on a grid for 1…
omerwe-eleventx May 12, 2021
f966322
added support for .fcs files" with a smaller than expected number of …
omerwe-eleventx May 12, 2021
7968421
fixed bug in handling of log transform
omerwe-eleventx May 12, 2021
245e65d
Fixed bug in handling of log transform, and better handling of legend…
omerwe-eleventx May 12, 2021
001bb7a
added legend_kwargs for threshold gate
omerwe-eleventx May 20, 2021
9bfb00a
fixed several bugs related to manual ellipse gating
omerwe-eleventx May 20, 2021
43db121
Allow opening FCS files through file handlers
omerwe-eleventx Jun 6, 2021
e161540
Add plot keyword to preview function
omerwe-eleventx Jun 29, 2021
b92e16c
Added legend_kwargs handling to threshold1d
omerwe-eleventx Jun 30, 2021
119c9a3
Print population sizes
omerwe-eleventx Jul 1, 2021
70200c6
Changed order of threshold2d legends
omerwe-eleventx Jul 1, 2021
29c9881
Added handling for transformation of empty vectors (often occurring w…
omerwe-eleventx Jul 1, 2021
d3b516a
Updated cell count text to always be a single line
omerwe-eleventx Jul 2, 2021
d95e104
Fixed a bug in experiment.delete_all_populations()
omerwe-eleventx Jul 4, 2021
147d948
Updated bugfix for experiment.delete_all_populations()
omerwe-eleventx Jul 4, 2021
624d2f1
legend for threshold now prints %cells in a separate line
omerwe-eleventx Jul 4, 2021
1625a53
Changed plotting cells code. We add a new line for threshold gates, b…
omerwe-eleventx Jul 4, 2021
a6f326c
Separate logicle_cache into a new file
omerwe-eleventx Jul 19, 2021
602f3d1
Merge branch 'master' into 2.0.1
omerwe-eleventx Jul 19, 2021
0498956
create cytopy_widgets
omerwe-eleventx Aug 15, 2021
c021aed
Create README.md
omerwe-eleventx Aug 15, 2021
5e60a3c
Rename LICENSE to cytopy/cytopy_widgets/LICENSE.txt
omerwe-eleventx Aug 15, 2021
c84156d
Update README.md
omerwe-eleventx Aug 15, 2021
9759d0c
Update README.md
omerwe-eleventx Aug 15, 2021
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
11 changes: 0 additions & 11 deletions LICENSE

This file was deleted.

674 changes: 674 additions & 0 deletions cytopy/cytopy_widgets/LICENSE.txt

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions cytopy/cytopy_widgets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Python](https://img.shields.io/pypi/pyversions/cytopy)](https://pypi.org/project/cytopy/)


# CytoPy-Widgets

This package provides a GUI wrapper for CytoPy gating, using the [ipywidgets package](https://ipywidgets.readthedocs.io/en/latest).
CytoPy-Widgets facilitates iterative batch gating of a large number of samples that should be processed in the same way.

## Prerequisites
* Please make sure you have [ipwdigets installed](https://ipywidgets.readthedocs.io/en/latest/user_install.html)
* Before using CytoPy-Widgets, you must create a new CytoPy experiment and add samples
* When creating your experiment, please make sure that all of your control samples are added first

## Use instructions
* To start using the package, please simply create a new cell in your notebook and type (replacing `PROJECT_NAME`, `EXPERIMENT_NAME` with your actual projet and experiment names):
```
from cytopy.cytopy_widgets.cytopy_widgets import Gating_Interface
project = Project.objects(project_id=PROJECT_NAME).get()
experiment = project.get_experiment(EXPERIMENT_NAME)
Gating_Interface(experiment=experiment, source_population='root')
```

* You should see the GUI, which should look like this:
![image](https://user-images.githubusercontent.com/83017469/129480204-d16f765c-147d-4176-aadc-f3ab8fc0e538.png)
* Below this, you should see the results of the default gating method (ellipse widget) on the first sample in your experiment:
![image](https://user-images.githubusercontent.com/83017469/129480237-c261deb1-d010-4124-9367-5b6beb98c4b3.png)
* The GUI automatically shows the recommeded ellipse parameters for the first sample in your experiment, based on the automatic
fitting routines in CytoPy.
* Now you can modify the gating parameters using the GUI, and then click on `Create Gates` to preview the resulting gates (don't forget to change the target population name in the `Target pop` widget):
![image](https://user-images.githubusercontent.com/83017469/129480598-d20d1005-2827-4817-9930-c614604556d4.png)
* Keep on tweaking the ellipes parameters until you're happy with then. Once you're happy, change the `#preview` widget to `All` and then click on `Create gates again`. This will show you the results for all of your samples.
* Once you preview the results for all gates, the `Save gates` widget stop being disabled. When you click `Save gates`, the resulting populations will be saved to the CytoPy database.
* Now you can create a new cell, and start a new gating process, this time using a different source population (for example, you can use the `live cells` population that you just defined).



**Happy gating!**
Loading