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

Seurat- SCTransform compatibility? #30

Closed
mr-september opened this issue Jan 5, 2021 · 4 comments
Closed

Seurat- SCTransform compatibility? #30

mr-september opened this issue Jan 5, 2021 · 4 comments

Comments

@mr-september
Copy link

Seems similar to #25.

Typical PBMC 5K data, preprocessed and clustered in Seurat (and native SCTransform).

FindNeighours done, UMAP generated. But
swne.embedding <- RunSWNE(data_transcripts_seurat, k = 20)

calculating variance fit ... using gam [1] "4800 variable genes to use"
Computing nearest neighbor graph
Computing SNN
Error in as(object@graphs$RNA_snn, "dgCMatrix") : 
  no method or default for coercing “NULL” to “dgCMatrix”
In addition: Warning message:
In pf(exp(df$res), n.obs, n.obs, lower.tail = F, log.p = F) : NaNs produced

Checking my seurat object, it turns out there's no RNA_snn, but instead there's SCT_nn and SCT_snn.

Would this error be solved by making SWNE look for object@graphs$SCT_snn instead? If so, how?

@yanwu2014
Copy link
Owner

Hi! Sorry for the late reply, was working on a manuscript deadline. Thanks for pointing this out, I've updated the RunSWNE function to look for object@graphs$SCT_nn when the DefaultAssay is SCT, which it is automatically set to after running SCTransform. Let me know if that works!

@mr-september
Copy link
Author

mr-september commented Mar 2, 2021

Hi, thank you! I forgot about this but just tried it again today and it works flawlessly now!

Just another suggestion: in your Readme, maybe recommend remotes::install_github() instead of devtools::install_github(), the former has much less dependencies and often work where the latter gives errors.

@yanwu2014
Copy link
Owner

Thanks for the suggestion, I just updated to using remotes! Yeah I've noticed devtools does not handle dependencies well too

@mr-september
Copy link
Author

Hi @yanwu2014, apologies for the mistake, I double checked and realised it's remotes::install_github(), not remotes::install()

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