Entering edit mode
9 weeks ago
Varun Gupta
★
1.3k
I have a seurat object which looks like this:
An object of class Seurat
31061 features across 6471 samples within 2 assays
Active assay: RNA (31057 features, 0 variable features)
1 layer present: counts.Gene Expression
1 other assay present: HTO
I have 2 assays, RNA and HTO. I want to remove 4 genes from RNA assay. These 4 genes are also part of HTO assay. When I use subset like below:
obj <- subset(obj, features = setdiff(rownames(obj), antibody_capture_genes))
this is how my object looks like now:
An object of class Seurat
31053 features across 6471 samples within 1 assay
Active assay: RNA (31053 features, 0 variable features)
1 layer present: counts.Gene Expression
So, I also loose the HTO assay. How can I just remove the genes from the RNA assay?
I probably wouldn't recommend doing this, but anyway:
You can subset the assay rather than the whole object
What happens to the HTO assay?
In your code:
This shouldn't affect the HTO assay