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 in data.frame(C = consistency, pValue = pvals, FDR = fdr)? #99

Open
duocang opened this issue Sep 24, 2021 · 7 comments
Open

Error in data.frame(C = consistency, pValue = pvals, FDR = fdr)? #99

duocang opened this issue Sep 24, 2021 · 7 comments

Comments

@duocang
Copy link

duocang commented Sep 24, 2021

Hi.

I met an error and there is nowhere to debug. Can you please give some hints?

scaled_counts <- t(t(counts) / n.umi) * median(n.umi)
vision.score <- cal_vision(scaled_counts, gSets, n_cores = 1)

vis = VISION::Vision(scaled_counts, signatures = gS)
vis = VISION::analyze(vis)

Error message :

Beginning Analysis

Computing a latent space for expression data...

Determining projection genes...
    Applying Threshold filter...removing genes detected in less than 250 cells
      Genes Retained: 2679
    Applying Fano filter...removing genes with Fano < 2.0 MAD in each of 30 bins
      Genes Retained: 500

Clustering cells...completed

Projecting data into 2 dimensions...
  Running method 1/1: tSNE30 ...

Evaluating signature scores on cells...

Creating 0 background signature groups with the following parameters:
     sigSize sigBalance
  signatures per group: 3000
Computing KNN Cell Graph in the Latent Space...

Evaluating local consistency of signatures in latent space...

  |================================================================================| 100%, Elapsed 00:00
Error in data.frame(C = consistency, pValue = pvals, FDR = fdr) : 
  arguments imply differing number of rows: 1, 0
@mattjones315
Copy link
Collaborator

mattjones315 commented Sep 25, 2021 via email

@duocang
Copy link
Author

duocang commented Sep 25, 2021

@mattjones315
Hi. I have found the problem. Since vision asks gmt file but I do not have it before so I converted GSEABSE::geneset into gene signature needed by VISION with mistakes.

I now create singatures:

 singatures <- lapply(names(gSets), function(gSet){
      genes <- unlist(geneIds(gSets)[gSet]) %>% unname()
      value <- rep(1, length(genes))
      names(value) <- genes

Maybe you can provide an option to use GSEABASE::geneset? It is not easy to use if a local file is always needed.

@Immugent
Copy link

"Error in data.frame(C = consistency, pValue = pvals, FDR = fdr) :
arguments imply differing number of rows: 1, 0
In addition: Warning message:
In readSignaturesInput(signatures) : NAs introduced by coercion"
I also get this error when running scMetabolism, Could you provide a solution?

@mattjones315
Copy link
Collaborator

Hi @duocang ,

Apologies for the very delayed response to this issue, I somehow missed this a while back. We support a very flexible way for adding signatures through the createGeneSignature function which takes in a list of gene names. You can read more about this on our vignette here. I believe this will be flexible enough to handle work with geneset objects.

@Immugent I'll need a minimal working example to help you on this. I'm also unaware of what scMetabolism is, I've never tried working with it and VISION. However, in the times I've seen this error, it's often because of a NAs in the meta data / signature scores. Happy to help if you can provide more information about the data and code used to generate this error.

@Immugent
Copy link

scMetabolism adopts the VISION method in its process. I already know the reason for this error is because scMetabolism only works with human data.

@hujiaoxueba
Copy link

Hi, do you know how to get the scMetabolism work with mouse data?

@Immugent
Copy link

I have asked the author and the analysis of mouse data is not currently supported.

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