-
Notifications
You must be signed in to change notification settings - Fork 23
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
get_transform_fxn signature #146
Comments
This is now a bug. If the MEF values for two different channels for the same bead row do not match in number of elements, I get the following error:
The reason I do not specify the same number of MEF values for a given bead row is that I have different gain settings for different channels such that I can only resolve a subset of the peaks for one of the channels. I manually pruned the MEF Values entries for that channel and got this bug. This bug seems to stem from the fact that you call This may be specific to my current version of numpy? 1.10.1. While enforcing numpy requirements might fix this problem, I think a much better solution would be to redo the |
There are two things here: One, a complain about the impossibility of having a different number of MEF values on different channels. This is not a bug. We intentionally force these to be the same, because the beads that we have seen so far contain the same number of peaks in all channels. The clustering algorithm relies on this assumption, and clustering in N dimensions when the number of subpopulations in one axis is different than another doesn't make a lot of sense. To address some of your "edge cases":
Then the user needs to read the documentation and use the package correctly.
A more explicit error message is not a bad idea.
I have no idea how this would make sense if you look at it in a 2D scatter plot. I can think of a few convoluted ways in which this would be possible, but they are very complicated and would require extensive revisions of the clustering algorithm and the MEF algorithm in general. I'd rather not deal with this unless we confirm that such a product exists.
Or you could use beads properly, and run two separate samples. Even if you really wanted to do this, and even if beads in both channels had the same number of peaks, the clustering algorithm would break. Let's say that you're using beads with a green fluorophore (detected in FL1) and beads with a red fluorophore (FL3) and you mixed them in the same tube. If you assume no bleedthrough (best case scenario), then you would see that, in FL1, all the red beads would form their own group, probably with the same measured fluorescence as the blank peak of the green beads. Therefore, you would have a blank peak that has a much greater number of events than the other peaks. This would break the GMM clustering algorithm, because it is currently set up to find clusters of roughly the same size. In summary, handling these edge cases requires way more than allowing different numbers of peak values. Since, to the best of my knowledge, there are no beads that require such behavior, and no scenario that can't be fixed by having the user use beads properly, this is not something that should be worked on. It may be a good idea, however, to have a more explicit error message when the user tries to enter a different number of MEF values into The other issue is about |
From #141, I was confused about the MEF section in
process_beads_table
and some of the confusion seemed to originate from theget_transform_fxn
signature.Relevant parts of original thread brought over from #141:
JS:
While I do think it's generally the case that beads should have the same number of peaks, I think it's an unnecessary assumption and possibly detrimental.
mef_values
numpy array?mef_values
would not get padded, instead you appear to get a numpy object array where each element is a list. That may still work? I still think the more explicit dictionary data structure would be better there if an error is not warranted.The text was updated successfully, but these errors were encountered: