-
Notifications
You must be signed in to change notification settings - Fork 904
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
Bug with function PercentageFeatureSet() #8009
Comments
Hi, Not member of dev team but hopefully can be helpful. Overall, while I cannot directly replicate your issue with getting negative values but there does seem to be issue here based on that line of code. When I run with hca or pbmc Seurat data objects I get the correct values as in my case the layers get listed as:
So when it calculates the PercentageFeatureSet it actually does it 3 times (twice more than needed so extends running time). In my tests it does add the correct values to meta.data slot because the code then unlists the runs and because the "counts" slot is first in code result above only those values get added but you can see by size of unlisted vector it is 3x as large as hca dataset. Also could potentially add wrong values if layer order was different as in original bug report
I will submit PR shortly with the change. Best, |
Hello! When I use the function PercentageFeatureSet() to remove the mitochondrial gene , I get some negative values in the results.Therefore,I reviewed the source code for PercentageFeatureSet().
When I allowed this line of code , The layers I get are shown below.
This results in subsequent calculations incorrectly using the 'data' matrix instead of the 'counts' matrix , resulting in a negative value.
When I change this line of code to look like this, it works.
Thanks!
The text was updated successfully, but these errors were encountered: