-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Featureplot not plotting if one of the variables is missing from the seurat object #64
Comments
Hi, Could you please post the full code that you are running which causes the error? Also, if you update scCustomize to the develop branch does that resolve the issue?
When I run the following code (using dev branch) it seems to work ok.
Best, |
Hi Sam @samuel-marsh , thanks for the quick response. So it looks like featureplot doesn't plot when you include 'split.by' option and have a missing variable in the list. Without split.by, it works fine even with missing variable. This error also applies to Iterate_FeaturePlot_scCustom Example code to reproduce using seurat's ifnb data install datasetInstallData("ifnb") load datasetLoadData("ifnb") split the dataset into a list of two seurat objects (stim and CTRL)ifnb.list <- SplitObject(ifnb, split.by = "stim") ctrl <- ifnb.list[["CTRL"]] normalize and run dimensionality reduction on control datasetctrl <- SCTransform(ctrl, vst.flavor = "v2", verbose = FALSE) %>% stim <- SCTransform(stim, vst.flavor = "v2", verbose = FALSE) %>% ifnb.list <- list(ctrl = ctrl, stim = stim) immune.anchors <- FindIntegrationAnchors(object.list = ifnb.list, normalization.method = "SCT", immune.combined.sct <- RunPCA(immune.combined.sct, verbose = FALSE) immune.combined.sct$celltype.stim <- paste(immune.combined.sct$seurat_annotations, immune.combined.sct$stim, pdf("featureplot_test.pdf") Found the following features in more than one assay, excluding the default. We will not include these in the final data frame: FLT1Error in FetchData.Seurat(object = seurat_object, vars = features[i], : |
Gotcha, thanks! Now I understand why that's happening. I will work on patch for release this week. In mean time you can run:
That will return a vector of genes found within the object. I will try and get patch out in next day or two (with release of scCustomize v1.0.0). Thanks! |
Ok fix is live in the develop branch v(0.7.0.9951). If setting If you have any issues once updated please let me know and I'll reopen the issue. Best, |
That's awesome! Thank you, Sam! Looking forward to the new release 👍 💯 |
glad to help!!! :) |
Feature plot quits plotting if one of the variables is missing instead of plotting existing variables.
Error in FetchData.Seurat(object = seurat_object, vars = features[i], :
None of the requested variables were found: CD279
Matrix products: default
BLAS: /usr/lib/atlas-base/atlas/libblas.so.3.0
LAPACK: /opt/R/4.2.1/lib/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] readr_2.1.3 scCustomize_0.7.0 RColorBrewer_1.1-3 glmGamPoi_1.9.2 pheatmap_1.0.12 cowplot_1.1.1
[7] patchwork_1.1.2 sp_1.5-0 SeuratObject_4.1.2 Seurat_4.2.0 dplyr_1.0.10
The text was updated successfully, but these errors were encountered: