Closed dcollins15 closed 3 months ago
You can reproduce the initial issue / validate the fix by running:
library(SeuratObject)
left <- SeuratData::LoadData("pbmc3k")
right <- SeuratData::LoadData("ifnb")
test_case <- merge(left, right)
features_to_keep <- Features(left)[!Features(left) %in% Features(right)]
result <- subset(test_case, features = features_to_keep)
print(result)
Resolves:
The issue was introduced in:
Which was in turn resolving an issue with the way the feature-level metadata was being incorrectly handled.
When calling
MatchCells
to subset the feature level metadata, we need to make sure that:orig
contains all of the feature names that were originally inx
new
contains only feature names that are still in the layers ofx
Our first fix took care of the first point but failed to properly address the second, causing the following error if any features were being lost in the process of subsetting out the layers: