Skip to content
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

error from signalConditions #73

Closed
jliu678 opened this issue Oct 16, 2020 · 3 comments
Closed

error from signalConditions #73

jliu678 opened this issue Oct 16, 2020 · 3 comments

Comments

@jliu678
Copy link

jliu678 commented Oct 16, 2020

Hi there,

"bugmtx.rds" containing the matrix "bugmtx" and the txt file that prints the "err trackback" have been attached in the zip file,and

S <- CreateSeuratObject(counts = bugmtx, min.features = 1,min.cells = 1)
S<- subset(x = S, subset = nFeature_RNA > 200)
S<- SCTransform(S, verbose = T,return.only.var.genes=F, min_cells = 1)

gives err message in console:

Calculating cell attributes from input UMI matrix: log_umi
Variance stabilizing transformation of count matrix of size 11743 by 255
Model formula is y ~ log_umi
Get Negative Binomial regression parameters per gene
Using 2000 genes, 255 cells
|===================== | 25%
warning: solve(): system seems singular; attempting approx solution
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 't': missing value where TRUE/FALSE needed
In addition: There were 50 or more warnings (use warnings() to see the first 50)
Called from: signalConditions(obj, exclude = getOption("future.relay.immediate",
"immediateCondition"), resignal = resignal, ...)

session info:

R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)

Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
other attached packages:
[1] sctransform_0.3.1 Seurat_3.2.2 

hope to hear your advice soon

thanks

data file and err traceback.zip

@ChristophH
Copy link
Collaborator

Thank your for the bug report! And thanks for including the data and the traceback.
This is likely a duplicate of #71.

Could you try the current version of sctransform in the develop branch?

remotes::install_github("ChristophH/sctransform@develop")

@jliu678
Copy link
Author

jliu678 commented Oct 16, 2020

Thank your for the bug report! And thanks for including the data and the traceback.
This is likely a duplicate of #71.

Could you try the current version of sctransform in the develop branch?

remotes::install_github("ChristophH/sctransform@develop")

still not working... attached is the traceback and session info. it looks the same as previously except attached "sctransform" was development version now.

By the way, I think it is about the update made in the newest version compared with version 0.3, which running well.

1.txt

@ChristophH
Copy link
Collaborator

You are setting min_cells = 1 which means that sctransform is keeping all genes that are detected (non-zero count) in at least one cell. We do not advice doing so, and here it breaks the parameter estimation.

I would argue that genes that are detected in just one cell are not going to have a large influence on the downstream analysis and can safely be dropped. In your case, setting min_cells = 2 or higher seems to be sufficient for the parameter estimation to pass.

The default value for min_cells is 5, and we should probably issue a warning when this parameter is set lower than that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants