Code Monkey home page Code Monkey logo

Comments (6)

mass-a avatar mass-a commented on August 17, 2024

Hello!
we have never tested STACAS for spatial data, so would be curious to see how that goes. Can you provide more details about your analysis, e.g. how was the object list prepared, in which assay are the data stored, what is n.this in your example?

-m

from stacas.

kokonech avatar kokonech commented on August 17, 2024

Hi , created from list of processed Seurat objects, here's the code:

ob.list <- list()
orig.ids <- c()
for (sId in sIds) {
    sPath = paste0(dataDir,sId,".res.rds")
    print(sId)
    ob.list[[sId]] <- readRDS(sPath)
    orig.ids <- c(orig.ids,rep(sId,ncol(ob.list[[sId]])))
}

Run.STACAS(ob.list)

But for Seurat objects I did not compute variable genes, for normalization per sample SCTransform() was used. Is it sufficient, or more details for per sample analysis would be useful?

from stacas.

mass-a avatar mass-a commented on August 17, 2024

Hi, the method by default calculates highly variable genes to reduce the dimensionality, but you can bypass this step by providing your own list of genes – in your case, all genes.

For example you could try something like:

all.genes <- rownames(ob.list[[1]])
integrated <- Run.STACAS(ob.list, anchor.features = all.genes)

-m

from stacas.

kokonech avatar kokonech commented on August 17, 2024

Thanks for the reply, I used the genes present in each sample (intersect), the analysis worked well, currently inspecting the result. However small issue occred. There were several warnings like this:

Warning in irlba(A = t(x = object), nv = npcs, ...) :
  You're computing too large a percentage of total singular values, use a standard svd instead.

Should be this handled somehow via params?

Also, is there a way to find the markers of new clusters? FindAllMarkers() function did not work properly.

from stacas.

mass-a avatar mass-a commented on August 17, 2024

Good that it worked.

As for the warning, it should be fine to ignore it, see satijalab/seurat#1249 . You may also try to lower the number of PCs, since the dimensionality of your data is already quite low (use the parameter dims in STACAS).

I am not sure why FindAllMarkers() would fail, but perhaps try to re-normalize the original data before running the function. For example:

DefaultAssay(integrated) <- 'RNA'
integrated <- NormalizeData(integrated)
markers <- FindAllMarkers(integrated)

from stacas.

kokonech avatar kokonech commented on August 17, 2024

Great, everything worked, thanks for replies, closing the issue.

from stacas.

Related Issues (20)

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.