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

help with alra #26

Open
mocherry opened this issue Nov 30, 2023 · 1 comment
Open

help with alra #26

mocherry opened this issue Nov 30, 2023 · 1 comment

Comments

@mocherry
Copy link

Dear all,

I am kind of lost how to deal with the results of ALRA.
When I process a Seurat object with ALRA I get a new assay. How do I then use the ALRA computed data to do a UMAP or TSNE reduction based on these data? Seems that whatever I do the result of both looks the same as the one produced by the standard pipeline after SCTransform.

I would greatly appreciate a jump start in this matter.

Thanks and best,
Matthias

@ggruenhagen3
Copy link

If you did what I did and added the imputed data matrix into the data slot of the SCT assay then performed RunPCA and downstream analysis and then were confused about why nothing changed - I can explain. The PCA is dependent of the scaled data and if you did what I did, then the scaled data was not modified at all and thus the PCA and downstream analysis wasn't affected. I can't think of a way to use ALRA and to use SCTransform together (at least correctly for the latter).

The code below is not a solution. This is what I did, which leads to no change due to the reasons I outlined above. This code is meant for reproducibility and clarity.

# NOT A SOLUTION
alra_res = ALRA::alra(data_mat)
data_mat_imp = alra_res[[3]]
data_mat_imp = t(data_mat_imp)
colnames(data_mat_imp) = colnames(big_obj)
big_obj[["SCT"]]$data = as(data_mat_imp, "dgCMatrix")
big_obj = RunPCA(big_obj, assay = "SCT")
...

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

No branches or pull requests

2 participants