Code Monkey home page Code Monkey logo

Comments (4)

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

Hello,

in general I would be very careful of using more than 2000-3000 genes as variable features. It is true that increasing this number will include more lowly expressed genes, but it will also include many uninformative genes, resulting in a noisy selection of variable genes. If your rare genes do not appear in the top 2000-3000 most variable genes, it is unlikely they will significantly contribute in defining the integrated space.

This said, if you are interested in obtaining corrected counts for all genes as per your question, you could try the following:

  1. Run FindAnchors.STACAS() with a reasonable number of variable genes (e.g. 2000);
  2. Run IntegrateData.STACAS() by specifying features.to.integrate = rownames(unintegrated.object), i.e. you ask to calculate corrected counts for all genes in the original object. Or you may simply manually add to this list the genes you are interested in, if this still runs you out of memory.

I hope this helps,
-m

from stacas.

kasumaz avatar kasumaz commented on August 17, 2024

Hi there,
Thanks a lot for your fast reply,

I adjusted the code a bit. I dont get an error when I run (at least initially):

obj_integrated <- obj %>% SplitObject(split.by = "Dataset") %>%
IntegrateData.STACAS(dims = 1:20, features.to.integrate = v) %>%
RunUMAP(dims = 1:10)

v is a character vector containing all of the gene symbols.

But when i run:

obj_integrated <- obj %>% SplitObject(split.by = "Dataset") %>%

  • IntegrateData.STACAS(dims = 1:20, features.to.integrate = v, cell.labels = "integration_col2") %>%
  • RunUMAP(dims = 1:10)
    Error in IntegrateData.STACAS(., dims = 1:20, features.to.integrate = v, :
    unused argument (cell.labels = "integration_col2")

I would liked to have ran it semi-supervised. I see in the documents for the function that there is a way to run it semi supervised by mentioning 'semisupervised = TRUE,' - but for IntegrateData.STACAS() there isnt a way to specify a metadata column to help with integration?

The problem with this dataset is that its like an atlas one with many different cell types, so the corrected counts for 2000 anchors would end up giving only maybe only a fraction of the possible deferentially expressed genes between each cell type.

from stacas.

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

Hi,
as I mentioned in my previous comment, you need to first calculate the integration anchors, before running IntegrateData.STACAS(). Using your code:

obj_integrated <- obj %>% SplitObject(split.by = "Dataset") %>%
FindAnchors.STACAS(cell.labels="integration_col2", anchor.features = 3000) %>%
IntegrateData.STACAS(dims = 1:20, features.to.integrate = v, semisupervised=TRUE) %>%
RunPCA(npcs=20) %>%
RunUMAP(dims = 1:20)

The idea is that cell labels are used to calculate integration anchors between cells with the same type (or without labels); the resulting anchors are used by the integration function to calculate the joint embedding.

(Run.STACAS() is a wrapper for several of these commands, but if you want more control on the results you can run them separately as above).

from stacas.

kasumaz avatar kasumaz commented on August 17, 2024

Thanks a lot for your help. Your instructions were clear.
Yeah, the rarer lowly expressed genes in the transient disease population I am working with, can only be observed if I include it with the list of variable genes. They do show up in bulk-seq work in similar cells. This is the best I can do for now with the cloud resource I have. Otherwise, I look forward to seeing more tools from your lab.

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.