Skip to content

"undefined columns error" #82

Closed
Closed

Description

@egarren

Running into this error after the analyze(obj) step and not sure what's the cause. For background, I have imported a Seurat object and am using signatures from msigdb. Any idea what could be causing the error? Thank you in advance!

vision.obj <- analyze(vision.obj)
Beginning Analysis

Performing micro-pooling on 28703 cells with a target pool size of 5
Using supplied latent space with 2 components
Performing initial coarse-clustering...
Further partitioning coarse clusters...
Micro-pooling completed reducing 28703 cells into 5739 pools
Aggregating data using assigned pools...completed

Clustering cells...completed

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

Evaluating signature scores on cells...

|============================================================================================================| 100%, Elapsed 00:14
Evaluating signature-gene importance...

|============================================================================================================| 100%, Elapsed 00:54
Creating 5 background signature groups with the following parameters:
sigSize sigBalance
1 9 0.9902046
2 24 0.9742071
3 70 0.9571728
4 254 0.9888702
5 276 0.5600931
signatures per group: 3000
Computing KNN Cell Graph in the Latent Space...

Evaluating local consistency of signatures in latent space...

|============================================================================================================| 100%, Elapsed 00:51
|============================================================================================================| 100%, Elapsed 01:24
|============================================================================================================| 100%, Elapsed 50:51
|============================================================================================================| 100%, Elapsed 00:01
Clustering signatures...

Error in [.data.frame(sigMatrix, , keep_significant, drop = FALSE) :
undefined columns selected

Activity

  1. mattjones315 commented on Jul 2, 2020

    @mattjones315
    Collaborator

    Hello,

    We've seen errors like this when the signatures passed in have duplicate names. To help us diagnose this issue, can you:

    1. Verify that each signature has a unique name? You can check this by looking at the Signatures stored in the @sigdata slot. Look at the @name slot in each Signature object in the @sigdata slot and verify that each name appears once and only once.
    2. Provide us with a minimal reproducible example that we can run.

    Thank you!

    -Matt

  2. egarren commented on Jul 2, 2020

    @egarren
    Author

    Thanks Matt! I checked and my signature names appear to be distinct. I ran the following to check:

    sum(duplicated(names(vision.obj@sigData)))
    [1] 0

    Here are some snipets of my code:

    library(msigdb)
    signatures<-msigdb.genesets(type="symbols", species="mouse", return.data.frame=FALSE)
    write.gmt(signatures,"mouse.gmt")
    count.data <- GetAssayData(object = pbmc[["SCT"]], slot = "counts")
    new.seurat.object <- SetAssayData(object = pbmc,slot = "scale.data",
    new.data = as.matrix(x = count.data),assay = "RNA")
    vision.obj <- Vision(new.seurat.object,signatures ="mouse.gmt",pool = T,
    cellsPerPartition = 5, dimRed<-"umap")
    vision.obj <- analyze(vision.obj)

  3. dpcook commented on Jul 23, 2020

    @dpcook

    Have come across the same issue and tracked down the specific signature causing the issue. I'm iterating through subsets of a complete dataset, running vision on each subset. Made it through 8 subsets, but on the 9th, I'm getting:

    vision <- Vision(seurat[[i]],
                       signatures = signatures,
                       sig_gene_threshold = 0.025,
                       projection_methods=NULL)
    vision <- analyze(vision)
    
    Clustering signatures...
    
    Error in `[.data.frame`(sigMatrix, , keep_significant, drop = FALSE) : 
      undefined columns selected`
    

    Can't track down the source of the error on this one specific data set. It's a single signature, so duplicated names shouldn't be an issue. I'll keep looking around, but here's access to the data that should reproduce the error.

    Signature: https://drive.google.com/file/d/1wXD3KzUw4-KwyGlu0YEVnQWSU3HJVzDH/view?usp=sharing
    Seurat object (~945 cells): https://drive.google.com/file/d/1HiTy6yRgedpOQJQf11PV123RlnnXE0xs/view?usp=sharing

  4. dpcook commented on Jul 23, 2020

    @dpcook

    Update: Nevermind, turns out there are no duplicated names in the signatures themselves, but I had a [email protected] column with the identical name to the signature ("Hypoxia"). Removing the duplicated name fixed it.

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