Closed ejscience closed 6 months ago
Hi! To help with the first part, a couple clarifying questions:
For your second question, please see this thread #6, which will hopefully provide the code you're looking for. You'll need to install the dev branch of CHOIR. Note that providing pre-generated clusters and dimensionality reductions is not the default application of CHOIR, and has not been thoroughly benchmarked.
Hi @catpetersen,
there are a total of 4 samples. I expect that the batch effects will be large but I am looking at 4 teratomas so I also suspect to have similar cell-types across the samples.
I think that you are totally right that it could be that the subtree has all samples from 1 batch. One of them is significantly smaller in terms of cells than the others!
So first I'll just say that CHOIR's batch correction was designed to work best with batches that include more than 1 sample. I think your data may make it difficult to disentangle cell types that are truly shared among individual teratomas, vs. those that are unique to one sample. But it really depends on the dataset & extent of batch effects.
That said, I've made some changes in the 'dev' branch so that CHOIR will omit the Harmony step for any subtrees containing only a single batch, and just spit out a warning instead.
Would you try reinstalling CHOIR with:
devtools::install_github("corceslab/CHOIR", ref="dev", repos = BiocManager::repositories(), upgrade = "never")
# To unload a package and reload
detach("package:CHOIR", unload=TRUE)
library(CHOIR)
And let me know if that resolves the error during subtree generation?
Hi! I'm closing this issue for now, but please feel free to reply here if you have any additional issues and I'll reopen it.
Hello I am trying to run CHOIR on a multi-sample seurat object where I have 2 issues. (1) I got an error during harmony based tree creation. and (2) I do not understand how to extract the necessary information for other
(1) Fixing an error with Harmony Batch Correction in CHOIR
I got the following error with the traceback after:
(2) Help with Providing pre-generated clusters
I am interested in pulling out clusters and comparing between CCA and Harmony integration reductions. I would like to see if anyone had some code for how to extract the necessary matrices to
pruneTree()
? Specifically gettingcluster_tree
,nn_matrix
andreduction matrix
from a seurat object.Currently I run the following code. Where
[ReductionToTest]
is replaced with the integration method