Skip to content

SCimplify_for_Seurat() hangs if nonexistent reduction is provided #37

Description

@Nick-Eagles

Hello,

I accidentally provided the name of a reduction that didn't exist in my Seurat object to SCimplify_for_Seurat(). Strangely, the function ran for hours, used far more memory than when the correct reduction name was provided, and ultimately failed with a cryptic error. Basically, I think I simple internal check that the reductions exist in the object would be helpful.

I ran this exact code to reproduce the issue (where everything is a legitimate input except the RNA reduction):

seur_meta = SCimplify_for_Seurat(
    seur, assay = c("RNA", "ATAC"),
    reduction = list("does_not_exist", "integrated.lsi.harmony"), 
    dims = list(1:30, 2:30), gamma = 75,
    label = "mid_cluster"
)

And this was the eventual error:

Error in igraph::cluster_walktrap(graph) : 
  At vendor/cigraph/src/community/walktrap/walktrap_graph.cpp:207 : Vertex with zero strength found: all vertices must have positive strength for walktrap. Invalid value
Calls: SCimplify_for_Seurat -> <Anonymous>
Execution halted

Thanks!

Best,
-Nick

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions