satijalab / seurat Goto Github PK
View Code? Open in Web Editor NEWR toolkit for single cell genomics
Home Page: http://www.satijalab.org/seurat
License: Other
R toolkit for single cell genomics
Home Page: http://www.satijalab.org/seurat
License: Other
This is not very informative.The problem probably is in the glm package.
glm.nb failed; trying again with glm and family=negative.binomial(theta=0.1)
glm and family=negative.binomial(theta=0.1) failed, falling back to scale(log10(y+1))
|================================================================= | 95%glm.nb failed; trying again with glm and family=negative.binomial(theta=0.1)
glm and family=negative.binomial(theta=0.1) failed, falling back to scale(log10(y+1))
|================================================================== | 95%glm.nb failed; trying again with glm and family=negative.binomial(theta=0.1)
glm and family=negative.binomial(theta=0.1) failed, falling back to scale(log10(y+1))
|=====================================================================| 100%
|=====================================================================| 100%
There were 50 or more warnings (use warnings() to see the first 50)
Hi there,
I just tried to install Seurat and the installation fails with the following error.
- installing source package 'Seurat' ...
** libs*** arch - i386
g++ -m32 -std=c++0x -I"E:/R-3.2.2/include" -DNDEBUG -I"E:/R-3.2.2/library/Rcpp/include" -I"E:/R-3.2.2/library/RcppEigen/include" -I"E:/R-3.2.2/library/RcppProgress/include" -I"d:/RCompile/r-compiling/local/local320/include" -g -std=c++11 -Wall -pedantic -O2 -Wall -mtune=core2 -c RcppExports.cpp -o RcppExports.o
cc1plus.exe: error: unrecognized command line option '-std=c++11'
make: *** [RcppExports.o] Error 1
Warning: running command 'make -f "Makevars" -f "E:/R-3.2.2/etc/i386/Makeconf" -f "E:/R-3.2.2/share/make/winshlib.mk" CXX='$(CXX1X)$(CXX1XSTD)' CXXFLAGS='$ (CXX1XFLAGS)' CXXPICFLAGS='$(CXX1XPICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX1XLDFLAGS)' SHLIB_LD='$(SHLIB_CXX1XLD)' SHLIB="Seurat.dll" OBJECTS="RcppExports.o data_manipulation.o"' had status 2
ERROR: compilation failed for package 'Seurat'
- removing 'E:/R-3.2.2/library/Seurat'
Any pointers re: fixing this?
Thank you.
The function FindAllMarkersNode crashes when the node from where to start is not set.
FUNCTION CALL:
all.markers.node <- FindAllMarkersNode(nbt, only.pos = TRUE, min.pct = 0.25, min.diff.pct=0.25,thresh.use = 0.25)
ERROR:
Error in set.ifnull(node, tree$edge[1, 1]) : object 'tree' not found
I think the problem is the tree variable name and tree$edge[1, 1] should be [email protected][[1]]$edge[1,1]
With RegressOut()
:
Seurat stores the z-scored residuals of these models in the scale.data slot, and they are used for dimensionality reduction and clustering.
Although PCA()
and ICA()
use [email protected]
, it looks like RunTSNE()
usesobject@data
. Am I reading the code wrong or should that really be the case? Shouldn't both use the same values?
In general, it seems that a lot of functions use object@data
instead of [email protected]
. For example, FindMarkers()
and AverageExpression()
. Shouldn't most downstream functions use the scaled data?
Would it be possible to tag at least one commit as a release? Otherwise it's difficult to reliably reproduce analyses or benchmarks. If you wouldn't mind just tagging the current HEAD
as v1.2.1, for example, that would be very helpful!
I think this happens when only TWO clusters are identified from the data, but I haven't completely tracked it down.
The error is as follows:
pos.markers <- Seurat::FindAllMarkers(r.dat, [email protected], only.pos=TRUE , min.pct=0.25, thresh.use=0.25, test.use="tobit", do.print=FALSE)
Error in eval(expr, envir, enclos) : object 'avg_diff' not found
My guess is that this is related to the fact that while there are several checks for "is.null(...)" for gde and other objects, in this case, it's a data frame with no rows, but it isn't actually null. Maybe!
Browse[2]> gde
[1] p_val avg_diff pct.1 pct.2
<0 rows> (or 0-length row.names)
Browse[2]> is.null(gde)
[1] FALSE
I apologize for not having a more informative test case! It only happens in a small subset of my input data files, which are extremely large and inconvenient to test in stripped-down example form.
Note that the number of cells in each of the two input clusters is > 2000—I verified that there aren't any zero-size clusters, which is a problem I had been encountering previously.
> system.time(pos.markers <- Seurat::FindAllMarkers(r.dat, [email protected], only.pos=TRUE , min.pct=0.25, thresh.use=0.25, test.use="tobit", do.print=FALSE))
Error in eval(expr, envir, enclos) : object 'avg_diff' not found
In addition: Warning messages:
1: In is.na(p_val) :
is.na() applied to non-(list or vector) of type 'NULL'
2: In is.na(p_val) :
is.na() applied to non-(list or vector) of type 'NULL'
Enter a frame number, or 0 to exit
1: system.time(pos.markers <- Seurat::FindAllMarkers(r.dat, genes.use = [email protected], only.pos = TRUE, min.pct = 0.25, thresh.use = 0.25, test.use = "tobit", do.print = FALSE
2: Seurat::FindAllMarkers(r.dat, genes.use = [email protected], only.pos = TRUE, min.pct = 0.25, thresh.use = 0.25, test.use = "tobit", do.print = FALSE)
3: Seurat::FindAllMarkers(r.dat, genes.use = [email protected], only.pos = TRUE, min.pct = 0.25, thresh.use = 0.25, test.use = "tobit", do.print = FALSE)
4: subset(gde.all, avg_diff > 0)
5: subset.data.frame(gde.all, avg_diff > 0)
6: eval(e, x, parent.frame())
7: eval(expr, envir, enclos)
$ R --vanilla
R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> require(devtools)
Loading required package: devtools
> install_github("satijalab/seurat")
Downloading GitHub repo satijalab/seurat@master
from URL https://api.github.com/repos/satijalab/seurat/zipball/master
Installing Seurat
Error in res0[, "Package"] : subscript out of bounds
> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=de_DE.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=de_DE.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_1.12.0
loaded via a namespace (and not attached):
[1] httr_1.2.1 R6_2.2.0 tools_3.3.2 withr_1.0.2 curl_2.3
[6] memoise_1.0.0 git2r_0.18.0 jsonlite_1.2 digest_0.6.12
I keep getting the following error when trying to run ValidateClusters(abc, pc.use = c(1:10) ), where abc is a Seurat object that I have run FindClusters() on with the same set of PCs without any problem.
Error in as.data.frame.default(x[[i]], optional = TRUE) : cannot coerce class "structure("dgCMatrix", package = "Matrix")" to a data.frame
Any suggestions or insights would be appreciated.
Hi again,
Similar to the previous problem with the PCA, FIndClusters also gives an error message:
My command:
B3 <- FindClusters(B3, pc.use = 1:3, resolution = 0.6, print.output = 0, save.SNN = T, plot.SNN = T)
The error message:
Error in my.knn$nn.index[, 1:(k.param - 1)] : subscript out of bounds
Is this also a bug?
Looking forward to hearing from you.
Hi,
I noticed that for filtering (function Setup), you first filter out cells with less than min.genes genes detected using raw data and then do log-normalization, then filter out genes based on the normalized data.
Does this mean that the parameter is.expr is the same threshold for raw data when filtering cells, and also for normalized data when filtering genes? If so, why?
Thanks in advance for your help!
The corresponding codes:
[email protected] <- is.expr
num.genes <- colSums([email protected] > **is.expr**)
num.mol=colSums([email protected])
cells.use <- names(num.genes[which(num.genes > min.genes)])
object@data <- [email protected][, cells.use]
if (do.logNormalize) {
object@data=LogNormalize(object@data,scale.factor = total.expr)
}
#to save memory downstream, especially for large object
if (!(save.raw)) [email protected] <- matrix();
genes.use <- rownames(object@data)
if (min.cells > 0) {
num.cells <- rowSums(object@data > **is.expr**)
genes.use <- names(num.cells[which(num.cells >= min.cells)])
object@data <- object@data[genes.use, ]
What's the purpose of the required argument ident.1
in FindAllMarkers
? My understanding is that the function will iterate over all identity classes, so you shouldn't need to supply one.
Looking at the code, this argument isn't used at all, so it might make sense to remove it?
I've been using Seurat
on macOS and the binary install works great. I think I came across a simpler installation method for compiling from source that doesn't require sudo
permission elevation:
Update gcc
with Homebrew.
brew install gcc
Export an updated FLIBS
path to the gfortran
library in ~/.R/Makevars
.
FLIBS=-L`gfortran -print-file-name=libgfortran.dylib | xargs dirname`
Now Seurat
should install from source.
devtools::install_github("satijalab/seurat")
If that fails, R may require updated Rcpp
dependencies installed from source as well. See this relevant Stack Overflow post for more information.
install.packages(c("Rcpp", "RcppArmadillo", "inline"), type = "source")
Solved
Hello,
I am having trouble working with my own data. When I create a new seurat object with a matrix and then try to do the Setup function, I get the following error:
conway <- Setup(conway, min.cells = 3, min.genes = 200, do.logNormalize = T, total.expr = 1e4, project = "conway")
Error in base::colSums(x, na.rm = na.rm, dims = dims, ...) :
'x' must be an array of at least two dimensions
Dear there, I am trying to install Seurat in R studio for 3.2.5 version of R
after install install_github("satijalab/seurat")
I got hte error below...
Can you take a look when you get a chance?
Thank you so much!
** arch - i386
g++ -m32 -std=c++0x -I"C:/PROGRA1/R/R-321.5/include" -DNDEBUG -I"C:/Users/Wenduo/Documents/R/win-library/3.2/Rcpp/include" -I"C:/Users/Wenduo/Documents/R/win-library/3.2/RcppEigen/include" -I"C:/Users/Wenduo/Documents/R/win-library/3.2/RcppProgress/include" -I"d:/RCompile/r-compiling/local/local323/include" -g -std=c++11 -Wall -pedantic -O2 -Wall -mtune=core2 -c RcppExports.cpp -o RcppExports.o
cc1plus.exe: error: unrecognized command line option '-std=c++11'
make: *** [RcppExports.o] Error 1
Warning: running command 'make -f "Makevars" -f "C:/PROGRA1/R/R-321.5/etc/i386/Makeconf" -f "C:/PROGRA1/R/R-321.5/share/make/winshlib.mk" CXX='$(CXX1X)
ERROR: compilation failed for package 'Seurat'
I'm getting this when running jackStraw(nbt,num.replicate = 200,do.print = TRUE) :
Error in fake.x[rand.genes, r1.use:r2.use] : subscript out of bounds
Calls: jackStraw -> jackStraw -> sapply -> lapply -> FUN -> jackRandom
My complete script:
library(methods)
suppressWarnings(suppressMessages(library(Seurat)))
nbt.data=read.table("temp.tab",sep=" ",header=TRUE,row.names=1)
nbt.data=log(nbt.data+1)
nbt=new("seurat",raw.data=nbt.data)
nbt=setup(nbt,project="NBT",min.cells = 3,names.field = 2,names.delim = "_",min.genes = 500,is.expr=1,)
nbt=mean.var.plot(nbt,y.cutoff = 2,x.low.cutoff = 2,fxn.x = expMean,fxn.y = logVarDivMean)
nbt=pca(nbt,do.print=FALSE)
nbt=jackStraw(nbt,num.replicate = 200,do.print = TRUE)
the input file temp.tab is here:
http://hgwdev.soe.ucsc.edu/~max/seurat/temp.tab
Any ideas what could be causing this?
Hi,
I'm trying to install Seurat in Windows 7, running R 3.3.2 in R studio.
Followed the installation guide, but faced with the following error:
library(devtools)
install_github("satijalab/seurat")
Downloading GitHub repo satijalab/seurat@master
from URL https://api.github.com/repos/satijalab/seurat/zipball/master
Installing Seurat
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
Installation failed: formal argument "repos" matched by multiple actual arguments
"C:/PROGRA1/R/R-331.2/bin/x64/Rcmd.exe" INSTALL "C:/Users/Jerome/AppData/Local/Temp/RtmpoxtWmk/devtools51ac4ae46c0/satijalab-seurat-6cf4de6"
Installation failed: Command failed:
"C:/PROGRA1/R/R-331.2/bin/x64/Rcmd.exe" INSTALL "C:/Users/Jerome/AppData/Local/Temp/RtmpoxtWmk/devtools51ac4ae46c0/satijalab-seurat-6cf4de6"
Help ...
Thank you,
Jerome
Hi,
I wanted to use the new test.use = 'negbinom' option for FindAllMarkers and compare the results against using the default test.use='bimod' test. Trying test.use = 'poisson' returned the same error.
Is there something I did wrong in trying to use the 'negbinom' option?
Thanks,
Julie
The first call returned fine:
s.markers <- FindAllMarkers(s, only.pos = TRUE, min.pct = 0.25, thresh.use = 0.25)
This call returned an error:
s.markers <- FindAllMarkers(s, only.pos = TRUE, min.pct = 0.25, thresh.use = 0.25, test.use = "negbinom")
Error in data.frame(p_val, row.names = genes.use): row names supplied are of the wrong length
Traceback:
I am having trouble with the FindClusters command. Whenever I run it, it always complains that it couldn't find the output text file. The file is not generated, as far as I could tell. The edge text file is generated, however.
I've tried specify temp.file.location, but it still gives me the same issue. Have tried updating R and all packages (including Seurat) and still gives me the same issue.
Hi,
I have an issue running the jackStraw
method:
> seurat.data = jackStraw(seurat.data, num.replicate=200, do.print=FALSE)
Error in matrix(x2[ind], nrow = nrow(x), ncol = ncol(x), byrow = TRUE) :
non-numeric matrix extent
I saved the seurat.data
object and stuck it up here: https://dl.dropboxusercontent.com/u/2822886/seurat-error.RData
Any ideas about why this is failing? It has worked on other datasets, I'm not sure what is different about this one.
Seurat::FeaturePlot( your_seurat_object_here, features.plot=genes_with_zero_counts.vec) errors out due to a problem with cut / breaks.
Hello,
I'm having an issue with FindClusters. it tries to write an edge file to /usr/lib/R/library instead of the Seurat folder. Here is the error:
Error in file(file, ifelse(append, "a", "w")) :
cannot open the connection
In addition: Warning message:
In file(file, ifelse(append, "a", "w")) :
cannot open file '/usr/lib/R/library/edge_33895.txt': Permission denied
I'v tried locally and it seem changing line 185 from
seurat.dir <- paste0(strsplit(seurat.dir, "/")[[1]][0:(length(strsplit(seurat.dir, "/")[[1]])-1)], collapse = "/")
to
seurat.dir <- paste0(strsplit(seurat.dir, "/")[[1]][0:(length(strsplit(seurat.dir, "/")[[1]]))], collapse = "/")
solves it when I run it locally.
Running:
seurat.dir <- system.file(package="Seurat")
seurat.dir
seurat.dir <- paste0(strsplit(seurat.dir, "/")[[1]][0:(length(strsplit(seurat.dir, "/")[[1]])-1)], collapse = "/")
seurat.dir
seurat.dir <- paste0(seurat.dir, "/", sep = "")
seurat.dir
outputs:
> seurat.dir <- system.file(package="Seurat")
> seurat.dir
[1] "/usr/lib/R/library/Seurat"
> paste0(strsplit(seurat.dir, "/")[[1]][0:(length(strsplit(seurat.dir, "/")[[1]])-1)], collapse = "/")
[1] "/usr/lib/R/library"
> seurat.dir <- paste0(strsplit(seurat.dir, "/")[[1]][0:(length(strsplit(seurat.dir, "/")[[1]])-1)], collapse = "/")
> seurat.dir
[1] "/usr/lib/R/library"
> seurat.dir <- paste0(seurat.dir, "/", sep = "")
> seurat.dir
[1] "/usr/lib/R/library/"
I tried to rebuild Seurat using a local modified copy and the error is still there even though now it's different.
Error in file(file, ifelse(append, "a", "w")) :
cannot open the connection
In addition: Warning message:
In file(file, ifelse(append, "a", "w")) :
cannot open file '/usr/lib/R/library/Seurat/edge_33895.txt': Permission denied
So I still have to look for a real fix.
Any Idea why I get this issue?
Thanks for your help
Hoohm
PS: I'm on Arch
On window 10, I installed R 3.3.2. Then follow the instruction described in http://satijalab.org/seurat/install.html
library(devtools)
install_github("satijalab/seurat")
Downloading GitHub repo satijalab/seurat@master
from URL https://api.github.com/repos/satijalab/seurat/zipball/master
Error: running command '"C:/R/R-3.3.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD config CC' had status 2
I google around hours and hours, and cannot get any clue.
Any help is deeply appreciated.
With the do.fast=TRUE option set, and the default reduction.use="pca" set,
RunTSNE() runs Rtsne() on the PCA output stored in the Seurat in [email protected].
data.tsne=Rtsne(as.matrix(data.use),dims=dim_embed,...)
However, Rtsne() by default has its pca argument set to TRUE, which means it already computes a PCA on its input. So the tSNE is getting computed on the PCA of the PCs.
https://cran.r-project.org/web/packages/Rtsne/Rtsne.pdf
The pca argument for Rtsne() should probably be set to FALSE instead.
Hi, I'm getting this:
[1] "Cell group 2 is empty - no cells with identity class "
[1] "Calculating cluster 1"
Error in genes.de[[i]] : subscript out of bounds
Calls: find_all_markers -> find_all_markers
In addition: Warning message:
In Ops.factor(ident.1, 1) : ‘>’ not meaningful for factors
Execution halted
The input file is relatively small, I have only 6 samples and had to lower the jackStraw call adding num.pc=10 value to work around the jackStraw-call bug I've reported previously.
But for this problem with find_all_markers I don't know what to do, I've increased thresh.test to 10000 and also lowered it to 0.00000001 in a (rather desperate) attempt to get it to run. I've also tried return.thresh to five.
I am usually able to debug things myself, but for Seurat, I can't even find the source code input file and therefore don't know how to modify it. Thanks for any help with this one!
Hi, we used to be able to run a dataset through Seurat, but when we updated to the new version, we're getting this:
[1] "Calculating gene dispersion"
|======================================================================| 100%
Warning message:
In KernSmooth::bkde2D(x, bandwidth = bandwidth, gridsize = nbin, :
Binning grid too coarse for current (small) bandwidth: consider increasing 'gridsize'
[1] "Seurat: PCA"
Error in apply(data.use[pc.genes, ], 1, var) :
dim(X) must have a positive length
Calls: PCA -> PCA -> apply
Execution halted
The SubsetCells function's documentation states that it returns a Seurat object. However, the code shows that it returns a vector of cell names if it finds valid cells to return, and it returns the input Seurat object if there are no cells fitting the desired subset definition.
Hi,
if I try to use the negative binomial test in the function FindAllMarkers it crashes.
Example:
all.markers <- FindAllMarkers(nbt, only.pos = TRUE, min.pct = 0.25, thresh.use = 0.25,test.use = "negbinom")
| | 0 % ~calculating Error in while ((it <- it + 1) < limit && abs(del) > eps) { :
missing value where TRUE/FALSE needed
In addition: Warning message:
In [<-.data.frame
(*tmp*
, , "GENE", value = list(plan2_AAGCAGATTAAA = 2, :
provided 9930 variables to replace 1 variables
Thanks,
Hi,
I have a problem running FindMarkers to compare a single sample with a group of cells:
Error in apply(object@data[genes.use, cells.1], 1, function(x) return(length(x[x > :
dim(X) must have a positive length
Can you assist?
Dears,
Thank you for having developed this wonderful tool.
I’m new in Seurat Package and I need to run it during my work.
I’m also really interested in understand how it works and the idea behind it, so I have a couple of questions.
The function RegressOut is very useful to correct for batch effects or other undesired aspects. It’s not clear to me why z-scores of residuals are saved in the scale.data slot.
I know they represent the error during the model fitting, but how they're reflecting gene expressions in order to use them to cluster cells? Which is their relationship with scaled.data?
Why do you compute highly variable genes (in the function MeanVarPlot) using the log Normalised matrix instead of a corrected matrix (I expect you should get after RegressOut a matrix with fitted values)?
In this way, highly variable genes could contain some genes affected by undesired aspect like batch or others.
Thanks in advance.
Bests,
Elisabetta
Hi,
I've been using Seurat for a short while now based on the tutorial and it's been immensely useful , thank you!
I'm trying to better understand some of the algorithms and implementations and I have a question about the SNN graph. If it's a constructing a KNN graph, shouldn't the minimum number of edges a given vertex has be k? I checked the minimum sum([email protected][,i]>0) and found a column with only one entry in it (the cell itself). Why is this?
Best,
Alon
In http://satijalab.org/seurat/pbmc-tutorial.html, it may not be obvious what n
in nGene
and nUMI
stands for. Instead of
#nGene and nUMI are automatically calculated for every object by Seurat.
# For non-UMI data, nUMI represents the sum of the non-normalized values within a cell
writing
# The number of genes and UMIs (nGene and nUMI) are automatically calculated for every object by Seurat.
# For non-UMI data, nUMI represents the sum of the non-normalized values within a cell
would clarify this.
I am getting the following error trying to install Seurat directly from github in Rstudio.
I get the following error after entering the command
> install_github("satijalab/seurat")
Downloading GitHub repo satijalab/seurat@master
from URL https://api.github.com/repos/satijalab/seurat/zipball/master
Installing Seurat
*Skipping 1 unavailable package: lfa
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file
--no-environ --no-save --no-restore --quiet CMD INSTALL *
'/private/var/folders/l9/7msqgpnx23zdzrg3kjfl4_h00000gr/T/Rtmphk6Gwh/devtools1cbd2bc20659/satijalab-seurat-ce16279'
--library='/Library/Frameworks/R.framework/Versions/3.3/Resources/library'
--install-tests
Apologies if this is a basic error I should be able to resolve on my own. I was installing/running the program fine until now. Any guidance appreciated!
-Kevin
When this happens:
1: In JackStraw(nbt, num.replicate = 100, do.print = FALSE)
Number of PCs specified is greater than PCs available. Setting num.pc to 4 and continuing.
then this will crash (taken straight from the tutorial:
nbt.sig.genes=PCASigGenes(nbt,1:9,pval.cut = 1e-5,max.per.pc = 200)
Error in [.data.frame
(pvals.use, , pcs.use) :
undefined columns selected
Calls: PCASigGenes -> PCASigGenes -> apply -> [ -> [.data.frame
Execution halted
Can I find out how many PCs are actually available?
thanks!
Hi,
There are a couple issues with Seurat 1.3 on Windows, both related to full file/directory name specification. Read10X doesn't work because Windows doesn't recognize directories that end in "/". So Read10X will not get past the initial file.exists check if I use Read10X("./"), but it will if I use Read10X("."). But then it fails at barcode.loc <- paste(data.dir, "barcodes.tsv", sep = "") because it's expecting "/" after data.dir.
The second issue is with RunModularityClustering. system.file(package="Seurat") returns "C:/Program Files/R/R-3.3.1/library/Seurat", but Windows doesn't recognize file paths with spaces in them. Not sure what the workaround here is because Windows won't overwrite "Program Files" to "PROGRA~1" (just defaults back to "Program Files").
Since I updated to R version 3.3.1, I've been unable to install Seurat. Below are the error messages when I try to install from Github and with install.packages
Trying to install from Github:
install_github("satijalab/seurat", force=T)
Downloading GitHub repo satijalab/seurat@master
from URL https://api.github.com/repos/satijalab/seurat/zipball/master
Installing Seurat
Downloading GitHub repo StoreyLab/lfa@a1df252
from URL https://api.github.com/repos/StoreyLab/lfa/zipball/a1df252
Installing lfa
‘BiocInstaller’ must be installed for this functionality.
Would you like to install it?
1: Yes
2: No
Selection: 1
Error in loadNamespace(name) : there is no package called ‘BiocInstaller’
In addition: Warning message:
package ‘BiocInstaller’ is not available (for R version 3.3.1)
Trying to install w/ install.packages:
install.packages("seurat")
Warning in install.packages :
package ‘seurat’ is not available (for R version 3.3.1)
Hi,
I was examining the temporary edge file Seurat outputs and noticed that the node order is incorrect. According to the SLM manual:
For each pair of nodes, the node with the lower index is listed first, followed by the node with the higher index. The lines in an input file are sorted based on the node indices (first based on the indices in the first column, then based on the indices in the second column).
Neither of these requirements appear to be met by Seurats output.
First off, thanks for making such a great package for single cell analysis!
For the FeaturePlot function, it would be useful to collapse all of the individual tSNE plots for each gene into one 'master' tSNE plot in which the cell color was determined by the sum of expression of the individual genes.
This would be especially nice for users with multiple sources of single cell data (i.e. Fluidigm, 10X, other Dropseq methods) that may not cluster on the same plot due to technical issues, and would allow modules/clusters from one dataset to be more easily related to another dataset.
Thanks for considering!
When running Seurat through knitr
in an Rmd
file, Seurat's progress output clutters the resulting output document.
This is caused by Seurat printing its diagnostic output to STDOUT
instead of STDERR
as common.
Hi!
I've been making a lot of use of the "FeaturePlot(...)" function to show expression of specific genes in various cells.
I notice that, as far as I can tell, the results are SCALED so that the gene's highest-expression-cell is shown as the maximum color (e.g., "red").
So the brightest possible red in one gene (like "GAPDH") might be extremely high (thousands of reads), whereas a red in another gene might be only a few dozen reads.
I would like to suggest that a "legend" color bar would be extremely useful for getting a sense of the actual expression values involved! I was unfortunately not able to figure out a reasonable way to add this option, although I suspect it would probably involve some additions to the "SingleFeaturePlot(...)" function in Seurat.R (https://github.com/satijalab/seurat/blob/master/R/seurat.R).
Alex
I keep trying to install seurat and getting this type of error message. Any suggestions?
library(devtools)
install_github("satijalab/seurat")
Downloading GitHub repo satijalab/seurat@master
from URL https://api.github.com/repos/satijalab/seurat/zipball/master
Installing Seurat
"C:/Users/smith493/Documents/R/R-3.2.5/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL
"C:/Users/smith493/AppData/Local/Temp/Rtmp8yFqXU/devtools11585fd04b12/satijalab-seurat-a08d507"
--library="C:/Users/smith493/Documents/R/win-library/3.2" --install-tests
*** arch - i386
g++ -m32 -std=c++0x -I"C:/Users/smith493/DOCUME1/R/R-321.5/include" -DNDEBUG -I"C:/Users/smith493/Documents/R/win-library/3.2/Rcpp/include" -I"C:/Users/smith493/Documents/R/win-library/3.2/RcppEigen/include" -I"C:/Users/smith493/Documents/R/win-library/3.2/RcppProgress/include" -I"d:/RCompile/r-compiling/local/local323/include" -g -std=c++11 -Wall -pedantic -O2 -Wall -mtune=core2 -c RcppExports.cpp -o RcppExports.o
cc1plus.exe: error: unrecognized command line option '-std=c++11'
make: *** [RcppExports.o] Error 1
Warning: running command 'make -f "Makevars" -f "C:/Users/smith493/DOCUME1/R/R-321.5/etc/i386/Makeconf" -f "C:/Users/smith493/DOCUME1/R/R-321.5/share/make/winshlib.mk" CXX='$(CXX1X)
ERROR: compilation failed for package 'Seurat'
Hi Rahul et al,
As far as I can tell, in FastPCA(), the [email protected] is computed as the matrix of left singular vectors:
pca.obj = irlba(t(pc.data),nv = pcs.compute,...)
...
[email protected]=data.frame(pca.obj$u[,1:pcs.store],row.names = colnames(pc.data));
However, the projected data matrix, which is what is stored in [email protected] by the regular PCA() function, should be computed by multiplying the left singular vector matrix (the U matrix) by the actual singular values.
I am not sure why Seurat did not just use the wrapper function prcomp_irlba(), but if you look at the code for that function in
https://github.com/cran/irlba/blob/master/R/prcomp.R
you can see that the return value called "x" in the returned list is computed as the product I am referring to:
s <- do.call(irlba, args=args)
....
ans <- c(ans, list(x = s$d * s$u))
The matrix x is what Seurat typically stores in [email protected], as that is what tSNE, etc, operates on.
A separate point: I really think the documentation for Seurat should make it much more evident that when the PCA() function is run with default arguments (i.e., rev.pca==FALSE) (as it should normally be called, since the genes are indeed the variables), the Seurat object stores the projected data matrix, which is called "x" by prcomp(), in the [email protected] slot, while it stores the eigenvector matrix, which is called "rotation" by prcomp(), in the [email protected] slot. This non-conventional naming scheme should be made clear without forcing people to do a lot of digging in the code, since it is very confusing otherwise.
Hi
I just installed the new version of Seurat via Bioconductor and I'm having some issues running the PCA function.
My command is:
deconv <- PCA(deconv, pc.genes = [email protected], do.print = TRUE, pcs.print = 5, genes.print = 5)
But after that I have an error:
Error in pca.obj$rotation[, 1:pcs.store] : subscript out of bounds
I have tried to find what the problem may be, but I can't identify the source of the error.
Previous steps didn't show errors, until this one. I don't think there is an issue with the format of the original data since it worked at first (although it may very well be the case).
Looking forward to hearing from you
Regards
Hello,
I am just working through the tutorial titled: Seurat_ClusteringTutorial_Part1.html
A few lines into it, I received this message that I can't seem to resolve:
nbt=MeanVarPlot(nbt,y.cutoff = 2,x.low.cutoff = 2,fxn.x = expMean,fxn.y = logVarDivMean)
[1] "Calculating gene dispersion"
|===============================================================================| 100%
Error in text.default(data.x[pass.cutoff], data.norm.y[pass.cutoff], pass.cutoff, :
zero-length 'labels' specified
r.markers <- Seurat::FindAllMarkers(seurat_data)
[1] "Cell group 2 is empty - no cells with identity class "
Error in genes.de[[i]] : subscript out of bounds
I was running Seurat with some targeted sequencing data. My targeted sequencing data contains around 6000 cells and 300 genes. However, when I came to the step of finding differential markers, I have an error message:
Error in apply(object@data[genes.use, cells.1], 1, function(x) return(length(x[x > :
dim(X) must have a positive length
I don't have this issue when running with example PBMC data or my own transcriptome data. I'm wondering is it because the total number of genes are too small? If so, how can I fix this issue? Thank you!
Kevin
Hi Satija Lab!
In FetchData
, there is a line to check if the desired variables are genes:
gene_check <- vars.all %in% rownames(object@data)
Downstream, this winds up giving errors on genes that get filtered out during setup. Would you consider changing data
to raw.data
?
Many thanks from a regular Seurat user.
> library(devtools)
> install_github("satijalab/seurat")
Downloading GitHub repo satijalab/seurat@master
from URL https://api.github.com/repos/satijalab/seurat/zipball/master
Installing Seurat
*** caught segfault ***
address 0xffffffff, cause 'memory not mapped'
Traceback:
1: .Call("digest", object, as.integer(algoint), as.integer(length), as.integer(skip), as.integer(raw), PACKAGE = "digest")
2: `_digest`(c(list(repos, type), lapply(`_additional`, function(x) eval(x[[2L]], environment(x)))), algo = "sha512")
3: available_packages(repos, type)
4: package_deps(deps, repos = repos, type = type)
5: rbind(cran_deps, remote_deps)
6: filter_duplicate_deps(package_deps(deps, repos = repos, type = type), installing$remote_deps %||% remote_deps(pkg))
7: dev_package_deps(pkg, repos = repos, dependencies = dependencies, type = type)
8: install_deps(pkg, dependencies = initial_deps, upgrade = upgrade_dependencies, threads = threads, force_deps = force_deps, quiet = quiet, ...)
9: install(source, ..., quiet = quiet, metadata = metadata)
10: FUN(X[[i]], ...)
11: vapply(remotes, install_remote, ..., FUN.VALUE = logical(1))
12: install_remotes(remotes, quiet = quiet, ...)
13: install_github("satijalab/seurat")
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:
R version 3.2.5 (2016-04-14) -- "Very, Very Secure Dishes"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
Hi Seurat team,
I am running through the steps in the pbmc-tutorial.Rmd file on a dataset from the dropseq paper (~49k cells). At the FindClusters() step I encountered the following error:
> mydat <- FindClusters(mydat, pc.use = 1:10, resolution = 2, print.output = 0, save.SNN = T)
Error in which(SNN != 0, arr.ind = TRUE) : long vectors not supported yet: ../../src/include/Rinlinedfuns.h:138
As a sanity check, I ran on a few different resolution thresholds (0.6, 1.2, 2), but encountered error regardless of threshold. I ran on a smaller dataset (~10K cells) and did not encounter the error. I am wondering if you have encountered this before for larger datasets, and if so would be grateful for any troubleshooting suggestions.
(using R version 3.3.1 on x86_64-pc-linux-gnu platform)
Hi everyone,
I have an error when I run mean.var.plot:
nbt = mean.var.plot(nbt, y.cutoff=2, x.low.cutoff=2, fxn.x=expMean, fxn.y=logVarDivMean)
Error in seq.int(rx[1L], rx[2L], length.out = nb) : 'to' must be finite
I stuck a link up on Dropbox to a nbt object that is causing the problem.
https://dl.dropboxusercontent.com/u/2822886/nbt.RData
I'm rubbish at debugging problems in S4 objects-- any ideas about what is wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.