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

Pull request from ElevenTX #29

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

omerwe-eleventx
Copy link

Hi Ross,

As we discussed, this is a big pull request with many modifications and revisions we made to the code. Please let me know what you think!

Best,

Omer

@burtonrj
Copy link
Owner

burtonrj commented Aug 7, 2021

Caching of logicle transform has been added to transform module of v3.0. I've adapted your code to make it scale to multiple dimensions (the transforms in the matplotlib transformer handle either 1 or 2). This means all logicle transforms across the whole library now benefit from caching.

I've also adapted it so that caching can handle different kwargs passed to the Transformer so for example if you perform a logicle transform with m=4.5 but then later change this to m=4.0, the cached results for these two calculations are kept separate from each other.

Finally, the cached results can be saved to disk between sessions using the save_cache function which takes advantage of the configurations tool coming with version 3.0. (the next release has been bumped from a minor to a major due to the large changes planned).

Updated code can be found here: https://github.com/burtonrj/CytoPy/blob/v3.0/cytopy/flow/transform.py
Tests: https://github.com/burtonrj/CytoPy/blob/v3.0/cytopy/tests/transform_test.py

@burtonrj
Copy link
Owner

Caching of logicle transform has been added to transform module of v3.0. I've adapted your code to make it scale to multiple dimensions (the transforms in the matplotlib transformer handle either 1 or 2). This means all logicle transforms across the whole library now benefit from caching.

I've also adapted it so that caching can handle different kwargs passed to the Transformer so for example if you perform a logicle transform with m=4.5 but then later change this to m=4.0, the cached results for these two calculations are kept separate from each other.

Finally, the cached results can be saved to disk between sessions using the save_cache function which takes advantage of the configurations tool coming with version 3.0. (the next release has been bumped from a minor to a major due to the large changes planned).

Updated code can be found here: https://github.com/burtonrj/CytoPy/blob/v3.0/cytopy/flow/transform.py
Tests: https://github.com/burtonrj/CytoPy/blob/v3.0/cytopy/tests/transform_test.py

I've actually dramatically simplified this with lru_cache now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants