Closed FionaMoon closed 3 months ago
Hi,
Jot member of dev team but hopefully can be helpful. So your input to RunPCA isn’t a Seurat object but an assay object. So it appears somewhere before this there was issue.
Can you post full code you ran?
Best, Sam
**Hi, friends
I have the same problem. this is my code:**
`install.packages('Seurat')
library(Seurat) library(SeuratData) library(patchwork) library(dplyr) library(ggplot2)
ifnb.inte <- LoadData("ifnb") ifnb <- split(ifnb.inte[["RNA"]], f = ifnb.inte$stim) ifnb
ifnb <- NormalizeData(ifnb) ifnb <- FindVariableFeatures(ifnb) ifnb <- ScaleData(ifnb) ifnb <- RunPCA(ifnb)'**
this is my object before running PCA:
this is object after running:
in addition, this is data structure of ifnb.inte:
it's changed when I split by "stim", something like active.ident is gone, I don't know Whether it is normal:
p.s. I also maintain Seurat V4 in a different library. Above. thanks. @samuel-marsh
Hi, My code almost seems like yours @redtorrentCN and I finally figured out what's wrong with this.
If I use
obj <- split(obj, f = obj$Method)
instead of
obj[["RNA"]] <- split(obj[["RNA"]], f = obj$Method)
,
then everything goes on well!
thanks, @FionaMoon , I believe this is useful, but I have solved this issue with reinstalling!
by the way, Have you encountered any of the following problems when runed scvi integration:
obj<- IntegrateLayers( object = obj, method = scVIIntegration, new.reduction = "integrated.scvi", conda_env = "./anaconda3/envs/scvi-env", verbose = FALSE )
Error in object[][features, ] : incorrect number of dimensions In addition: Warning message: In LayerData.Assay5(object, layers = "counts") : multiple layers are identified by data.Smart-seq2 data.CEL-Seq2 data.10x_Chromium_v2_A data.10x_Chromium_v2_B data.10x_Chromium_v3 data.Drop-seq data.Seq-Well data.inDrops data.10x_Chromium_v2 only the first layer is used
Above. thanks for your answers.
I'm afraid I can't answer this question. I run Seurat on Windows system which doesn't have conda environment.
---- Replied Message ---- | From | @.> | | Date | 01/03/2024 18:45 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [satijalab/seurat] Seurat object missing after running PCA (Issue #8219) |
thanks, @FionaMoon , I believe this is useful, but I have solved this issue with reinstalling! by the way, Have you encountered any of the following problems when runed scvi integration: obj<- IntegrateLayers( object = obj, method = scVIIntegration, new.reduction = "integrated.scvi", conda_env = "./anaconda3/envs/scvi-env", verbose = FALSE )
Error in object[][features, ] : incorrect number of dimensions In addition: Warning message: In LayerData.Assay5(object, layers = "counts") : multiple layers are identified by data.Smart-seq2 data.CEL-Seq2 data.10x_Chromium_v2_A data.10x_Chromium_v2_B data.10x_Chromium_v3 data.Drop-seq data.Seq-Well data.inDrops data.10x_Chromium_v2 only the first layer is used
Above. thanks for your answers.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Fine, also thank you, bro.
Hi, Looks like the issue has been resolved in the comments. Closing now, but please feel free to reopen if the issue persists. Thanks!
Hi all, I've just updated my Seurat from V4 to V5 and found that my Seurat object was missing after RunPCA.
Here's my object before running PCA:
After running this code, my
obj
disappear.If I tried to run
FindNeighbors
&FindClusters
, I'd get the error like thisError: Not an S4 object.