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

Serializing experiment objects #348

Open
benweinberg89 opened this issue Mar 4, 2023 · 3 comments
Open

Serializing experiment objects #348

benweinberg89 opened this issue Mar 4, 2023 · 3 comments

Comments

@benweinberg89
Copy link

Thank you for your bug report!

Please fill out the following template.

PLATFORM (Mac, PC, Linux, other):

Mac

OPERATING SYSTEM (eg OSX 10.7, Windows 8.1):

OS 12.5

SEVERITY (Critical? Major? Minor? Enhancement?):

Enhancement

DESCRIPTION:

  • What were you trying to do?
  • What happened?
  • What did you expect to happen?
    I was wondering if there was a good way to serialize Experiment objects so that can be saved and re-opened later on (to avoid the slow import process). I have been trying to pickle them. Although I seemingly re-open them, something seems to happen after I apply() gaussian or threshold operations to them. I get an error that channels can't be found anymore even though I can see them before the operation using Experiment.channels.

Don't forget to attach the log file to this bug report!

If you are having trouble with a particular FCS file, please attach that file too.

@benweinberg89
Copy link
Author

This is what appears in the channels variable after trying to apply a 2d gaussian filter:
'Traceback (most recent call last):\n File "/Users/benweinberg/.vscode/extensions/ms-python.python-2023.4.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_resolver.py", line 189, in _get_py_dictionary\n attr = getattr(var, name)\n File "/Users/benweinberg/opt/anaconda3/envs/cf/lib/python3.8/site-packages/cytoflow/experiment.py", line 197, in _get_channels\n return sorted([x for x in self.data if self.metadata[x]['type'] == "channel"])\n File "/Users/benweinberg/opt/anaconda3/envs/cf/lib/python3.8/site-packages/cytoflow/experiment.py", line 197, in \n return sorted([x for x in self.data if self.metadata[x]['type'] == "channel"])\nKeyError: 'FSC-A'\n'

@CaRniFeXeR
Copy link

Can you maybe provide a jupyter notebook showing this problem?

@benweinberg89
Copy link
Author

@CaRniFeXeR It will take me some time to do that. Perhaps I will try serializing some of the kiani data. Serializing could help address Issue #349.

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

No branches or pull requests

2 participants