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

n_pcs is needed to be specified in calcDM #76

Open
mimi3421 opened this issue Aug 25, 2021 · 0 comments
Open

n_pcs is needed to be specified in calcDM #76

mimi3421 opened this issue Aug 25, 2021 · 0 comments

Comments

@mimi3421
Copy link

mimi3421 commented Aug 25, 2021

A warning code shows when I run the codes in URD: Quick Start after calcDM and the following plotDimArray function returns an odd ploting result.

axial <- calcDM(axial, knn = 100, sigma=16)
plotDimArray(axial, reduction.use = "dm", dims.to.plot = 1:8, outer.title = "Diffusion Map (Sigma 16, 100 NNs): Stage", label="stage", plot.title="", legend=F)

[1] "Using provided global sigma 16"
Warning message:
In DiffusionMap(data.use, sigma = sigma.use, k = knn, n_eigs = dcs.store, :
You have 15659 genes. Consider passing e.g. n_pcs = 50 to speed up computation.

Rplot01

It seems that the calcDM is passing a normalized data matrix to DiffusionMap which is not properly scaled. When I add n_pcs=50 in the parameter of DiffusionMap the results turns to be simillar to the Quick Start guide.

diffusion-map.R - https://github.com/farrellja/URD/blob/master/R/diffusion-map.R

  # Calculate the diffusion map
  #dm <- DiffusionMap(data.use, sigma=sigma.use, k=knn, n_eigs = dcs.store, density_norm = density.norm, distance=distance[1]) # the original line 110
  dm <- DiffusionMap(data.use, sigma=sigma.use, k=knn, n_eigs = dcs.store, density_norm = density.norm, distance=distance[1], n_pcs=50)  # the change I made

Rplot

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

1 participant