Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query on building shared factor neighborhood graph #311

Open
yuzhong1997 opened this issue May 16, 2024 · 2 comments
Open

Query on building shared factor neighborhood graph #311

yuzhong1997 opened this issue May 16, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@yuzhong1997
Copy link

Hi,

Thanks for your excellent software! I just have questions on your workflow after I checked all your codes on Github:

  1. Based on your workflow (https://welch-lab.github.io/liger/reference/quantileNorm.html), you said "This process builds a shared factor neighborhood graph to jointly cluster cells, then quantile normalizes corresponding clusters." by running quantileNorm command. But actually, it seems like .quantileNorm.HList function (line 1444 in integration.R file) only cluster cells across datasets independently as clusters <- **lapply**(Hs, function(H) clusterAssign[rownames(H)]). And those cell factor loadings normalized given a reference afterwards.

  2. It seems like shared factor neighborhood graph really occurs when running runCluster as snn <- ComputeSNN(knn$nn.idx, prune = prune), which is based on previous normalized cell factor loadings.

I'm not sure if I understand here correctly or not. Appreciate it if any helps here.

Yu

@mvfki mvfki added the enhancement New feature or request label May 16, 2024
@mvfki
Copy link
Collaborator

mvfki commented May 16, 2024

Hi Yu,

I think you're right with point 2.

For point 1, briefly, what happens in quantileNorm() is that we label cells by the max factor loading (e.g. cluster 1 if factor 1 loads the most for a cell), and then align the factor loadings of cells assigned to the same "cluster". There is a step of NN searching where the graph is used to refine the previously described cluster voting before aligning cells with quantile normalization. So here the graph is indeed used for clustering cells, but this clustering is not the primary purpose of the whole thing, i.e. it is not what users usually look for when they want clustering labels for downstream analysis. Hope this explains, and I'll try to update the documentation in future versions so it causes less confusion.

Thanks,
Yichen

@yuzhong1997
Copy link
Author

Hi,

Thanks for your quick response! Yeah, I'm totaly clear about quantileNorm, but just confused when the first glance on documentation. Thanks again.

Yu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants