Comments (4)
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:
- Run
FindAnchors.STACAS()
with a reasonable number of variable genes (e.g. 2000); - Run
IntegrateData.STACAS()
by specifyingfeatures.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.
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.
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.
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)
- package installation suddenly stopped working HOT 1
- file and link not accessible HOT 1
- Process bar? HOT 2
- option to only use intersection of features between datasets
- Add support for SCT normalization HOT 7
- Deletion of FilterAnchors.STACAS HOT 2
- IntegrateData.STACAS function not found HOT 1
- How to tune the STACAS guide tree HOT 1
- Preparing PCA embeddings for objects... 1/5 2/5 3/5 4/5 5/5 Finding integration anchors... Error in Embeddings(object = object.list[[x]][[nn.reduction]])[, dims] : subscript out of bounds HOT 1
- Error when running STACAS on spatial data HOT 6
- new.assay.name in Run.STACAS HOT 1
- Error while finding anchors with semi supervised approach HOT 4
- Finding markers after integration HOT 2
- Discrepancy in genes included in block list between Human and Mouse
- Run.STACAS Error in GetAssayData HOT 1
- Error in StandardizeGeneSymbols() HOT 1
- working with Seurat v5 layers? HOT 3
- CheckGC() not imported from SeuratObject HOT 1
- implement option for automatic sketching of input datasets
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stacas.