Open kellyliyichen opened 1 month ago
Hi,
This is very strange, and even stranger since you obtained the same FindNeighbor results in the second case. You mentioned that the FindNeighbor() "does something related to the default assay even when reduction and dims are set"
, could you specify which part you are referring to?
Hi, This is very strange, and even stranger since you obtained the same FindNeighbor results in the second case. You mentioned that the FindNeighbor()
"does something related to the default assay even when reduction and dims are set"
, could you specify which part you are referring to?
Maybe I wasn't clear enough. It was just my guess based on the first case. I got different results from FindNeighbor() where the only difference was the default assay.
But since I got the same results of FindNeighbor() in the second case, I am not sure what the problem could be.
Hi,
Based on FindNeighbors, it seems that the function only depends on embeddings, rather than the counts/normalized counts. So I suppose the results should be the same no matter the default assay is RNA or SCT for the same Seurat object using the same embeddings. But I got different clustering results for RNA and SCT using the following code:
I noticed that harmony embeddings were computed using assay SCT when I checked with
srt_obj_sct@reductions
andsrt_obj_rna@reductions
Then I also ran
And the output was
TRUE
.This confuses me a lot as no matter SCT or RNA is the default assay, the harmony embeddings are the same and should give the same clustering results.
Then I tested the case when I explicitly added the same harmony embeddings using the following code:
Then I got the same clustering results.
It seems that in
FindNeighbors
, it does something related to the default assay even whenreduction
anddims
are set, which seems contradictory to the documentation. It is quite confusing to me as I thoughtFindNeighbors
only used the embeddings, which is independent on assays once computed.I am using Seurat v5 and R 4.3.3 and here is output of
sessionInfo()
:Hope someone could help me with this problem. Thank you in advance!