yanwu2014 / swne

Similarity Weighted Nonnegative Embedding (SWNE), a method for visualizing high dimensional datasets
BSD 3-Clause "New" or "Revised" License
103 stars 20 forks source link

Error during execution of "Gene Expression Quickstart with Seurat" #18

Closed darrentyson closed 5 years ago

darrentyson commented 5 years ago

I am attempting to run the example code after an installation of the swne package on a new machine but am getting the following error: Error in requireNamespace(Seurat, quietly = T) : object 'Seurat' not found

The error occurs on the last line of the following code:

library(Seurat)
library(swne)
## Load data
obj <- readRDS("~/Downloads/pbmc3k_seurat.Robj")
## Get clusters
clusters <- obj@ident; names(clusters) <- obj@cell.names;
## Build SNN
obj <- BuildSNN(obj, dims.use = 1:20, k.param = 20, prune.SNN = 1/20)
## Run SWNE
genes.embed <- c("MS4A1", "GNLY", "CD3E", "CD14",
                 "FCER1A", "FCGR3A", "LYZ", "PPBP", "CD8A")
swne.embedding <- RunSWNE(obj, k = 10, genes.embed = genes.embed)
yanwu2014 commented 5 years ago

Thanks for the heads up! There was a typo in requireNamespace, should be fixed in the latest commit. Let me know if there are any other errors!

yanwu2014 commented 5 years ago

Closing this if there aren't any additional issues!