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

an error message - running the run.knetl #37

Open
MavroLucic opened this issue Jan 8, 2024 · 1 comment
Open

an error message - running the run.knetl #37

MavroLucic opened this issue Jan 8, 2024 · 1 comment

Comments

@MavroLucic
Copy link

Hi guys

I want to test the KNetL map for some geochemical purposes (sparse geochemical data 5600 rows and 19 columns). However, I have some problems, when I try to run the run.knetl, I get an error message.

#This is my code:

library(iCellR)
my.obj <- make.obj(data)

Filtering the data
my.obj <- cell.filter(my.obj)
Normalizing the data
my.obj <- norm.data(my.obj, norm.method = "ranked.glsf")

my.obj <- gene.stats(my.obj, which.data = "main.data")

Run PCA
my.obj <- run.pca(my.obj, method = "base.mean.rank", data.type = "main")
opt.pcs.plot(my.obj)

Run DR
my.obj <- run.pc.tsne(my.obj, dims = 1:10, perplexity = 6)
my.obj <- run.umap(my.obj, dims = 1:10)
my.obj <- run.knetl(my.obj, dims = 1:10, zoom = 300, dim.redux = "umap")

#I got an error here

Getting PCA data
Calculating euclidean distance ...
Finding 300 neighboring cells per cell ...
Generating graph from root to neighboring cells ...
Generating 2D Layouts ...
Error in dimnames(x) <- dn :
length of 'dimnames' [1] not equal to array extent
In addition: Warning messages:
1: In graph.data.frame(data, directed = FALSE) :
In d' NA' elements were replaced with string "NA"
2: In get(layout.2d)(g) :
Non-positive edge weight found, ignoring all weights during graph layout.

Can somebody help me?

Thank you in advance.
Kind regards

@rezakj
Copy link
Owner

rezakj commented Jan 12, 2024

You have 19 columns. If it was single cell data it would be 19 cells. I don't recomend running KNetL map on small data. Generally it dose better when you have at least a couple of thousands of cells/columns. When you have less than 1000 cells, UMAP works better but in your case with only 19 columns, I don't think iCellR would be right for you.

Reza

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