Skip to content

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

Open

Description

@duocang

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

Activity

  1. mattjones315 commented on Sep 25, 2021

    @mattjones315
    Collaborator
  2. duocang commented on Sep 25, 2021

    @duocang
    Author

    @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.

  3. Immugent commented on Jan 14, 2022

    @Immugent

    "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?

  4. mattjones315 commented on Jan 14, 2022

    @mattjones315
    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.

  5. Immugent commented on Jan 16, 2022

    @Immugent

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

  6. hujiaoxueba commented on Aug 24, 2022

    @hujiaoxueba

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

  7. Immugent commented on Aug 26, 2022

    @Immugent

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions