Coder Social home page Coder Social logo

jr-leary7 / scissors Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 3.0 619.28 MB

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.

License: MIT License

R 100.00%
cluster subpopulation seurat rare-cells cell-type-identification

scissors's People

Contributors

jr-leary7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

scissors's Issues

Improve speed / memory usage in `CosineDist()`

  • Do some benchmarking of the various cosine distance functions available in R, & maybe add a package dependency if the improvement is significant enough over the current base R implementation

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

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

Reduce complexity of `ReclusterCells()`

  • Make the main function easier to use
  • Also need to make sure re-integration functionality works correctly, it can get tricky when doing non-Seurat integration routines

Error: No cells found in ReclusterCells

Hi,

I am testing your package with my data. I have an integrated Seurat object. I used STACAS for integration and the clustering at this point is already defined as cell types strings.
I converted the strings describing cell types to integers, as it seems required by the ReclusterCells function and created a seurat_clusters variable. Clusters IDs are integers from 1 to 15.
I then run directly
t_reclust <- ReclusterCells(scdata.combined,auto=T,redo.embedding=T,n.cores=20,is.integrated = T, integration.ident="SampleName")
but I get
Error: No cells found

I could trace this error to
if (!merge.clusters) {
temp_obj <- subset(seurat.object, subset = seurat_clusters ==
which.clust[[i]])
}

The issue seems to be in
which.clust <- as.integer(names(which(ComputeSilhouetteScores(seurat.object) <
cutoff.score)))

this results in a which.clust with cluster IDs shifted by 1, i.e. if seurat_clusters range is [1,15], the which.clust range is [0,14] and as a consequence
temp_obj <- subset(seurat.object, subset = seurat_clusters == which.clust[[i]])
fails.

I am probably doing something wrong. Can you please help ?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.