Remove variable features in seurat object #10286
Unanswered
TiphaineCMartin
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I want to rerun ScaleDate on all dataset.
I first select only the dataset of interest, but have still variable features from my previous object. I cannot remove selected variable features. I still have my scale.data on previous 3000 features instead of 35782.
Can you tell what I can do?
`
Create a new object without the scale.data layer
gcdata_Mac_diet_onlyMac_slim <- DietSeurat(
object = gcdata_Mac_diet_onlyMac,
assays = "RNA",
layers = c("counts", "data"), # Keep only 'counts' and 'data' layers, implicitly removing 'scale.data'
dimreducs = c("pca", "umap"), # Optionally remove all dimensional reductions
graphs = NULL # Optionally remove all graphs
)
gcdata_Mac_diet_onlyMac_slim
An object of class Seurat
35782 features across 26291 samples within 1 assay
Active assay: RNA (35782 features, 3000 variable features)
2 layers present: data, counts
2 dimensional reductions calculated: pca, umap
VariableFeatures(gcdata_Mac_diet_onlyMac_slim) <- NULL
gcdata_Mac_diet_onlyMac_slim <- ScaleData(gcdata_Mac_diet_onlyMac_slim,
counts.matrix <- as.data.frame(t(as.matrix(gcdata_Mac_diet_onlyMac_slim@assays$RNA@layers$scale.data)))
Beta Was this translation helpful? Give feedback.
All reactions