cellengine / cellengine-python-toolkit

CellEngine Python API toolkit
https://cellengine.github.io/cellengine-python-toolkit/
MIT License
4 stars 0 forks source link

feat(apiclient, gate): Add apply_tailoring function #140

Closed gegnew closed 2 years ago

gegnew commented 2 years ago

Fixes #121

I couldn't seem to get CE to actually apply gates to any files, so the only live response I received was:

    {
        "updated": [],
        "inserted": [],
        "deleted": [],
    }

I'm pretty sure that I tested this on the appropriate object, based on the function def in cellengine/app/controllers/gates.server.controller.mjs, but it merits a second set of :eyes:

Particularly, I used:

    {
        "updated": [{"_id": "updatedGateId", "fcsFileId": "fileId"}],
        "inserted": [],
        "deleted": [{"_id": "deletedGateId", "fcsFileId": "fileId"}],
    }

and a variation of that with multiple objects in the "updated" array.

gegnew commented 2 years ago

Depends on #136

gingo00 commented 2 years ago

Closes #121

I couldn't seem to get CE to actually apply gates to any files, so the only live response I received was:

    {
        "updated": [],
        "inserted": [],
        "deleted": [],
    }

I think CE will apply gates only if the gate provided is different than the currently set gate for this sample for this gate group. By different, I mean a different position (gate model), not different in terms of "_id". So to get this response, I assume that the gate model provided was the same as the one currently applied to the files you tried and therefore, CE did nothing.

codecov-commenter commented 2 years ago

Codecov Report

Merging #140 (d6f103a) into master (6099511) will decrease coverage by 0.15%. The diff coverage is 60.60%.

@@            Coverage Diff             @@
##           master     #140      +/-   ##
==========================================
- Coverage   92.83%   92.68%   -0.16%     
==========================================
  Files          60       61       +1     
  Lines        3084     3102      +18     
==========================================
+ Hits         2863     2875      +12     
- Misses        221      227       +6     
Flag Coverage Δ
unittests 92.68% <60.60%> (-0.16%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cellengine/resources/gate.py 86.01% <29.41%> (-2.68%) :arrow_down:
cellengine/utils/api_client/APIClient.py 83.67% <66.66%> (+0.78%) :arrow_up:
cellengine/resources/experiment.py 79.25% <100.00%> (-0.22%) :arrow_down:
cellengine/resources/fcs_file.py 89.18% <100.00%> (ø)
cellengine/utils/types.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

zbjornson commented 2 years ago