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

R crashes after analyze(vision) - fitting ... #119

Open
rmicheroli opened this issue Jun 14, 2022 · 8 comments
Open

R crashes after analyze(vision) - fitting ... #119

rmicheroli opened this issue Jun 14, 2022 · 8 comments

Comments

@rmicheroli
Copy link

rmicheroli commented Jun 14, 2022

Hey Matt,

Unfortunately by running analyze(vision), R crashes during/after fitting ...

....
Evaluating local consistency of signatures in latent space...

  |==============================================================================| 100%, Elapsed 00:41
  |==============================================================================| 100%, Elapsed 04:17
  |==============================================================================| 100%, Elapsed 01:49
  |==============================================================================| 100%, Elapsed 00:01
Clustering signatures...

fitting ...
  |=============================================================================================| 100%

and here is the code i use:

library(VISION)
library(Seurat)
seurat <- readRDS("~/Files/seurat.rds")

signatures <- c("~/Files/c7.all.v7.5.1.symbols.gmt")
DefaultAssay(seurat) <- "RNA"
vision.obj <- Vision(seurat, signatures = signatures)

vision.obj <- analyze(vision.obj)

Thanks a lot for your help!

Best,
Raphael

@mattjones315
Copy link
Collaborator

Hi Raphael,

Thanks for posting this issue - from the code example, everything looks fine.

I have indeed experienced this issue myself before, and I believe it has to do with the external package that's used to fit the GMM (mclust). From the previous times I've looked into it, the issue has generally been with the cluster environment: specifically, that the shared libraries currently in use were different from those used to build R or mclust. The problem and answers in this post describes the issue more in depth.

I apologize for not being of more help here. But if you find that this is certainly not an issue with your environment but rather the VISION package I'm happy to take a deeper look into it with you.

Thanks,
Matt

@apal6
Copy link

apal6 commented Aug 18, 2023

Hi,

Thank you for the wonderful package. I have encountered this error and not sure what is happening. Am I doing it right?

library(VISION) #load the seurat object : sobj library(fgsea) hallmark_pathway <- gmtPathways("/path/h.all.v7.0.symbols.gmt.txt") DefaultAssay(sobj) <- "RNA" vis <- Vision(sobj,signatures = hallmark_pathway)

Error:
Importing counts from obj[["RNA"]]@counts ... Normalizing to counts per 10,000... Importing Meta Data from [email protected] ... Importing latent space from Embeddings(obj, "pca") using first 30 components Loading data from JUNB ... Error in readSignaturesInput(sig) : Cannot find file: JUNB

Can you help?

Thank you so much!

@deto
Copy link
Member

deto commented Aug 18, 2023

@apal6 don't load the signatures with 'gmtPathways' first. Instead, just pass the file path to Vision. e.g.

vis <- Vision(sobj,signatures = "/path/h.all.v7.0.symbols.gmt.txt")

@apal6
Copy link

apal6 commented Aug 18, 2023

Thank you for quick response.

I tried it and now there's a new error

DefaultAssay(sobj) <- "RNA" vis <- Vision(sobj,signatures =signature) Importing counts from obj[["RNA"]]@counts ... Normalizing to counts per 10,000... Importing Meta Data from [email protected] ... Importing latent space from Embeddings(obj, "pca") using first 30 components Loading data from HALLMARK_HYPOXIA ... Error in readSignaturesInput(sig) : Cannot find file: HALLMARK_HYPOXIA

@deto
Copy link
Member

deto commented Aug 18, 2023 via email

@apal6
Copy link

apal6 commented Aug 18, 2023

signatures <- read_tsv("/path/h.all.v7.0.symbols.gmt.txt") head(signatures) DefaultAssay(sobj) <- "RNA" vis <- Vision(sobj,signatures=signatures)

@deto
Copy link
Member

deto commented Aug 18, 2023

no, there you are using read_tsv. You need to pass the file path directly into the Vision function, the way I showed. Use this command:

vis <- Vision(sobj, signatures = "/path/h.all.v7.0.symbols.gmt.txt")

@apal6
Copy link

apal6 commented Aug 18, 2023

Got it! Thank you, that worked

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

4 participants