Skip to content

Cannot pass "igraph" method to Seurat::FindClusters in addClusters #1567

@tiffanyformosa

Description

@tiffanyformosa

I wanted to use the leidenalg option for Seurat::FindClusters in addClusters(), However, my dataset is 65,000 cells, which is too large to pass as a dense matrix. I would like to set the option for method = "igraph" in Seurat::FindClusters, which is a known workaround for large datasets. However since method is already a parameter of addClusters to select between Seurat and scran, this parameter is not accessible. Could a workaround be added?

My code is:

    input = wt_atlas,
    reducedDims = "IterativeLSI",
    dimsToUse = dims,
    method = "Seurat",
    name = "Clusters",
    maxClusters = NULL,
    force = TRUE,
    knn = k,
    algorithm = 4, #this sets Seurat::FindClusters to leidenalg
    method = "igraph" #cannot pass this to FindClusters, since method is already a parameter
)

And the error message I get is:
Error in addClusters(input = wt_atlas, reducedDims = "IterativeLSI", dimsToUse = dims, : formal argument "method" matched by multiple actual arguments

Session Info: addClusters_sessionInfo_2022-08-15.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions