jr-leary7 / SCISSORS

SCISSORS builds upon the Louvain graph-based clustering in Seurat by optimizing parameter selection when reclustering cell groups, with an eye towards identifying rare cell types.
MIT License
9 stars 4 forks source link

long vectors (argument 1) are not supported in .C after integration #33

Open AJTDaedalus opened 6 months ago

AJTDaedalus commented 6 months ago

I have been attempting to run ReclusterCells on my Seurat object with the following command:

t_reclust <- ReclusterCells(data, which.clust = fibroblast_labels, merge.clusters = TRUE, is.integrated = TRUE, integration.ident = "dataset", use.sct = TRUE, k.vals = c(30, 40, 50), resolution.vals = c(.2, .3, .4), n.HVG = 4000, n.PC = 15, use.parallel = FALSE, redo.embedding = FALSE, random.seed = 312)

These is the latest print statements from the execution:

Finished calculating residuals for counts Set default assay to SCT |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=15m 04s [1] 1 [1] 2 Warning: Assay integrated changing from Assay to SCTAssay Error in { : task 1 failed - "long vectors (argument 1) are not supported in .C" In addition: There were 50 or more warnings (use warnings() to see the first 50)

When checking warnings(), these are the responses (the other 48 are identical to 30):

29: In glm.nb(formula = as.formula(new_formula), data = data) : alternation limit reached 30: In theta.ml(Y, mu, sum(w), w, limit = control$maxit, trace = control$trace > ... : iteration limit reached

jr-leary7 commented 6 months ago

How large is your dataset ? This seems to be an issue more with the Matrix package that Seurat uses under the hood. See e.g., this issue.

AJTDaedalus commented 6 months ago

Thanks for the response! It is a large dataset, so this does seem to be the issue. In the mean time I've been recreating the core functionality of SCISSORS in python since scanpy does so much better with large datasets, but I'll try to take a stab at forking and implementing the reference argument they used in that issue and see if it helps.

jr-leary7 commented 5 months ago

thank you for doing so ! i'm quite familiar with Scanpy as well so if you need any assistance with the reimplementation i'm more than happy to help out.