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

Running UMAP after Magic - is it valid? #205

Open
Natacoman opened this issue Sep 25, 2022 · 0 comments
Open

Running UMAP after Magic - is it valid? #205

Natacoman opened this issue Sep 25, 2022 · 0 comments
Labels

Comments

@Natacoman
Copy link

Natacoman commented Sep 25, 2022

Hello,

I would like to run UMAP based on a selected set of genes to see how well different cell types are separated only based on these genes. I tried running UMAP directly and running UMAP on the MAGIC output using Seurat:

# Running UMAP directly-----------------------------
data<- SCTransform(data,variable.features.n = 18171) 
data<- RunPCA(data,features = unique(rec$Gene))
data <- RunUMAP(data,dims = 1:20,seed.use = 123)

# Running UMAP after MAGIC------------------------
data.magic <- magic(data, genes=unique(rec$Gene))
data.magic@active.assay <- 'MAGIC_SCT'
data.magic = ScaleData(data.magic)
data.magic<- RunPCA(data.magic,features = unique(rec$Gene),assay = 'MAGIC_SCT')
data.magic <- RunUMAP(data.magic,dims = 1:10,metric = "euclidean",n.neighbors = 100,seed.use = 123,assay = 'MAGIC_SCT')

Running UMAP after MAGIC seems to be able to separate cell type much more nicely than running UMAP by itself.
My question is : is it valid at all to calculate UMAP on the MAGIC output? I just want to make sure the nice results is not because of artifacts or invalid analysis.

Thank you so much!
Screen Shot 2022-09-25 at 12 45 59 PM

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

No branches or pull requests

1 participant