You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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().
layers<- Layers(object=object, pattern="counts")
When I allowed this line of code , The layers I get are shown below.
layers
[1] "scale.data""data""counts"
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.
layers<- Layers(object=object, search="counts")
Thanks!
The text was updated successfully, but these errors were encountered:
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
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: