-
Notifications
You must be signed in to change notification settings - Fork 9
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
Problem with the feature selection method #21
Comments
Hi Thomas, Just had a quick look at feature_selection.py and this looks like a genuine bug. Surprised this bug hasn't come up before now. Serves me right for not having better test coverage! I'm working on that but as the only developer on CytoPy and a PhD student it's just a question of time I'm afraid. I'll make this fix tonight and have an update shipped tomorrow (it's not a big job). This will come with a new docker image for you to use. If you mount that new docker image to the same drives this won't effect your notebooks/database/files. Cheers, |
Yes, I was also thinking that you changed from returning the Subject to returning the subject_id. |
New docker image should be live now. Let me know if the problem persists. |
It works fine !! Cheers ! |
Hi Ross,
I imported data and managed to cluster them with phenograph. It worked perfectly fine (honestly, it's a great tool !! I really enjoyed working with it during the week-end ) I am currently trying to build the FeatureSpace corresponding to the data and compute basic statistics. I have the following error when I run the following block :
samples = cells.list_samples()
feature_space_cells = feature_selection.FeatureSpace(experiment=cells)
AttributeError Traceback (most recent call last)
in
1 samples = cells.list_samples()
----> 2 feature_space_cells = feature_selection.FeatureSpace(experiment=cells)
/usr/local/lib/python3.8/dist-packages/cytopy/flow/feature_selection.py in init(self, experiment, sample_ids, logging_level, log)
150 if x.primary_id in sample_ids] or experiment.fcs_files
151 self.subject_ids = {x.primary_id: _fetch_subject(x) for x in self._fcs_files}
--> 152 self.subject_ids = {k: v.subject_id for k, v in self.subject_ids.items() if v is not None}
153 populations = [x.list_populations() for x in self._fcs_files]
154 self.populations = set([x for sl in populations for x in sl])
/usr/local/lib/python3.8/dist-packages/cytopy/flow/feature_selection.py in (.0)
150 if x.primary_id in sample_ids] or experiment.fcs_files
151 self.subject_ids = {x.primary_id: _fetch_subject(x) for x in self._fcs_files}
--> 152 self.subject_ids = {k: v.subject_id for k, v in self.subject_ids.items() if v is not None}
153 populations = [x.list_populations() for x in self._fcs_files]
154 self.populations = set([x for sl in populations for x in sl])
AttributeError: 'str' object has no attribute 'subject_id'
I have the same error whether I run
feature_space_cells = feature_selection.FeatureSpace(experiment=cells) or
feature_space_cells = feature_selection.FeatureSpace(experiment=cells, sample_ids=sample).
Is it because I imported data with csv rather than fcs ? (I used the experiment.add_dataframes method to import data).
Thanks for your help
Thomas
The text was updated successfully, but these errors were encountered: